Community
Participate
Working Groups
The p2.index file provides a description of the kind of repository available at a particular location. This file is located next to the p2 metadata files (compositeContent.jar, content.jar, ...) that it describes. It is a java property file. The presence of this file in a repository will cause p2 to replace its default lookup order for repository to match the one specified in the file.
Created attachment 197794 [details] p2 index file This p2.index file is for a p2-repository which has the metadata in jarred form (content.jar, artifacts.jar)
Created attachment 197795 [details] p2 index file for a composite repository This p2.index file is for a composite p2-repository which has the metadata i xml form (compositeContent.xml and compositeArtifacts.xml)
Beyhan, where do you got these examples from? The wiki page [1] suggests a slightly different syntax. The p2.index files are also being discussed in bug 347448. [1] http://wiki.eclipse.org/Equinox/p2/p2_index
(In reply to comment #3) > Beyhan, where do you got these examples from? The wiki page [1] suggests a > slightly different syntax. > The p2.index files are also being discussed in bug 347448. > > [1] http://wiki.eclipse.org/Equinox/p2/p2_index I took them from the wiki page [1]. As it seems the examples were wrong and someone corrected them now. I didn't test them because the effort for a local set up is too high. Anyway, I'll updated them.
Created attachment 199115 [details] updated p2 index file
Created attachment 199116 [details] updated p2 index file for a composite repository
We do this for all our p2 repositories since many releases. Since 3.0 we create .xz compressed files in addition to the old .jar files (e.g. content.jar and content.xml.xz). These files are referenced in the p2.index file like this: version=1 metadata.repository.factory.order= content.xml.xz,content.xml,! artifact.repository.factory.order= artifacts.xml.xz,artifacts.xml,! Closing this bug now.