Checking out and building JGUIraffe

JGUIraffe uses Apache Maven 3 as its build tool and git as version control system (VCS). The source code repository can be cloned using the command

git clone https://github.com/oheger/jguiraffe.git jguiraffe-git
    

This command produces a maven aggregator project with a couple of modules. The most important ones are the following:

  • core is the main library defining the JGUIraffe abstractions for different UI platforms.
  • swing is the integration jar for Swing. This jar needs to be in the class path for applications running on Swing.
  • java-fx contains the JavaFX integration jar. It is needed for JavaFX applications.
  • examples contains some sample code and also the complete tutorial application.

For convenience the top-level directory contains a pom.xml for building the whole project including all its modules. Just execute the following command in this directory:

mvn clean install
    

This requires a JDK 11 or newer because this version of JavaFX is declared in the dependencies. Otherwise, the minimum JDK version is 1.8. The resulting jar files containing all classes of the JGUIraffe library can be found in the target folders of the modules.

Note: If you get an OutOfMemoryError, you have to increase the heap size for the Maven build. This can be achieved by setting the MAVEN_OPTS environment variable correspondingly, e.g. MAVEN_OPTS=-Xmx256m would increase the size of the heap space to 256 M.

Note: The build executes all unit tests. Some test cases test error conditions which cause exceptions to be logged to the console. This is expected and does not indicate a problem with the build.

The pom defines a profile named release which creates some additional artifacts. If it is activated, jars with Javadocs and the project's sources are produced. These jars can be integrated in typical IDEs. To activate this profile and generate the additional artifacts enter the following command (in the top-level directory):

mvn clean install -P release