These instructions describe how to build platform independent components of OpenGeo Suite.
The following base software packages are required.
- Java Development Kit (JDK) - 1.6+
- Apache Ant - 1.8+
- Apache Ivy - 2.3+
- Git - 1.7.10+*
Some modules require additional packages:
- Apache Maven - 3.0+
- JSTools - Latest
- Sphinx - 1.0+ (the full build requires LaTeX support)
- NodeJS - Latest version
Ensure that all the above are installed so that the associated executables are on the
PATH
of the user building the suite.
-
Clone the repository:
% git clone git://github.com/opengeo/suite.git suite % cd suite
-
Initialize submodule dependencies:
% git submodule update --init --recursive
-
Do a full build:
% ant
-
Or build the module of your choice:
% cd docs % ant
The suite repository is made up a number of modules (ie projects). During development typically modules are built individually as opposed to all at once. The primary build tool for suite is Ant. For some modules the ant script delegates to the modules native build tool such as Maven or Sphinx.
All top level modules have a build.xml
that defines the following targets:
build
- Builds the project, the result of this is something deployable in the development environment. This target is the default.clean
- Cleans the project deleting all build artifacts.assemble
- Assembles the project into a zip archive suitable for deployment in production. This is the artifact consumed by installer builders.publish
- Publishes the zip archive to a final location.all
- Runs all the above targets.
Building for development purposes typically looks like:
ant clean build
Building for deployment purposes typically looks like:
ant clean build assemble
Or to build everything:
ant all
The build directory contains common build files used by modules.
- common.xml - Common ant targets used by module build files. Every module build file imports this file as the first step.
- build.properties - Default build properties that can be overridden on a global or per module basis.
Many aspects of the suite build such as file locations, executable names, etc... are parameterized into build properties. The default build.properties contains a list of default values. Often these default properties must be overridden to cater to the environment (eg. Windows vs Unix) or to cater to specifics of a particular module.
There are two ways to override build properties:
-
The first is to specify them directly to the ant build command with the Java system property (-D) syntax. For example:
% ant -Dsuite.build_cat=release build
-
Creating a file named
local.properties
either at the global level or at the module level. The globallocal.properties
is located in the build directory next tobuild.properties
. Module specificlocal.properties
files are located next to the modulebuild.xml
file. Naturally the module specific local properties file overrides properties from its global counterpart.
Using any combination of the above method it should never be necessary to modify the build.properties
file directly.
The suite repository is composed of the following modules:
Consult the module README files for module specific information.