Semantics of this Tutorial

TechFak: Bielefeld University specific information
General Information
command line execution

$prefix=/tmp/

Tutorial

The general idea of distributions that are installed using the toolkit approach is that these distributions are self-contained apart from dependencies into the Linux system. As a consequence, Java software is packaged inside toolkit distributions as well. For this purpose, we are using Maven by installing a custom Maven repository along with the toolkit distribution. In order to use this repository when you are developing new software against the dependencies installed inside such a distribution, you need to take a few setup steps which are explained in this tutorial.

Step #1: Create a Maven Profile for the Toolkit Distribution

Maven supports the notion of profiles which enable custom settings that can selectively be switched on and off. We propose to create such a profile for the distribution you want to develop against. For this purpose either create a ~/.m2/settings.xml file with the following contents, or in case it exists, merge in the profile section for your distribution as contained in the example file:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
    http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <profiles>
      <profile>
          <!-- Change according to your distribution name -->
          <id>toolkit-nightly</id>
          <activation>
              <activeByDefault>false</activeByDefault>
          </activation>
          <repositories>
              <repository>
                  <!-- change to your distribution name -->
                  <id>toolkit-nightly</id>
                  <name>toolkit repository</name>
                  <!-- Assuming that you have installed the distribution to $prefix. 
                       Replace the variable with the real path here! 
                       This should result in 3 consecutive slashes after file! -->
                  <url>file://${prefix}/share/repository</url>
                  <layout>default</layout>
                  <releases>
                      <updatePolicy>always</updatePolicy>
                      <enabled>true</enabled>
                  </releases>
                  <snapshots>
                      <updatePolicy>always</updatePolicy>
                      <enabled>true</enabled>
                  </snapshots>
              </repository>
          </repositories>
      </profile>
  </profiles>

</settings>

Please note that you have to replace some values in this template. They are marked with comments. Please pay particular attention to the correct format of the file URL pointing to the filesystem-based maven repository. It eventually requires 3 consecutive slashes such as in the following example: file:///tmp/share/repository

Step #2: Build against the Toolkit Repository

Whenever you want to develop java software with Maven against the contents installed in the toolkit distribution repository, you now have to enable this repository when calling maven. On the command line this can e.g. be done by using the -P argument followed by the profile name. IDEs like Eclipse provide similar settings.

Support

Support/Issues can be requested/filed under http://opensource.cit-ec.de/projects/citk.