Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Automatic Build Process

Maven and Tycho in KIELER

In KIELER there is a parent POM located in build/de.cau.cs.kieler.parent, there are mid-level POMs in features and plugins and finally each plugin and feature directory contains a POM file. Furthermore to handle building an Eclipse P2 repository and the KIELER RCA there is a special repository project with its own POM in build/de.cau.cs.kieler.repository. As KIELER is This section describes how our POM files are distributed throughout the repository structure, and how you can trigger an automatic build of KIELER.

POM Files

The basic structure of the POM files can be seen below:

Image Added

Each plug-in and feature has a corresponding (usually rather small) POM file. The POM files in the features and plugins directories know about the different features and plug-ins. The parent POM file, which all other POM files copy basic configuration from, knows about the feature and plug-in POM files. In addition, the build directory also contains a bunch of subdirectories. These also contain POM files specialized for building the P2 repositories necessary to publish our Eclipse features.

Using the KIELER Maven Build

Using the KIELER Maven build requires knowledge about two aspects: necessary configuration / required libraries and invoking Maven.

Necessary Configuration

KIELER needs to be built against a P2 repository generated from our Eclipse reference installation. The path to this repository is found in the parent POM file and must be changed if the repository location changes. Also, the following magic command updates the P2 build repository after changes to the installation.

...

when changing the reference installation, the repository has to be updated using the following magic command (adapted accordingly):

Code Block
languagenone
java -jar eclipse_3.8/plugins/org.eclipse.equinox.launcher_*.jar \
-application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher \
-metadataRepository file:/home/java/repository/juno382 \
-artifactRepository file:/home/java/repository/juno382 \
-source /home/java/eclipse_3.8/ \
-publishArtifacts

Things to be aware of

Warning
  • Eclipse metadata and pom.xml files are not automatically synced. If you change for example version numbers, you have to modify pom.xml
  • There are files in the parent project which can be also found in the branding plugin. Keep them in sync!

 

Building Kieler on the command line

A full KIELER build on the command line is done as follows

true
Code Block
languagebash
titleFull Build
linenumbers

Invoking Maven

To actually build KIELER once all preliminaries are done, navigate to the /build/de.cau.cs.kieler.parent directory and run the following command line:

Code Block
languagenone
mvn clean package -P <profile>   # For a list of available profiles, see parent pom.xml

If you are trying to build KIELER on our server, you first have to setup the Java environment, if you haven't already done so. The command line thus becomes:

Code Block
languagenone
. /home/java/java-env		#sets environment variables for java and maven
cd build/de.cau.cs.kieler.parent
mvn clean package -P <profile>   # For a Availablelist profilesof includeavailable indigoprofiles, see juno38, juno42

...

parent pom.xml

Once Maven has finished, the different build artifacts may be found in the /build/de.cau.cs.kieler.*.repository/target. Similarly single plugins or features are found in the target subdirectory of the respective package directories.

What to Be Aware of

There are some things that people need to be aware of to keep the build files in a valid state.

  1. Eclipse metadata and POM files are not synchronized. Thus, if the version of an Eclipse plug-in changes, its pom.xml needs to be updated accordingly.
  2. The repository POM directories contain product files and product icons. These are copies of the files found in the corresponding branding plug-ing (such as de.cau.cs.kieler.core.product) and have to be manually synchronized.

Continuous and Nightly Builds

...