Version 6 (modified by Erich Seifert, 9 years ago) (diff)

Added gral prefix to submodule names


Installation of GRAL is very straight forward: just include the JAR file of the library core in your project's class path.


Java Runtime Environment (JRE) of at least version 6

Recommended packages

VectorGraphics2D library for exporting vector file formats (included in binary package)

Building GRAL from source code

The source package contains all files necessary to build GRAL from scratch using the Maven software project management and comprehension tool. Like Makefile files the pom.xml files are used by Maven to execute certain steps for generating various distribution or documentation files.

Building a JAR file of the library core

In case you just want to build the core of the library to get started execute the following command in the core directory:

$ mvn install

This will generate a JAR archive named gral-core in the gral-core/target path. This JAR file can be added to the class path of your application.

Building a JAR file of the examples

If you want to build the GRAL example applications just execute the following command in the gral-examples directory:

$ mvn install

This will generate a JAR archive for the examples in the gral-examples/target path which can be used together with the library core to run the example applications. Finally, to run an application just call java with a suitable class path:

$ java -cp gral-core/src/main/resources:gral-core/target/gral-core-<version>.jar:gral-examples/target/gral-examples-<version>.jar de.erichseifert.gral.examples.xyplot.MemoryUsage

Building the distribution archives

In order to build package archives like the ones available for download you have to execute the following command in the package directory:

$ mvn clean package assembly:assembly

This will create a target directory containing the following files in the target directory:

  • GRAL-<version>-bin.tar.bz2 and GRAL-<version> – ready-to-include JAR files for GRAL and all its dependencies
  • GRAL-<version>-doc.tar.bz2 and GRAL-<version> – JavaDoc API documentation for GRAL
  • GRAL-<version>-src.tar.bz2 and GRAL-<version> – Source code and ressources including the complete Maven project

Building the documentation

The GRAL Maven project offers two sources for documentation:

The first one is the standard Maven site containing a project overview and various information like the JavaDocs, test results, etc. To build the HTML Maven site in the target/site directory just execute:

$ mvn site

The second is a book-like documentation in form of a DocBook file. To build an HTML file of the DocBook file in the target/docbook directory execute:

$ mvn docbook:transform

Using GRAL in an IDE

The Maven project can also be used in your favorite development environment like Eclipse or NetBeans. For further information look at the following descriptions on the Maven website:

Once you have installed an appropriate Maven plug-in for your IDE you will be able to import the GRAL project found in this folder.