Skip to content

How to Build the ABC Engine

fspreiss edited this page Mar 17, 2015 · 5 revisions

How to Build

Requirements

In order to check out the code from GitHub, you must have Git. Instructions for obtaining and configuring Git can be found Here

The following components are required for building the project:

  • Java Development Kit (JDK) 1.7 or higher. Note that the Java Runtime Environment (JRE) is not sufficient.

    Unix: sudo apt-get install openjdk-7-jdk

    Other systems: Refer to 'http://www.oracle.com/technetwork/java/javase/downloads' for instructions.

  • Maven 3.0.x

    Unix: sudo apt-get install maven

    Other systems: Refer to 'http://maven.apache.org/' for instructions.

    Although we use Maven as build tool, there are two required libraries that are not available in public Maven repositories. Therefore, in the following, we provide instructions on how these libraries can be integrated with your local Maven repository.

  • IBM Identity Mixer Version 3.0.36.

    Download the binary (com.ibm.zurich.idmx.3-0-36.jar) and install it into your local maven repository. Start by extracting the zip archive to some temporary folder, then run the following 3 commands:

    In the com\ibm\zurich\idmx\com.ibm.zurich.idmx.3_x_x\3.0.36 folder:

    mvn install:install-file \
       -Dfile=com.ibm.zurich.idmx.3_x_x-3.0.36.jar \
       -DpomFile=com.ibm.zurich.idmx.3_x_x-3.0.36.pom
    

    In the com\ibm\zurich\idmx\com.ibm.zurich.interfaces\3.0.36 folder:

    mvn install:install-file \
       -Dfile=com.ibm.zurich.idmx.interfaces-3.0.36.jar \
       -DpomFile=com.ibm.zurich.idmx.interfaces-3.0.36.pom
    

    In the com\ibm\zurich\idmx\pom\3.0.36 folder:

    mvn install:install-file \
       -Dfile=pom-3.0.36.pom \
       -DpomFile=pom-3.0.36.pom
    
  • The source code.

    Either download the code as zip file or check out the source code using the command:

    git clone http://github.com/p2abcengine/p2abcengine.git
    

Building

  1. Go to the directory:

    cd Code/core-abce

  2. Build the code with the command

    mvn clean install -DskipTests

    If the build fails with java.lang.OutOfMemoryError Exceptions, make sure the Maven build process has enough memory:

    • Windows: set MAVEN_OPTS=-Xmx1024m -Xms256m -XX:MaxPermSize=512m
      Be aware that the 'set' command only sets the MAVEN_OPTS variable for the current console session. To have the variable set permanently (for all future console sessions), set this variable as Windows environment variable manually or via 'setx'.
    • Unix variants: export MAVEN_OPTS='-Xmx2024m -Xms256m -XX:MaxPermSize=1024m'
      In Unix, to prevent this common error, these options are set automatically if you run mvn from the core-abce folder.
  3. Once the code can be successfully built, you can go a step further and execute all unit tests using the command:

    mvn test

Eclipse Import

You can optionally use Maven to generate Eclipse project files (.project):

mvn eclipse:eclipse

The projects are generated in the individual module folders and can be imported in Eclipse as existing projects.

You can’t perform that action at this time.