Use bnd to just generate manifest?

160 views
Skip to first unread message

Steele, Richard

unread,
Mar 9, 2011, 1:28:34 PM3/9/11
to bndtool...@googlegroups.com
Is there an option to use bnd to only generate the manifest file?

I'm finding it exceptionally difficult to change existing Ant build scripts that traditionally used the <jar> task to use <bnd> instead.  It would simplify matters if I could use bnd to generate the manifest and then use that manifest in the standard Ant <jar> task.

Thanks,
Rich

Steele, Richard

unread,
Mar 9, 2011, 2:04:41 PM3/9/11
to bndtool...@googlegroups.com
I think I answered my question by looking at the source code: if I use a combination of -savemanifest and -nobundles I can get the behavior I want.

I feel a little dirty doing it though, since I can't find these documented.  Is it prudent to depend on these options?

Thanks,
Rich

Steele, Richard

unread,
Mar 9, 2011, 2:44:40 PM3/9/11
to bndtool...@googlegroups.com
And I stand corrected: -nobundles will also not save the manifest even if -savemanifest is set.

Rich

Peter Kriens

unread,
Mar 10, 2011, 2:36:43 AM3/10/11
to bndtool...@googlegroups.com
Well, just jar it with the jar task and then let bnd wrap that jar with a bnd file like?

Incude-Resource: xyz.jar
-exportcontents: com.acme.*

You can of course also just ignore the output of bnd, so just let it create a dummy jar?

I could probably find someone to create a bnd task that supports the same options as the jar task, but this would have to be funded.

Kind regards,

Peter Kriens

Steele, Richard

unread,
Mar 10, 2011, 8:31:35 AM3/10/11
to bndtool...@googlegroups.com
I'm taking the second approach: saving the manifest and then deleting the generated jar.

Thanks,
Rich
Reply all
Reply to author
Forward
0 new messages