True, but I meant that when there are two plugins P1 and P2 that need dependency D, and P1 is embedding dependency D and exporting it's packages, then P2 can depend on P1. On the other hand if the user wishes to use only plugin P2 and does not need plugin P1, he needs to install the latter anyway. Had D been packaged as an OSGi bundle, both P1 can P2 depend on that bundle and not on one another.

Cheers,
Rafał


On 09/14/2011 03:39 PM, Matthew Piggott wrote:
Actually, packages can be exported from nested jars in the bundle's manifest. For example org.eclipse.m2e.maven.runtime embeds maven and aether which are available to other bundles.

Matthew

2011/9/13 Rafał Krzewski <[email protected] <mailto:[email protected]>>

    Indeed, stuffing a jar into the plugin bundle is probably the
    easiest approach, but it has an obvious deficiency - you cannot
    share a dependency jar packaged this way among different plugins.

    Last time I looked, tycho did not provide generic OSGi bundle
    packaging, but wait! Tycho is not the only tool in Maven world for
    OSGi development. Look here:
    http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
    This plugin can build an arbitrary bundle out of the classes on a
    project's classpath. After building the bundle you'd need to
    publish it in a P2 repository and add it to your connector
    project's target platform, so that Tycho could use it for building
    your plugin. If you think this is awfully complex compared to what
    we do everyday with Maven, I totally agree :) If you just need to
    use one jar in one plugin, stuff it inside and be done with it.

    Cheers,
    Rafał


_______________________________________________
m2e-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to