On Mon, Feb 1, 2010 at 10:28 PM, Stuart McCulloch <[email protected]> wrote:

> On 2 February 2010 04:00, Ching, Craig <[email protected]> wrote:
>
>
> The Embed-Dependency instruction is specific to the maven-bundle-plugin
> because
> the Bnd Tool does not know anything about Maven or its artifact dependency
> graph.
>
> Think of it as a pre-processor step: the bundleplugin takes the
> Embed-Dependency
> instruction along with the dependencies from Maven and generates the
> appropriate
> general-purpose Include-Resource and Bundle-ClassPath entries used by Bnd.
>

Right, I'd have thought that BND could do this with the -classpath option,
but it can't?  I can get the jars embedded, but BND isn't calculating the
Export-Packages, is that something that the maven bundle plugin does that
BND can't do?


>
> The code to do this is in its own file and should be straightforward to
> follow:
>
>
>
> http://svn.apache.org/repos/asf/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java


Yeah, I've looked at that, but I don't see where it's telling BND to
generate the Export-Packages from the maven artifacts.  It seems to just
specify resources to be included, but I don't see where it goes through the
jar finding the packages to be exported.


>
>
> But note that if you're running this outside of Maven you'll have to find
> some way
> to pass in the dependency list (either that or use Maven in an embedded
> form).
>

Maven in embedded form is an interesting concept and might be the way for me
to go, but I was really trying to make this as light-weight as possible by
getting to the core of the implementation.  I was thinking a little
javascript to find the jars and then BND to bundle them up ;-)


>
> HTH
>
>
Indeed, thanks for the help!

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

Reply via email to