Skip navigation

Getting source code

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

Building with Maven 2.x (currently using 2.2.x)

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 ZVTM.

The main zvtm directory contains a pom.xml file that contains the Maven configuration for ZVTM. 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 ZVTM'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 contains the version number, such as zvtm-0.9.8.jar or zvtm-0.10.0-SNAPSHOT.jar.

Install ZVTM in local repository

You can install ZVTM 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

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

mvn javadoc:javadoc

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

Declaring ZVTM as a dependency in your own Maven-managed project

Declare the following repository:

<repository> <id>zvtm repository</id> <url></url> </repository>

and add the following dependency in your own pom.xml file:

<dependency> <groupId>fr.inria.zvtm</groupId> <artifactId>zvtm</artifactId> <version>0.10.1-SNAPSHOT</version> <!-- update to a suitable version, not necessarily with -SNAPSHOT --> </dependency>


If using the SVG import/export capabilities of ZVTM, you must also declare the following dependency (package fr.inria.zvtm.svg was moved to a separate module in zvtm-0.10.1).

<dependency> <groupId>fr.inria.zvtm</groupId> <artifactId>zvtm-svg</artifactId> <version>0.1.1</version> <!-- update to a suitable version --> </dependency>


If using the PDF display capabilities of ZVTM, you must also declare the following dependency. zvtm-pdf relies on ICEpdf for PDF rendering. ICEpdf is currently not available through Maven and has to be installed in your local repository manually. See zvtm-pdf's POM file for further instructions.

<dependency> <groupId>fr.inria.zvtm</groupId> <artifactId>zvtm-pdf</artifactId> <version>0.2.0</version> <!-- update to a suitable version, not necessarily with -SNAPSHOT --> </dependency>