Eclipse p2 Composite Repositories - All the update sites you ever wanted

less than 1 minute read

I frequently install new Integration builds from the Eclipse.org website. Afterwards I used to maintain all my desired update sites, for example EGit and Mylyn and install my favorite packages.

Fortunately I met Pascal Rapicault on EclipseCon and he gave me the tip that I could use Composite Repositories. A composite repository allows me to have one update site which point to other repositories.

For example to create an update site for EGit and Mylyn create the following two files, put them in a local directory and create create a new local update site to be able to install both EGit and Mylyn.

File compositeContent.xml

<?xml version='1.0' encoding='UTF-8'?> <?compositeMetadataRepository version='1.0.0'?> <repository name='&quot;Eclipse Project Test Site&quot;' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'> <properties size='1'> <property name='p2.timestamp' value='1243822502499'/> </properties> <children size='1'> <child location='http://download.eclipse.org/egit/updates'/> <child location='http://download.eclipse.org/tools/mylyn/update/e3.4/'/> </children> </repository>

File compositeArtifacts.xml


<?xml version='1.0' encoding='UTF-8'?> <?compositeArtifactRepository version='1.0.0'?> <repository name='&quot;Eclipse Project Test Site&quot;' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'> <properties size='1'> <property name='p2.timestamp' value='1243822502440'/> </properties> <children size='1'> <child location='http://download.eclipse.org/egit/updates'/> <child location='http://download.eclipse.org/tools/mylyn/update/e3.4/'/> </children> </repository>

Now you can select features from both sites.

A very nice feature of p2. Thanks again to Pascal for the advice.

Updated: