Building Geotoolkit.org

Users generally don't need to build Geotk themself since snapshots are built and deployed on the Maven repository every day, and monthly releases are deployed both on the Maven repository and on the download area. If nevertheless there is a need to build Geotk on a local machine, then this page describes the steps.

Requirements

The following free softwares must be installed on the local machine:

Building the JAR files

Gets the source code from the above-cited download area (if monthly releases are suffisient) or from the Mercurial repository if the development version (snapshot) is wanted. In the later case, see the Source Repository page for more information.

Make sure that the current directory is the project root directory, the one which contains the topermost pom.xml file. From this directory, execute the following commands:

mvn install

If the build fails with compilation errors, or if the execution fails with a throwable of kind java.lang.Error (for example NoSuchMethodError), or if you just want to be safe, try again with the following command:

mvn clean install --update-snapshots

If there is some test failures, or if you want to skip tests for a faster build, use:

mvn install -DskipTests

After a successful build, a copy of the Geotk JAR files will be located in the target/binaries directory together with every dependencies that are required at runtime.

Building the javadoc

Execute the following command from the same directory than above. It is recommanded to run this command only after a successful build.

mvn javadoc:aggregate

After a successful javadoc generation, the generated HTML pages will be located in the target/site/apidocs directory.

Building the PACK200 bundles

Execute the following command after a successful build of JAR files and javadoc:

mvn org.geotoolkit.project:geotk-jar-collector:pack-specific --non-recursive

Updating the source code

This work only if the source code was obtained from the Mercurial repository. The recommand steps are as below, in that order (note that the clean is performed before the update):

mvn clean
hg pull --update
mvn install