Artifactory supports advanced proxying and caching of P2 repositories and P2 metadata aggregation (since Artifactory 2.4).
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 aggregates P2 metadata and P2 artifacts from underlying standard local and remote repositories in Artifactory. This provides you with full visibility of the P2 artifact sources and allows powerful management of caching and security aspects for P2 content.
Virtual Repository Configuration
To enable P2 metadata aggregation on a virtual repository, create a Virtual Repository from Artifactory's user interface and select the 'P2' tab.
On this tab, you must enable P2 support and then add either a local repository that hosts your P2 metadata and content or remote P2 repository URLs you want to aggregate.
P2 Local Repository
Local repositories do not have any P2 dedicated configuration, choose the desired local repository from the repositories combo box and add a sub path pointing to the P2 metadata files (
If you have a Tycho repository deployed to a local repository as a single archive, specify the archive's root path. For example: 'eclipse-repository.zip!/'.
For each local repository added, you can (and should) include the repository in the list of (local and remote) repositories aggregated by this virtual repository.
The following options are proposed for a remote repository in the repositories list table:
P2 Remote Repository
Select a P2 repository URL to add to Artifactory. The URL entered here should point at the path where P2 metadata files are found (
Artifactory analyzes the added URL and based on the remote P2 metadata, identifies which remote repositories are required to be created in Artifactory (remote P2 repositories may aggregate information from different hosts).
For each identified remote repository you can (and should) create and include the repository in the list of (local and remote) repositories aggregated by this virtual repository.
Integration with Tycho Plugins
Artifactory fully supports hosting of Tycho plugins as well as resolving Tycho build dependencies.
In order to resolve all build dependencies through Artifactory, simply change the repository URL tag of your build POM.xml file and point it to a dedicated virtual repository inside Artifactory
The P2 virtual repository should contain URLs to all local repositories with an optional sub path in them where Tycho build artifacts reside.
P2 Client Configuration
Using Artifactory P2 Virtual Repository in Eclipse
Once the virtual repository is correctly configured, you must 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