Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "CBI/Eclipse Platform Build"
(→Pack200 & Signing) |
(→running the build) |
||
Line 151: | Line 151: | ||
mvn clean install \ | mvn clean install \ | ||
-Dmaven.repo.local=/var/tmp/lts/R3_localrepo -Dmaven.test.skip=true | -Dmaven.repo.local=/var/tmp/lts/R3_localrepo -Dmaven.test.skip=true | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Revision as of 14:10, 5 July 2012
This page provides instructions for building the Eclipse Platform using preferred technologies identified as part of the CBI initiative.
At the moment, this build is a prototype based on a temporary fork of the Eclipse platform repositories. Access is not public yet, but if you'd like to try the build and provide feedback, please contact andrew dot ross at eclipse dot org to request.
Contents
Prerequisites
SUN Java 1.6
- SUN 1.6 JDK needs to be on PATH.
- Verify correct version of java is used
igor@desktop:~$ java -version java version "1.6.0_29" Java(TM) SE Runtime Environment (build 1.6.0_29-b11) Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)
Maven 3.0.3
- Download from http://maven.apache.org/download.html
- Unpack to a local folder. On *nix, I usually unpack to /opt and create /opt/maven symlink so I can switch between different versions easily
- Do NOT use maven shipped with your linux distribution.
Maven as shipped in Fedora 16 is perfectly capable of building the platform with the given instructions. Let's not generalize things and negate others work that easily!!! Akurtakov
- Verify correct maven version is used
igor@desktop:~$ mvn -version Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500) Maven home: /opt/maven
"natives" p2 repository
Notice: This step is no longer required in the latest CBI repo as of commit http://git.eclipse.org/c/cbi/platform-aggregator.git/commit/?h=Juno_RC4_R4&id=274922612bcfeeecff9362f50a09966c6538c399
This is a temporary workaround until we figure out how to build native binaries and bundles that wrap them.
For Eclipse R3
Download via web browser: natives-rc4-r3.zip
wget http://eclipse.org/downloads/download.php?file=/cbi/natives-rc4-r3.zip\&r=1 unzip natives-rc4-r3.zip -d /var/tmp/lts
For Eclipse R4
Download via web browser: natives-rc4-r4.zip
wget http://eclipse.org/downloads/download.php?file=/cbi/natives-rc4-r4.zip\&r=1 unzip natives-rc4-r4.zip -d /var/tmp/lts
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 LTS 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=-Xmx512m
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 Juno_RC4_R4 --recurse-submodules \ git://git.eclipse.org/gitroot/cbi/platform-aggregator.git R4_platform-aggregator
Committer Access:
git clone -b Juno_RC4_R4 --recurse-submodules \ ssh://<userid>@git.eclipse.org/gitroot/cbi/platform-aggregator.git R4_platform-aggregator
To update existing clone and all submodules
cd R4_platform-aggregator git fetch origin git checkout -b Juno_RC4_R4 origin/Juno_RC4_R4 git pull --recurse-submodules git submodule update
running the build
mvn -f eclipse-parent/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
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 - linux.gtk.x86 - linux.gtk.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=linux.gtk.x86_64
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 under
TMP/org.eclipse.sdk.epp/target/products/
P2 repository
TMP/org.eclipse.sdk.epp/target/repository
Eclipse 3.x Branch
cloning platform source tree
Read-Only Access:
git clone -b Juno_RC4_R3 --recurse-submodules \ git://git.eclipse.org/gitroot/cbi/platform-aggregator.git R3_platform-aggregator
Committer Access:
git clone -b Juno_RC4_R3 --recurse-submodules \ ssh://<userid>@git.eclipse.org/gitroot/cbi/platform-aggregator.git R3_platform-aggregator
To update existing clone and all submodules
cd R3_platform-aggregator git fetch origin git checkout -b Juno_RC4_R3 origin/Juno_RC4_R3 git pull --recurse-submodules git submodule update
running the build
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 under
TMP/org.eclipse.sdk.epp/target/products/
P2 repository
TMP/org.eclipse.sdk.epp/target/repository
Source bundles
TMP/org.eclipse.sdk.epp/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 TMP/org.eclipse.sdk.epp/target/products/org.eclipse.sdk.epp-linux.gtk.x86_64.tar.gz /var/tmp/lts/R3_platform-tests cp TMP/eclipse-junit-tests/target/eclipse-junit-tests-1.0.0-SNAPSHOT-bundle.zip /var/tmp/lts/R3_platform-tests cd /var/tmp/lts/R3_platform-tests unzip eclipse-junit-tests-1.0.0-SNAPSHOT-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.epp-linux.gtk.x86_64.tar.gz you copied earlier to match the name you jotted down.
mv org.eclipse.sdk.epp-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
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