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

Equinox/p2/Build

< Equinox‎ | p2
Revision as of 05:43, 12 September 2013 by Kdaniel.redhat.com (Talk | contribs) (Things still to do)

Warning2.png
This is all work in progress. To be able to use those instructions, following patches need to be released
  1. [Bug 416731 - root pom does not have to have parent pom ]
  2. [Bug 416676 - Enabling standalone p2 builds and document how to run the build ]


Executive summary

git clone git://git.eclipse.org/gitroot/equinox/rt.equinox.p2.git
cd rt.equinox.p2
mvn  verify -Declipse-sdk-repo.url=http://download.eclipse.org/eclipse/updates/4.4-N-builds -Dmaven.test.skip=false

Bree build:

mvn  verify -Pbree-libs -Declipse-sdk-repo.url=http://download.eclipse.org/eclipse/updates/4.4-N-builds -Dmaven.test.skip=false

Details

Note: P2 seems to be the first Platform project getting a standalone maven build, so those steps may be useful for others trying to separate their modules and establish CI.

A large, monolitic build of Eclipse Platform [[1]] is not suitable for continuous integration. Following steps were made to ensure that it is possible to build P2 as a standalone project:

Clean up

P2 build must have a single connection with the Platform CBI build. Therefore it is necessary that only one pom.xml file contains a reference to eclipse-platform-parent. In case of P2 it was not the case. [Bug 416731 - root pom does not have to have parent pom].

Note: It is still unverified whether the remaining reference to the eclipse-parent-pom does have to have relative path specified. For the sake of correctness it would be good to remove it, if the platform CBI build will not be broken.

Dependencies

Some Equinox/Platform bundles are necessary to run conclude the build successfully. eclipse-platform-parent has an undocumented feature of partial-build, so when the eclipse-sdk-repo.url property is set, dependencies that are not in the reactor are fetched from the repository pointed by that property. [Nightly build of Eclipse] is a pretty good base for P2 builds.

eclipse-platform-parent

eclipse-platform-parent is a place where a lot of important configuration options is stored. It would be unreasonable to duplicate that information in the p2 poms, so it is necessary to somehow get and use the parent pom. The partial build feature described in a previous point consists of a profile, so it is possible to change that profile to look for dependencies (including poms) in [Eclipse Maven Repository ].

bree-libs

It is possible to add -Pbree-libs to the build. The [bree-libs] profile is inherited from eclipse-platform-parent. If this is ommited, all bundles are compiled against local version of VM.

Tests

Platform build has tests disabled in the eclipse-platform-parent. It is necessary to override that setting by specifying -Dmaven.test.skip=false. Unfortunately some tests are not trivial to adopt to maven, so in order to get a best coverage, the partial-build needs to be able to complete the build despite errors, hence the configuration in the pom <testFailureIgnore>true</testFailureIgnore>.

Hacks and workarounds

eclipse-platform-parent is a bit out of date, therefore it is necessary to add org.eclipse.osgi.compatibility.state dependency to all tests bundles. This issue is caused by changes in Equinox, and it should be removed when a proper, up-to-date eclipse-platform-parent is published to repo.eclipse.org.

Things still to do

  1. test whether a path to eclipse-parent-pom is necessary in the platform CBI build.
  2. find a way to run reconciler tests and disable testFailureIgnore
  3. expose P2 build as an update site

Back to the top