Copyright © 2009, 2010, 2011, 2012, 2013 Lars Vogel
|Revision 0.1 - 6.1||14.02.2009 - 12.07.2013||Lars
|bug fixes and enhancements|
|Revision 6.2 - 6.4||1.10.2013 - 04.12.2013||Hendrik
|Updating platform build description and Unit testing section.|
Table of Contents
The Eclipse source code is available via the Git version control system. The following list contains the relevant Git repositories for the Eclipse platform source code.
// Eclipse platform UI plug-ins git://git.eclipse.org/gitroot/platform/eclipse.platform.ui.git // Eclipse platform main repositories git://git.eclipse.org/gitroot/platform/eclipse.platform.git // Eclipse 4 platform runtime git://git.eclipse.org/gitroot/platform/eclipse.platform.runtime.git
To create a local clone of this source code use the
Git online tutorial
or the "Distributed Version Control with Git: Mastering the Git
command line" (ISBN-10: 3943747069) book for an introduction into the
usage of the Git
The Eclipse project has a simultaneous release every year at the end of June. In June 2013 Eclipse 4.3 was released.
For Eclipse platform development you typically need to download on of the recent integration builds to compile the platform code. The Eclipse project creates regular builds of the next releases. You find Stable Builds which are tested by the community. These milestone (M) and release candidate (RC) builds are created based on a predefined time schedule.
Integration, Nightly and Maintenance builds are test builds which are automatically created. They do are not manually tested.
In general milestone and RC builds are relative stable compared to integration builds but may not contain the latest features and patches.
You find the builds for the next Eclipse release under the following URL: Eclipse download page .
Eclipse provides a Maven based build system for automated build and allows you to build the Eclipse IDE locally. The results of this build are archive files for the different platforms, which include every thing to run as normal Eclipse IDE. The resulting IDE is based on the source code of the current development status, so results and requirement will change from time to time.
The build itself takes around 2 hours on a Core i5 machine with SSD, so of course time is required for this. Also approximately 25 Gigs of free space and 4 Gigs of ram are required on the hardware-side. Building of an Eclipse IDE is possible on Windows, OSX and Linux based distributions. This tutorial is tested with Linux.
On the software-side the following programs are required:
Check if your JVM runs in Server mode, by checking the version.
java -version java version "1.7.0_09" Java(TM) SE Runtime Environment (build 1.7.0_09-b05) Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)
You also have to assure that Maven has enough memory, to avoid a java.lang.OutOfMemoryError exception.
You download the newest version of the source code by cloning the eclipse.platform.releng.aggregator repository and it's submodules via Git.
git clone -b master --recursive git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git
The build requires that for the version numbers of the single Maven artifacts and it's Eclipse plug-ins be in sync. But sometimes developers forget to update this version numbers, so we first have to run a Maven goal to correct, eventually existing inconsistencies.
mvn -Dtycho.mode=maven org.eclipse.tycho:tycho-versions-plugin:update-pom
Now we can run the build.
# clean up "dirt" from previous build # see Bug 420078 git submodule foreach git clean -f -d -x git submodule foreach git reset --hard HEAD git clean -f -d -x git reset --hard HEAD # update master and submodules git checkout master git pull --recurse-submodules git submodule update # run the build mvn clean verify
The Eclipse platform has a Hudson build instance which can be found under the following URL: Eclipse platform Hudson . This build instance is currently not used for the main build, only to validate Gerrit contributions. See Bug report for migrating the platform build to Hudson and
To have a reproducible and stable build, it is possible to switch to a specific version instead of using the newest source code. For this the aggregator repository has tags for example every release build. To build e.g. R4_3 you just have to check this specific tag out and start the build like the following:
git checkout tags/R4_3 git submodule update #run the build mvn clean verify
The CBI build still depends on external resource like p2 update sites. From time to time this resources change or will become unavailable. The R4_3_1 tag for example depends on a removed update site, so you have to add the new url to the update site via a parameter to the build:
git checkout tags/R4_3_1 git submodule update #run the build mvn clean verify -Dlicense-repo.url=http://download.eclipse.org/cbi/updates/license/
Currently the Eclipse platform project does not tag the milestone releases. See Bug report. So you have to match the milestone and integration tag manually. You can compare the URL on the Eclipse download page, for example S-4.4M2-201309182000 matches the I20130918-2000 tag.
To speedup the build, it is possible to disable the api-generation.
mvn clean verify -P!api-generation
A normal CBI Build shows, "Build id: @build@" in the "About Eclipse
SDK" window. To define a custom build id use the
parameter and the
mvn clean verify -DbuildId=foobar -Pupdate-branding-plugins
It is also possible to build just single parts of the aggregator
repository, by passing the
The following example shows how to build just the
cd rt.equinox.framework \ mvn -Pbuild-individual-bundles clean verify
The Fedora project has removed some non Eclipse IDE related plug-ins to speed up the build process. See Fedora build script .
In case you are changing the Eclipse platform code you should ensure that the platform still performs as planned. In this case you should run the existing Eclipse platform tests to validate your changes.
Clone the following Git repositories as these contains the existing unit tests.
Eclipse comes with tests for every component. In this section the unit testing of the JFace component will be described.
The unit tests for the JFace Bundle are placed in the org.eclipse.ui.tests plug-in. This plug-in includes also several other tests for the plattform.ui.
To run this tests import the following plug-ins are needed:
It is also required to have a API Baseline configured. You do this by→ → → . For example you can set the baseline again your current IDE installation.
To test the full JFace TestSuite, you only need to run the
run configuration from the
The Eclipse platform unit test start an Eclipse IDE and visually interacts with it. This screen flickering can be annoying. You can use a virtual server and execute the tests on this virtual device.
On Ubuntu you can install the virtual server and the client (which is not required just for the unit tests) via the following commands.
# install the server sudo apt-get install vnc4server # optionally install the client sudo apt-get install xtightvncviewer
You start the server with the following parameters.
# start the server on display #1 vncserver :1 -name testing -depth 24 -geometry 1280x1024
In the Eclipse launch configuration you can set the display which should be used.
If you want to watch the unit tests you can also connect to the virtual server via the vncclient.
# connect to the server, IP will be asked vncviewer
The performance tests allow you to analyze the performance of various actions (e.g.: UIStartup) of the eclipse platform.
To run the tests you have to choose the org.eclipse.core.tests.runtime.perfAllTests.java from the org.eclipse.core.tests.runtime bundle
As result you get detail performance information like the following from the console:
Scenario 'org.eclipse.core.tests.runtime.perf.UIStartupTest.testUIApplicationStartup' (average over 1 samples): System Time: 16.037,55d (no confidence) Used Java Heap: 91,25M (no confidence) Working Set: 446M (no confidence) Elapsed Process: 11,93s (no confidence) Kernel time: 750ms (no confidence) CPU Time: 27,7s (no confidence) Hard Page Faults: 22 (no confidence) Soft Page Faults: 172,24K (no confidence) Text Size: 4K (no confidence) Data Size: 0 (no confidence) Library Size: 3,79G (no confidence)
If you find problems in the Eclipse platform or the e4 tooling you can open bugreport via the following links.
Bug report for the Eclipse platform https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=UI Bug report for the e4 tooling project (Eclipse 4 Wizards and application model editors) https://bugs.eclipse.org/bugs/enter_bug.cgi?product=e4&component=UI
The following URL lists the official builds for the Eclipse e4 tooling project.
The e4 tools are also available as via their Git repository.
// Eclipse e4 tooling git://git.eclipse.org/gitroot/e4/org.eclipse.e4.tools.git // Some e4 demos, not required, not always working git://git.eclipse.org/gitroot/e4/org.eclipse.e4.ui.git
You can build the e4 tools locally via Maven Tycho. If you have Maven installed on your machine the build process is trivial.
Clone the e4 tools project with the following command.
// clone e4 tooling git clone git://git.eclipse.org/gitroot/e4/org.eclipse.e4.tools.git
Afterwards you can build the e4 tools locally.
cd org.eclipse.e4.tools mvn clean verify
After the build finishes successfully, you find a p2 update site in the following folder.
Eclipse also has a Hudson job configured which run the daily build jobs. See https://hudson.eclipse.org/sandbox/job/e4-tools/
Maintaining high quality free online tutorials is a lot of work. Please support free tutorials by donating or by reporting typos or errors.
If you find errors in this tutorial, please notify me (see the top of the page). Please note that due to the high volume of feedback I receive, I cannot answer questions to your implementation. Ensure you have read the vogella FAQ as I don't respond to questions already answered there.