P2 Repositories

Skip to end of metadata
Go to start of metadata
Table of Contents

Overview

Artifactory supports advanced proxying and caching of P2 repositories, and P2 metadata aggregation (since Artifactory 2.4.0).
An Artifactory virtual repository can serve as a single point of distribution (single URL) for Eclipse, Tycho and any other P2 clients.
This virtual repository will aggregate P2 metadata and P2 artifacts from underlying standard Artifactory remote repositories. This gives you full visibility of the source of P2 artifacts, and allows powerful management of caching and security aspect for P2 content.

Configuring Artifactory

Virtual Repository Configuration

To enable P2 metadata aggregation on a virtual repository, create a virtual repository from Artifactory's UI and select the 'P2' tab.

On this tab, you will need to enable P2 support, and then enter the list of P2 repository URLs you wish to aggregate.

For example:

  1. The main Indigo repository: http://download.eclipse.org/releases/indigo
  2. The Google plugins repository for Indigo (GWT, GAE, etc.): http://dl.google.com/eclipse/plugin/3.7

The URL entered here should point at the path where P2 metadata files are found (artifacts.jar, compositeContent.xml, etc.).

For each external P2 URL added, Artifactory will create a dedicated remote repository with P2 support to manage the proxy cache of the external P2 repository.
When opening the P2 tab, Artifactory will propose to synchronize the existing remote and virtual repositories with the list of URLs. You can manually decide which actions to take for each remote repository:

  1. Create: Creation of a new remote repository with the given key. The remote repo key is editable.
  2. Modify: Update the remote repository setup to support P2.
  3. Include: Adding the remote repository to the list of repositories for this virtual repository.
  4. Included: Everything is correctly configured. No action to take.

P2 Remote Repository

Remote repositories have a "P2 Repository Support" flag, that enables expiration of cached P2 resources (artifacts.jar, compositeContent.xml, etc.).
To enable P2 on a remote repository, browse within Artifactory's UI to the remote repository configuration and select the 'Packages' tab.

P2 Client Configuration

Using Artifactory P2 Virtual Repository in Eclipse

Once the virtual repository is correctly configured, you will need to modify your Eclipse configuration to point at the new P2 Artifactory URL.
For example, if the new virtual repository key is 'p2', you can add the following URL http://yourserver/artifactory/p2 to the list of 'Available Software Sites':

Labels: