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

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

[sourcecode lang=”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>

[/sourcecode]

File compositeArtifacts.xml

[sourcecode lang=”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>

[/sourcecode]

Now you can select features from both sites.


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

About Lars Vogel

Lars Vogel is the founder and CEO of the vogella GmbH and works as Eclipse and Android consultant, trainer and book author. He is a regular speaker at international conferences, He is the primary author of vogella.com. With more than one million visitors per month this website is one of the central sources for Java, Eclipse and Android programming information.
This entry was posted in Eclipse and tagged . Bookmark the permalink.

6 Responses to Eclipse p2 Composite Repositories – All the update sites you ever wanted

Comments are closed.