Developers, Developers, Developers! Maksim Sorokin IT Blog

8Dec/10Off

Hints on Depending on Online P2 Repositories in the Target Platform

Depending on online P2 repositories in the target platform is not that bad, is it may look like. In Eclipse world there is no such thing as a released stuff. Everything is released when it is built. However, when a bundle is built with the same version, then it still has different timestamp.

Assume you have a target platform, in which you depend on a specific feature in online p2 repository of Helios. If you open file with a text editor, you will see something like the following:

<location includeAllPlatforms="false" includeMode="slicer"
    type="InstallableUnit"> <unit
            id="org.eclipse.emf.sdk.feature.group"
            version="2.6.1.v20100914-1218" /> <repository
            location="http://download.eclipse.org/releases/helios" />
</location>

So even if a new release of "org.eclipse.emf.sdk.feature.group" with the same 2.6.1 version is done, it will have different timestamp! So no problems in that.

However, the problem is, that when you update the software site in your target platform in order to choose another dependency, it may update the version of previous feature to the newest one, which may break your build. The solution is to depend on different feature of the same p2 repository in different software update sites. So instead of:

Have:

In this case, when you will update the version of one feature, the other one will remain.

Of course, there is still a problem on depending on online p2 repositories since one day they may die. But you can mirror those on your servers and depend on mirrored ones, instead of untrusted remote ones.