felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stuart McCulloch (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-287) import resources and BND
Date Wed, 24 Oct 2007 09:28:50 GMT

    [ https://issues.apache.org/jira/browse/FELIX-287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537251

Stuart McCulloch commented on FELIX-287:

Hi Costin - how are you wrapping the JTA artifact?

If you're using the Private-Package:* technique then yes, resources will not get copied because
Bnd only sees classes in packages.

You should use Include-Resource to instruct Bnd to add non-class resources such as license
files - thankfully there is a very simple way to do this with the latest snapshot of the bundle-plugin.
If you add the artifact to be wrapped as an optional dependency then you can use the <Embed-Dependency>
instruction to inline the contents inside the final bundle.

( this basically translates to an Include-Resource entry for the artifact, with optional setting
to get Bnd to inline instead of embed )

You can then use the new <_exportcontents> instruction to export the contents of the
bundle without affecting the calculation, ie:


This acts like Export-Package, except it doesn't pull classes into the final bundle - it just
affects the manifest generation and was added explicitly to help when wrapping artifacts where
you may not know what packages are inside them.

See the attached pom file, where I use this to wrap the Geronimo JTA jar as well as the docs
for the new embed / Bnd instructions:

   http://felix.apache.org/site/maven-bundle-plugin-bnd.html        (search for Embedding

HTH  (btw, the example pom was generated using Pax-Construct then tweaked to remove references
to the pax-plugin)

> import resources and BND
> ------------------------
>                 Key: FELIX-287
>                 URL: https://issues.apache.org/jira/browse/FELIX-287
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>            Reporter: Costin Leau
>            Assignee: Stuart McCulloch
>            Priority: Minor
>         Attachments: pom.xml
> from mailing list:
> > Import-Resource
> >
> > Besides allowing it to work alongside 1), it would be nice if the
> > resources found inside the classpath could be copied automatically. This
> > might be difficult, I realize, but at least some patterns might be used.
> >
> This one needs some thinking - the BND tool has a 'pull' approach, which
> means it only includes what you ask it to include. This is great for doing
> different builds from the same classpath, but means u need to be specific.
> If this was added, would probably be a non-default option. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message