On 2 February 2010 12:41, Stuart McCulloch <[email protected]> wrote:

> On 2 February 2010 04:00, Ching, Craig <[email protected]> wrote:
>
>> Hi all,
>>
>> You could probably say this is off-topic for this list and more of a BND
>> issue, but I know that there is a lot of BND knowledge here and I want to
>> mimic what the maven bundle plugin does with pure BND as much as I can.  I
>> need the functionality of maven bundle plugin's "Embed-Dependency"
>> configuration, I want my jars to be embedded (inline=false), not inlined.
>>  From reading the code, it appears that embed-dependency is turned into
>> include-resource and bundle-classpath BND directives.  But when I do this:
>>
>> -classpath=com.ibm.mq.jar,connector.jar
>> Include-Resource=com.ibm.mq.jar,connector.jar
>> Bundle-Classpath=.,com.ibm.mq.jar,connector.jar
>> Private-Package=!*
>>
>> BND doesn't seem to pull the Export-Package from the packages in the
>> embedded jars.
>
>
> wrt. automatically setting the Export-Package list from the packages in
> embedded jar
> neither the bundleplugin or Bnd Tool do this - the bundleplugin sets
> Export-Package to
> be the list of packages in your source directories, unless you set it
> explicitly
>
> what you're doing above is basically what the bundleplugin Embed-Dependency
> instruction
> does (the code I linked to in my earlier post does nothing to the
> Export-Package settings)
>
> perhaps you want to use the -exportcontents instruction? this has a similar
> effect on the
> exported packages as Export-Package, but with one important difference: it
> doesn't pull
> classes into the bundle or affect the contents, it just alters the exported
> packages
>
> for example:
>
>    Export-Package: *
>
> inlines all classes/resources on your classpath
>
> whereas:
>
>    -exportcontents: *
>
> export all packages contained in the bundle without affecting the contents
>
> now if the jars you're embedding are bundles and you want their
> Export-Package settings
> combined in the mega-bundle then neither the Bnd Tool or the bundleplugin
> support this,
> but it might be possible to add it as a feature (to either Bnd or the
> bundleplugin)
>
>
>>  Is this something that can be accomplished by BND alone?  Or is this
>> where the maven bundle plugin did some "value add" if you will?  And if the
>> latter, what was done?  I appreciate any help!
>>
>> P.S. In case it's not clear, I am trying to "wrap" some jars into a bundle
>> when our package is installed on the target machine.  We aren't allowed to
>> redistribute the jar files in this case, so we want to turn them into a
>> bundle before use.
>>
>
one last thing: for dynamic wrapping of jars take a look at
http://wiki.ops4j.org/display/paxurl/Wrap+Protocol


> Cheers,
>> Craig
>>
>
> --
> Cheers, Stuart
>

Reply via email to