Skip to main content

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

Regarding the location of artifacts, you can specify -publishArtifacts, and this will copy your artifacts from their "custom" location to your repository.

For example, if you have
/somelocation/myfeatures
/somelocation/mybundles

you can call the publisher with
-bundles /somelocatoin/mybundles
-featurs /somelocation/myfeatures
-publishArtifacts

and that will create a repo with a features and plugins directory. 

Although I suspect this isn't want you want.  I wonder if our -inplace option should point to the exact location on disk where the bundles are.

cheers,
ian

On Thu, Jul 9, 2009 at 11:13 AM, Stoilov, Dimo <dimo.stoilov@xxxxxxx> wrote:

Hello,

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 -
org.eclipse.equinox.internal.provisional.p2.metadata.generatorEclipseInstallGeneratorInfoProvider,
method: initialize(File base):
// if the various locations are set in self, use them.  Otherwise compute
defaults
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...)


Thanks,
Dimo


_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev




--
R. Ian Bull | EclipseSource Victoria | +1 250 477 7484
http://eclipsesource.com | http://twitter.com/eclipsesource

Back to the top