Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Platform-releng/Platform Build

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

Prerequisites

Free HDD space

~15GB is recommended.

Oracle Java 1.6 or higher

  • Oracle 1.6 JDK needs to be on PATH.
  • 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


Build environment setup

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


give maven JVM more ram

 export MAVEN_OPTS=-Xmx2048m

Eclipse 4.x Branch

cloning platform source tree

I setup single platform-aggregator git repository that references all required parts of the platform build is git submodules. The following command clones both the outer repository and all submodules

Read-Only Access:

 git clone -b JunoSR1_RC1_R4 --recurse-submodules \
  git://git.eclipse.org/gitroot/cbi/platform-aggregator.git R4_platform-aggregator

Committer Access:

 git clone -b JunoSR1_RC1_R4 --recurse-submodules \
  ssh://<userid>@git.eclipse.org/gitroot/cbi/platform-aggregator.git R4_platform-aggregator

To update this clone and all submodules:

 cd R4_platform-aggregator  
 git fetch origin
 git merge origin/JunoSR1_RC1_R4
 git pull --recurse-submodules
 git submodule update

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

 git checkout -b JunoSR1_RC1_R4 origin/JunoSR1_RC1_R4

running the build

Easy way

 ./build.sh build

Hard way

 mvn -f eclipse-parent/pom.xml \
   clean install \
   -Dmaven.repo.local=/var/tmp/lts/R4_localrepo
 mvn -f maven-cbi-plugin/pom.xml \
   clean install \
   -Dmaven.repo.local=/var/tmp/lts/R4_localrepo
 mvn clean install \
   -Dmaven.repo.local=/var/tmp/lts/R4_localrepo -Dmaven.test.skip=true

With primed local repository, the build takes about 7 minutes on my 4+ years old linux desktop (core 2 duo @2.8GHz, SSD).

Packaged SDK zip files are located in your R4_platform-aggregator directory under

  eclipse.platform.releng.tychoeclipsebuilder/sdk/target/products

P2 repository

  eclipse.platform.releng.tychoeclipsebuilder/sdk/target/repository

Eclipse 3.x Branch

cloning platform source tree

Read-Only Access:

 git clone -b JunoSR1_RC1_R3 --recurse-submodules \
  git://git.eclipse.org/gitroot/cbi/platform-aggregator.git R3_platform-aggregator

Committer Access:

 git clone -b JunoSR1_RC1_R3 --recurse-submodules \
  ssh://<userid>@git.eclipse.org/gitroot/cbi/platform-aggregator.git R3_platform-aggregator

To update this clone and all submodules

 cd R3_platform-aggregator
 git fetch origin
 git merge JunoSR1_RC1_R3 origin/JunoSR1_RC1_R3
 git pull --recurse-submodules
 git submodule update

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

 git checkout -b JunoSR1_RC1_R3 origin/JunoSR1_RC1_R3

running the build

Easy way

 ./build.sh build

Hard way

 mvn -f eclipse-parent/pom.xml \
   clean install \
   -Dmaven.repo.local=/var/tmp/lts/R3_localrepo
 mvn -f maven-cbi-plugin/pom.xml \
   clean install \
   -Dmaven.repo.local=/var/tmp/lts/R3_localrepo
 mvn clean install \
   -Dmaven.repo.local=/var/tmp/lts/R3_localrepo -Dmaven.test.skip=true


Packaged SDK zip files are located in your R3_platform-aggregator directory under

 org.eclipse.releng.tychoeclipsebuilder/sdk/target/products/

P2 repository

 org.eclipse.releng.tychoeclipsebuilder/sdk/target/repository

Source bundles

 org.eclipse.releng.tychoeclipsebuilder/target/repository/plugins

Packaged JUnit Plugin Tests and Automated Testing Framework

 TMP/eclipse-junit-tests/target/eclipse-junit-tests-1.0.0-SNAPSHOT-bundle.zip

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/eclipse-junit-tests-bundle.zip /var/tmp/lts/R3_platform-tests
 cd /var/tmp/lts/R3_platform-tests
 unzip eclipse-junit-tests-bundle.zip

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

 org.eclipse.equinox.p2.tests.current.build.repo=file:/home/user/R3_platform-aggregator/eclipse.platform.repository/target/repository/

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)

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

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 http://www.eclipse.org/downloads/.

 http://www.eclipse.org/downloads/

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.

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

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

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

Example:

 mvn clean install \
   -Dmaven.repo.local=/var/tmp/lts/R4_localrepo -Dmaven.test.skip=true -Dnative=gtk.linux.x86_64

Pack200 & Signing

Pack200 & Signing is supported when built using build.eclipse.org 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 downloaded at: http://git.eclipse.org/c/cbi/org.eclipse.cbi.maven.plugins.git/tree/eclipse-jarsigner-plugin

Troubleshooting

Bug 368089 - Product tar.gz has wrong file permission bits when building on macosx

This issue might occur if your system is not using LANG=en_US.UTF-8 as your system locale. This issue will prevent your from being able to launch Eclipse until proper file permissions are set manually. A workaround is to set the locale before running the build so that the build produces a proper tar.gz.

 export LANG=en_US.UTF-8

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

Back to the top