You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Ellen Strnod <es...@annealsoft.com> on 2010/12/23 08:14:07 UTC

repackaging existing jars as a bundle

I am repackaging a new release of a 3rd party product which I have a depencency on as an OSGi bundle.  The Apache Felix Maven Bundle Plugin (BND) website does a pretty good job of explaining how to do this but a big issue that was having and found the answer to is at http://stackoverflow.com/questions/1378492/embedding-jars-into-the-osgi-bundle-with-maven-bundle-plugin, which is how to avoid unresolved errors (for packages that will not actually be used at runtime) during the build if all dependencies are not imported, and at runtime if they are, by adding "<Import-Package>*;resolution:=optional<Import-Package>" to the configuration.

I think it would be extremely helpful to other users to include this in the documentation for the plugin.



Re: repackaging existing jars as a bundle

Posted by Guillaume Nodet <gn...@gmail.com>.
If you want some examples, you can have a look at
   http://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/
There are tons of bundles using the maven bundle plugin to repackage
existing jars.

On Thu, Dec 23, 2010 at 08:14, Ellen Strnod <es...@annealsoft.com> wrote:
> I am repackaging a new release of a 3rd party product which I have a depencency on as an OSGi bundle.  The Apache Felix Maven Bundle Plugin (BND) website does a pretty good job of explaining how to do this but a big issue that was having and found the answer to is at http://stackoverflow.com/questions/1378492/embedding-jars-into-the-osgi-bundle-with-maven-bundle-plugin, which is how to avoid unresolved errors (for packages that will not actually be used at runtime) during the build if all dependencies are not imported, and at runtime if they are, by adding "<Import-Package>*;resolution:=optional<Import-Package>" to the configuration.
>
> I think it would be extremely helpful to other users to include this in the documentation for the plugin.
>
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

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