2009/9/27 Niclas Hedhman <[email protected]>

> On Sun, Sep 27, 2009 at 11:28 AM, Gargan, Stephen <[email protected]>
> wrote:
>
> > It's really an issue with the bundle plugin works. When this line was
> present in the bnd file, (I'm guessing because it didn't find the Activator
> class in the project), the plugin generates an import statement this
> package. I'd imagine if the class was present in the project, private or
> otherwise, it would not bother.
>
> Ok, so what you are saying; "If the maven-bundle-plugin doesn't have
> the package that the Bundle-Activator is using, it will add an
> Import-Package of such." ??
>
> IMHO, this is perhaps questionable behavior of the plugin. Stuart, do
> you have any insight into why this is the case? AFAIK, it was never
> intended that Bundle-Activators for activatable bundles were located
> in Library bundles. And if so, then the plugin shouldn't import the
> package, but instead force an error (or at least a warning).
>

Bnd has no knowledge that your bundle is a library or an active bundle,
it simple sees a reference to a package that is not contained inside the
bundle and generates an import clause for it.

I've seen people intentionally share Bundle-Activators between bundles,
and AFAIK this is allowed by the OSGi specs - so it would be wrong to
disallow it by throwing an error.

I guess a warning might encourage best-practice of keeping activators
private, so feel free to log an issue (note: this would actually require a
change to Bnd, so no guarantees of getting such a warning added)

Cheers
> --
> Niclas Hedhman, Software Developer
> http://www.qi4j.org - New Energy for Java
>
> I  live here; http://tinyurl.com/2qq9er
> I  work here; http://tinyurl.com/2ymelc
> I relax here; http://tinyurl.com/2cgsug
>
> _______________________________________________
> general mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/general
>

-- 
Cheers, Stuart
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to