[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] Questions about P2 metadata generation APIs

Title: Questions about P2 metadata generation APIs


I have a couple of questions regarding bundles installation via p2. Our case is: having paths to the bundle jars, we want install them. Could you recommend the proper API for this?

Currently to do this, we generate p2 metadata and install the bundles as follows:
new FeaturesAndBundlesPublisherApplication().run(args);
new DirectorApplication().run(args1);

1) are these APIs proper, and if not, could you recommend the right ones
2) regarding the p2 metadata generation: I tried with both EclipseGeneratorApplication and FeaturesAndBundlesPublisherApplication, but in both cases, in the artifacts.xml we got <rule filter='(&amp; (classifier=osgi.bundle))' output='${repoUrl}/plugins/${id}_${version}.jar'/>.

The problem is our bundles are on a custom location - different from plugins folder. Is it possible to specify custom location?

As far as I investigated:
a) In the FeaturesAndBundlesPublisherApplication case "plugins" is hardcoded in SimpleArtifactRepository.DEFAULT_MAPPING_RULES and PACKED_MAPPING_RULES

b) in the EclipseGeneratorApplication case -
method: initialize(File base):
// if the various locations are set in self, use them.  Otherwise compute
File[] bundles = bundleLocations == null ? new File[] {new File(base,
"plugins")} : bundleLocations; //$NON-NLS-1$

bundleLocations is null, and thus the default location - base/plugins - is
computed. I reported bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=282873 regarding this (still no answer...)