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 zvtm.sf.net, 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.
Compile
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.
Package
To build ZVTM's JAR file, issue the following command.
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:
Clean
To recompile all classes, simply erase the target directory with the following command:
Generating JavaDoc
ZVTM's javadoc can be generated with the following command:
The resulting apidocs/ directory is put in target/site/.
Declaring ZVTM as a dependency in your own Maven-managed project
Declare the following repository:
and add the following dependency in your own pom.xml file:
ZVTM-SVG
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).
ZVTM-PDF
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.