You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Lars Fischer <re...@googlemail.com> on 2011/03/25 12:47:20 UTC

[maven-bundle-plugin] no information about not visible packages

Hello,

I played with the new Bndtools from Neil Bartlett
(http://njbartlett.name/2011/03/23/towards-maven-support-in-bndtools.html)
to compare it to the Maven Tycho build tool.

Now I have a question about the usage of maven-bundle-plugin / bnd.
Maybe, this is the wrong place. Then I would be happy to know a better
place to ask.

Tycho uses some Eclipse tools to build OSGi bundles and is aware of
the class visibilitiy depending on the MANIFEST.MF contents. It throws
an error if a not exported class from BundleA will be used in BundleB.

The maven-bundle-plugin does not throw such an error. It creates a
bundle, which will not be able to start because of a missing
dependency to a not exported package.

https://github.com/lfischer/bndtools-investigation shows a small
example. The Bundle "org.example.bndtools.comp" implements two
interfaces from the "org.example.bndtools.api" bundle. The package of
the used interface ISystemComponent is not exported, but the bundle
will be build without any hint.

Is there a way to detect such things at build time?

Best regards,
Lars

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


Re: [maven-bundle-plugin] no information about not visible packages

Posted by Lars Fischer <re...@googlemail.com>.
2011/3/29 Richard S. Hall <he...@ungoverned.org>:
>>
>> But I could not see how to verify JAR files using bnd.
>
> bnd print -verify xya.jar
>

Ok, thank you very much!

Best regards,
Lars

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


Re: [maven-bundle-plugin] no information about not visible packages

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 3/29/11 8:53, Lars Fischer wrote:
> Hello Richard,
>
> 2011/3/25 Richard S. Hall<he...@ungoverned.org>:
>> I believe bnd gives warnings about such situations or at least can be used
>> to verify JAR files. Otherwise, you are correct that maven-bundle-plugin
>> doesn't deal with that at compile time, it is only involved with the
>> packaging phase of the bundle, not the compiling phase.
>>
> Thank you for this information.
>
> But I could not see how to verify JAR files using bnd.

bnd print -verify xya.jar

-> richard

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

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


Re: [maven-bundle-plugin] no information about not visible packages

Posted by Lars Fischer <re...@googlemail.com>.
Hello Richard,

2011/3/25 Richard S. Hall <he...@ungoverned.org>:
>
> I believe bnd gives warnings about such situations or at least can be used
> to verify JAR files. Otherwise, you are correct that maven-bundle-plugin
> doesn't deal with that at compile time, it is only involved with the
> packaging phase of the bundle, not the compiling phase.
>

Thank you for this information.

But I could not see how to verify JAR files using bnd.

Best regards,
Lars

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


Re: [maven-bundle-plugin] no information about not visible packages

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 3/25/11 7:47, Lars Fischer wrote:
> Hello,
>
> I played with the new Bndtools from Neil Bartlett
> (http://njbartlett.name/2011/03/23/towards-maven-support-in-bndtools.html)
> to compare it to the Maven Tycho build tool.
>
> Now I have a question about the usage of maven-bundle-plugin / bnd.
> Maybe, this is the wrong place. Then I would be happy to know a better
> place to ask.
>
> Tycho uses some Eclipse tools to build OSGi bundles and is aware of
> the class visibilitiy depending on the MANIFEST.MF contents. It throws
> an error if a not exported class from BundleA will be used in BundleB.
>
> The maven-bundle-plugin does not throw such an error. It creates a
> bundle, which will not be able to start because of a missing
> dependency to a not exported package.
>
> https://github.com/lfischer/bndtools-investigation shows a small
> example. The Bundle "org.example.bndtools.comp" implements two
> interfaces from the "org.example.bndtools.api" bundle. The package of
> the used interface ISystemComponent is not exported, but the bundle
> will be build without any hint.
>
> Is there a way to detect such things at build time?

I believe bnd gives warnings about such situations or at least can be 
used to verify JAR files. Otherwise, you are correct that 
maven-bundle-plugin doesn't deal with that at compile time, it is only 
involved with the packaging phase of the bundle, not the compiling phase.

-> richard

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

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