Skip to main content
Jump to: navigation, search

Difference between revisions of "Platform-releng/Platform Build"

Line 30: Line 30:
Maven package included in Fedora is working without a problem and is used to build the Eclipse Platform package shipped with Fedora.
Maven package included in Fedora is working without a problem and is used to build the Eclipse Platform package shipped with Fedora.
==== Mac OSX ====
==== Mac OSX ====

Revision as of 13:27, 23 November 2012

This page provides instructions for building the Eclipse Platform using preferred technologies identified as part of the CBI initiative.


Free HDD space

~25GB is recommended.

Oracle Java 1.6 or higher

  • Oracle 1.6 JDK needs to be on PATH (OpenJDK also works and is becoming officially supported on Red Hat Enterprise Linux for Kepler. See plan).
  • Verify correct version of java is used
  • set JAVA_HOME to point to your JDK

Some of the inner build callouts, like the SWT fragment build, depend on having an Oracle JVM.

Maven 3.0.4

  • Download from or use your Linux distribution provided version (whether it works depends on the distribution).
  • make sure mvn is available in your PATH



  • You can install Git using your distro's package manager.

Using Maven on Ubuntu

The Maven included in Ubuntu sometimes has issues. See Bug report. If you face such issues, install Maven from the Maven Homepage.

Using Maven on Fedora

Maven package included in Fedora is working without a problem and is used to build the Eclipse Platform package shipped with Fedora.



  • Download Git for Windows from
  • Install using the downloaded exe file
  • We recommend using the "Git Bash" application provided by Git for Windows as your commandline shell throughout the build

Important: Per Bug 376400 we discovered that msysgit has a max character limit somewhere around 256 which causes cloning files with a path longer than that to fail


Workaround: Put your repo in the root of a drive and give it a short name. For example: C:\z


 cd c:
 git clone -b R4_2_maintenance --recurse-submodules \
 git:// \

Build environment setup

Note: Unless otherwise stated, these instructions apply to Linux, MacOSX, and Windows platforms

review maven settings.xml

To avoid getting hit by bug 365727 and to make sure your local environment configuration does not interfere with CBI build, make sure build user account does not have maven settings.xml

igor@desktop:~$ ls -l ~/.m2/settings.xml
ls: cannot access /home/igor/.m2/settings.xml: No such file or directory

On Windows XP this is located in:

C:\Documents and Settings\your_user\.m2\settings.xml
File should not exist, if it does delete it.

On Windows 7 this is located in:

File should not exist, if it does delete it.

give maven JVM more ram

 export MAVEN_OPTS=-Xmx2048m


Note: Unless otherwise stated, these instructions apply to Linux, MacOSX, and Windows platforms

We're currently working on the R4_2_maintenance and R3_8_maintenance branches. When we're confident in them, we'll merge the changes into master.

A script that captures the steps is available in

cloning platform source tree

Replace R4_2_maintenance with the branch you'd like to checkout.

Clone the repository and checkout the branch:

 git clone -b R4_2_maintenance --recurse-submodules \

To update this clone and all submodules:

 git fetch origin
 git merge origin/R4_2_maintenance
 git pull --recurse-submodules
 git submodule update

If you want to switch from another branch to this one, replace git merge origin/R4_2_maintenance with:

 git checkout -b R4_2_maintenance origin/R4_2_maintenance

Running the build

 cd eclipse.platform.releng.aggregator
 mvn -f eclipse-parent/pom.xml clean install -Dmaven.repo.local=$LOCAL_REPO
 mvn -f maven-cbi-plugin/pom.xml clean install -Dmaven.repo.local=$LOCAL_REPO

Once the parent and the plugin are installed in the local repo, you can run the build from the aggregator root:

 mvn clean install -Pno-bree-libs -Dmaven.test.skip=true -Dmaven.repo.local=$LOCAL_REPO

Build result

Once the build finishes, the following artifacts are created.

Packaged SDK zip files are located in your eclipse.platform.releng.aggregator directory under


P2 repository


Source bundles


Packaged JUnit Plugin Tests and Automated Testing Framework


Cleaning the build repo

To completely clean a build repo (before a new build or before updating the aggregator and submodules):

 git submodule foreach git clean -f -d
 git submodule foreach git reset --hard HEAD
 git clean -f -d
 git reset --hard HEAD

Using BREE Libs

BREE libs can be used to build using the same BREE as what is used on You will first need to download and install the attached to Bug 386649 ( and follow the instructions in the description of the bug.

Here's an example toolchains.xml. It currently only works with Oracle JREs (see bug 389856).

Once setup you can inform the build to use it by passing -Pbree-libs instead of -Pno-bree-libs on the mvn build command.

Pack200 & Signing

Pack200 & Signing is supported when built using and is disabled by default.

  • Install eclipse-jarsigner-plugin to local maven repository used by the build (i.e. /var/tmp/lts/R4_localrepo).
  • Run the build with -Peclipse-sign parameter.

Eclipse Jarsigner can be built from:

 git clone -n git://
 cd org.eclipse.cbi.maven.plugins
 git checkout eclipse-jarsigner-plugin-1.0.1
 mvn -f eclipse-jarsigner-plugin/pom.xml \
   clean install \

Build Natives

Optionally, you can pass -Dnative= parameter with one of the following options to compile the natives for the specified native.

- cocoa.macosx.x86
- cocoa.macosx.x86_64
- gtk.linux.x86
- gtk.linux.x86_64
- win32.win32.x86
- win32.win32.x86_64
- win32.wce_ppc.arm


 mvn clean install \
   -Dmaven.repo.local=$LOCAL_REPO -Dmaven.test.skip=true -Dnative=gtk.linux.x86_64

running the tests

Copy the junit tests and the CBI SDK (pick the one for your platform) that was built to a testing directory. Also unzip the junit tests.

 mkdir -p /var/tmp/lts/R3_platform-tests
 cp eclipse.platform.tychoeclipsebuilder/sdk/target/products/org.eclipse.sdk.ide-linux.gtk.x86_64.tar.gz /var/tmp/lts/R3_platform-tests
 cp TMP/eclipse-junit-tests/target/ /var/tmp/lts/R3_platform-tests
 cd /var/tmp/lts/R3_platform-tests

Modify the file to point to the CBI built repository. (This example uses /home/user/R3_platform-aggregator as the CBI platform root)

Note down the org.eclipse.equinox.p2.reconciler.tests.platform.archive.linux-x86_64= file name for your architecture. (In this example linux x86_64)


Rename your org.eclipse.sdk.ide-linux.gtk.x86_64.tar.gz you copied earlier to match the name you jotted down.

 mv org.eclipse.sdk.ide-linux.gtk.x86_64.tar.gz eclipse-platform-201204121421-linux-gtk-x86_64.tar.gz

Copy your eclipse-platform to eclipse SDK

 cp eclipse-platform-201204121421-linux-gtk-x86_64.tar.gz eclipse-SDK-201204121421-linux-gtk-x86_64.tar.gz

Download a copy of the latest released Eclipse Classic from

Copy the Eclipse Classic SDK to eclipse-platform

 cp eclipse-SDK-3.7.2-linux-gtk-x86_64.tar.gz eclipse-platform-3.7.2-linux-gtk-x86_64.tar.gz

You should now have 4 copies of the platform, 2 from the latest released and 2 from the CBI build.


Unzip the CBI platform

 tar zxvf eclipse-platform-201204121421-linux-gtk-x86_64.tar.gz

Run the tests

 ./runtests -os linux -ws gtk -arch x86_64


Bug 384482 - Apple JVM renamed rt.jar to classes.jar causing CBI Platform build issues

Apple JVM renamed rt.jar to classes.jar causing the CBI Platform build to fail when building on macosx. Running the build a 2nd time after the failure however produces a working build. It isn't ideal to have the user run the build twice though.

A workaround for this issue is to create a symbolic link for classes.jar to rt.jar.

 cd /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib
 sudo ln -s ../../Classes/classes.jar rt.jar

Submitting for aggregator builds (Proposal)

In PDE build the features specify what plugins to build and the map files specify where to get the plugin projects and which version to check out.

In the CBI build the pom.xml files and the directory structure specify what plugins to build and the aggregator git repo specifies which checkout is the build input by capturing the commit for each component repo as a submodule entry.

The manual process for submitting Platform UI for a build involves updating the submodule in the aggregator:

 # starting in eclipse.platform.releng.aggregator
 cd eclipse.platform.ui
 git checkout R4_2_maintenance
 git pull
 cd ..
 git status

The status should look something like:

 # On branch R4_2_maintenance
 # Changed but not updated:
 #   (use "git add <file>..." to update what will be committed)
 #   (use "git checkout -- <file>..." to discard changes in working directory)
 #   (commit or discard the untracked or modified content in submodules)
 #       modified:   eclipse.platform.ui (new commits)

To pull in the new commits, just add the repo:

 git add eclipse.platform.ui
 git commit
 git push origin HEAD

These steps can be driven by a file similar to repositories.txt and done in place of the auto-tagging step at the beginning of the build.

Back to the top