BuildOpenCmsFromSource

From OpenCms Wiki
Jump to: navigation, search

The following steps show how to build opencms from scratch just using ant.

Contents

Prerequisites

Folder structure

First download the source distribution of your choice from the OpenCms website or check it out from cvs. Create a new folder (referred to as %BUILD_ROOT%) and another folder in it (referred to as %SOURCE_ROOT%) and unzip the downloaded sources in it (the build process will create folders above the %SOURCE_ROOT% folder).

Modifications in build.xml

Change to %SOURCE_ROOT% and edit the file build.xml

Navigate to the line beginning with

<property name="opencms.input.externlibs" 

and change it to

<property name="opencms.input.externlibs" location="${opencms.input.webinf}/lib" />

This way you can put the external jars required in the same dir as the other libs.

Required libs

Download the oracle driver classes (ojdbc14.jar) from here: [1] (need to sign in) and place it in %SOURCE_ROOT%/webapp/WEB-INF/lib.

Read the file src-components/ant-opencms-config.txt and copy the libs mentioned there from %SOURCE_ROOT%/webapp/WEB-INF/lib/ to %ANT_HOME%/lib (Note: this step doesn't seem to be necessary for OpenCms 7.x)

Building

To build the complete distribution go the directory where build.xml is located and call ant bindist.

The web archive can be found at %BUILD_ROOT%/BuildCms/build/opencms.war

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox