From version 2.4, Artifactory provides advanced support for proxying and caching of P2 repositories and aggregating P2 metadata using an Artifactory virtual repository which serves 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 repositories in Artifactory (both local and remote) providing you with full visibility of the P2 artifact sources and allowing powerful management of caching and security for P2 content.
For more information on defining virtual repositories please refer to Virtual Repositories.
To use P2 repositories, follow the steps below:
Defining a Virtual Repository
Selecting Local Repositories
Adding a local repository to your virtual P2 repository does not require any special configuration:
If you have a Tycho repository deployed to a local repository as a single archive, specify the archive's root path. For example:
Selecting Remote Repositories
To add a remote P2 repository to Artifactory, enter the URL to the corresponding P2 metadata files (
Two common examples are:
Artifactory analyzes the added URL and identifies which remote repositories should to be created in Artifactory based on the remote P2 metadata (since remote P2 repositories may aggregate information from different hosts).
Creating the Repositories
Once you have selected the local and remote repositories to include in your virtual repository, Artifactory will indicate what action will be taken once you select the "Create" button.
The possible actions are as follows:
*For remote repositories only
Once the "Create" action is complete, the URLs that have been added to your virtual repository will be displayed at the top of the screen:
You are now ready to configure eclipse to work with the virtual repository you have created above.
In the Eclipse menu, select Help | Install new Software and then click Add.
In the Add Repository popup, enter the name of you virtual repository and click "OK":
Eclipse will then query Artifactory for available packages and update the screen to display them as below:
Integration with Tycho Plugins
Artifactory fully supports hosting of Tycho plugins as well as resolving Tycho build dependencies.
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
Multiple Remote Repositories with the Same Base URL
When using P2-enabled repositories with multiple remote repositories that have the same base URL (e.g
Configuring Google Plugins Repository
The Google Plugins repository (