felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sascha Vogt <sascha.v...@gmail.com>
Subject Re: maven-bundle-plugin bundle:manifest and import packages
Date Wed, 16 May 2012 09:37:55 GMT
Hi again,

Am 14.05.2012 13:51, schrieb Sascha Vogt:
> I'm currently struggling with the maven-bundle-plugin. I'm using the
> manifest goal to create our OSGi-enabled manifest, which is then
> packaged with the default jar plugin (reason why I don't use it to
> produce the final Jar is because I need to exclude a few classes and if
> I didn't miss anything, this isn't possible with the bundle plugin, see
> https://issues.apache.org/jira/browse/FELIX-1119)
> 
> I now have a dependency which I need to include and therefore the bundle
> plugin should ignore these packages when generating the import. I added
> the proper  <Import-Package>!com.mydep.*</Import-Package> instruction,
> but this makes the bundle plugin to produce a manifest, with an
> Ignore-Package header (Ignore-Package: com.mydep.a,com.mydep.b) but
> still include the package in the Import-Package header.
> 
> Any hints on why the bundle-plugin does this?

I found a "workaround"(?): By declaring the same packages as
<Private-Package> the produced manifest looks ok. So I now have:
<instructions>
   <Import-Package>!com.mydep.*,*</Import-Package>
   <Private-Package>com.mydep.*</Private-Package>
</instructions>

Nevertheless, I would be glad, if someone could shed a bit of light on
how that is intended to work.

Greetings
-Sascha-

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message