To use P2 repositories, follow the steps below:
If developers in your organization use different versions of Eclipse (e.g. Helios and Juno), we recommend that you define a different P2 virtual repository for each Eclipse version in use.
Adding a local repository to your virtual P2 repository does not require any special configuration:
content.jar, artifacts.jar, compositeContent.xmletc.). If left empty, the default is to assume that the P2 metadata files are directly in the repository root directory.
If you have a Tycho repository deployed to a local repository as a single archive, specify the archive's root path. For example:
To add a remote P2 repository to Artifactory, enter the URL to the corresponding P2 metadata files (
content.jar, artifacts.jar, compositeContent.xml, etc.) and click the "Add" button
A common example is the main Juno repository:
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).
When P2 metadata files reside inside an archived file, simply add '!' to the end of the URL.
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 "Save & Finish" button.
The possible actions are as follows:
|Creates a new, P2 enabled, remote repository with the given key (you may still edit the remote repository key).|
|Enables P2 support in an existing remote repository.|
|Adds the repository to the list of repositories aggregated by this virtual repository.|
|No action will be taken. This repository is already included in the virtual repository.|
*For remote repositories only
You are now ready to configure eclipse to work with the virtual repository you have created above.
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's
pom.xml file as displayed in the snippet below:
<repository> <id>eclipse-indigo</id> <layout>p2</layout> <url>http://localhost:8081/artifactory/p2-virtual</url> </repository>
The P2 virtual repository should contain URLs to all local repositories with an optional sub-path in them where Tycho build artifacts reside.
When using P2-enabled repositories with multiple remote repositories that have the same base URL (e.g
) , you need to ensure that only 1 remote repository is created within your virtual repository (for each base URL). When creating your virtual repository, Artifactory takes care of this for you, but if you are creating the remote repositories manually, you must ensure to create only a single remote repository, and point the sub-paths accordingly in the P2 virtual repository definition.
...but in fact, the virtual repository only really includes one remote repository
The Google Plugin for Eclipse does not support Eclipse 4.7 (Oxygen) or later and is no longer available. For more details please refer to the .
To configure your P2 repository to proxy GWT, set the remote repository URL in Artifactory to be: