Skip navigation

Getting source code

The source code is available in each release release and via the SVN repository.

Building with Maven 2.0

On November 15th, 2007 we switched from Ant to Maven to manage the ZVTM project. This involves both the library and applications based on it and hosted on, such as ZGRViewer.

Maven is a very powerful management system. Visit the Maven web site to get more information.

In the following we only give a brief summary of useful commands to compile and package ZGRViewer.

The main zgrviewer directory contains a pom.xml file that contains the Maven configuration for ZGRViewer. All commands are issued from that directory.


The first command in the build lifecycle compiles the source code, creating a target directory with classes stored in target/classes. The source code itself is located in src/main/java with additional resources such as image icons in src/main/resources.

mvn compile


To build ZGRViewer's JAR file, issue the following command.

mvn package

If necessary, Maven will go through the compilation goal and all other intermediate goals before packaging. The resulting JAR file is put in directory target/. As opposed to builds in earlier releases managed with Ant, the JAR file name now containsthe version number, such as zgrviewer-0.8.0.jar or zvtm-0.8.1-SNAPSHOT.jar.

Install ZGRViewer in local repository

You can install ZGRViewer in your local Maven repository (usually ~/.m2/repository) with the following command:

mvn install


To recompile all classes, simply erase the target directory with the following command:

mvn clean

Generating JavaDoc

ZGRViewer's javadoc can be generated with the following command:

mvn javadoc:javadoc

The resulting apidocs/ directory is put in target/site/.