Skip to content

How to build Eclipse BIRT

Alexander Lehmann edited this page May 27, 2019 · 5 revisions

Beforehand

Building environment

  • JDK 1.8
  • Maven 3.5+

Prerequisites

  • git should be installed
  • your ssh public key should be set in your github account

Steps

Step 1 - Install a suitable Java Development Kit (JDK) version 1.8

  • A JDK for java version 1.8 can be downloaded here: https://adoptopenjdk.net/
  • download and unpack the JDK
  • set the environment variable JAVA_HOME to the directory of the unpacked JDK

Step 2 - Install maven

  • You can download Apache Maven version 3.5+ here: https://maven.apache.org/download.cgi
  • download and unpack the Maven binaries
  • extend the PATH environment variable to include the path to the 'bin' directory of the Maven installation
  • running 'mvn --version' on the command line should output the installed Maven and Java versions

Step 3 - Download the BIRT source code

  • clone the github repository:

    cd ~/git  
    git clone git@github.com:Flugtiger/birt.git

Step 4 - Setup a toolchains.xml

  • Copy the file 'travis-maven-toolchain.xml' into '~/.m2' and rename it to 'toolchains.xml'
  • Edit your 'toolchains.xml' and change the path to the Java JDK according to the location of your local Java installation (JAVA_HOME from step 1)

Step 5 - Start the maven build

cd ~/git/birt  
mvn package -DskipTests

Troubleshooting

  • Error [ERROR] Internal error: java.lang.NullPointerException -> [Help 1]:
    • Often times eclipse.org redirects P2 repository requests to a misconfigured/broken/unavailable P2 mirror repository and builds fail because of that. To disable use of P2 mirrors and force all downloads to go directly to the main repository specify the following maven command line parameter -Dtycho.disableP2Mirrors=true Source: Eclipse Tycho FAQ
    • If that does not help, try deleting your m2 repository (~/.m2/repository)