if your projects/bundles are have a clean package separation then you should just export exactly this one using Export-Package. say for project "cake" <Export-Package>org.cheese.cake.*<Export-Package> The Export-Package section of http://cwiki.apache.org/FELIX/maven-bundle-plugin-bnd.html describes the behaviour pretty good. As Stuart described, you may use an appropriate scope upfront for your dependencies but using a plain asterisk for export-package is always not the osgi-way ;-) Better try to be explicit.
/toni -------- Original-Nachricht -------- > Datum: Tue, 9 Oct 2007 16:18:48 +0800 > Von: "Stuart McCulloch" <[EMAIL PROTECTED]> > An: [email protected] > Betreff: Re: Export-Package generated by maven-bundle-plugin > On 09/10/2007, Rajini Sivaram <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > > I am using maven-bundle-plugin (version 1.0.0) to generate bundles - I > > have > > a set of maven projects with some interdependencies and I am generating > > one > > bundle per project. I would like to specify that the Export-Package for > > each > > bundle is the set of packages defined in that module (maven project). I > > tried <Export-Package>*</Export-Package>, but that seems to include all > > the > > classes from the module and its dependencies. Is there a simple way to > > specify that the classes exported should only come from the classes in > the > > project and not from its dependencies (so that packages from dependent > > modules are merely imported). > > > as you're using 1.0.0, try setting <scope>provided</scope> for your > dependencies > - this will mean they are used during compilation, but won't appear on the > BND path > > however, setting <Export-Package>*</Export-Package> is discouraged, as you > end > up making all your classes public, which means you miss out on > encapsulation > and > don't get the full benefit of OSGi > > version 1.1.0-SNAPSHOT of the bundleplugin provides a new instruction that > lets you > export the final contents of the bundle, e.g.: > <_exportcontents>*</_exportcontents> > without affecting the contents themselves > > Thank you... > > > > Regards, > > > > Rajini > > > > > > -- > Cheers, Stuart
