>
> I can't find among the bnd switches any which allow for inclusion of
> static/native resources (static because I'd also like to include some
> images which are also not in the original jars), nor does adding these
> resources to the "-classpath:" switch seem to work.
Include-Resource lets you include resources, or directories of
resources, in your bundle - allowing you to map the source location to
the location within the bundle. Works nicely for things like images.
Dave
Kind regards,
Peter Kriens
It seems that the built in ant targets included with bndtools eclipse
plugin don't allow for this level of control. So, I'm going to have to
start a project from scratch.
Ray
--
Raymond Augé (twitter)
Senior Software Architect
Liferay, Inc. (#liferay)
---
Hungary Symposium
May 26, 2011
Register today! www.liferay.com/hungary2011
France Symposium 2011
June 15, 2011
Register today! www.liferay.com/France2011
I'm not sure what you mean by this. Ant gives you exactly as much
control as bnd, because it uses bnd.
Regards,
Neil
i.e. when I setup the project and supply jar files to the wizard, it
always fails to find the native resources define in the bnd.bnd file
(because the default targets try to run "bndprepare" on the jars
before my project has any chance to override the init settings).
It's a "chicken or the egg" problem. I need to manipulate the bnd.bnd
descriptor, but project is always calling the bndprepare ant task on
the jars in the bundle path, but doesn't resolve the native resources
no matter if they are in jars in the bundle path or not!
Maybe I'm going about this the wrong way... but there is no step by
step guide anywhere on how to do this.
This is what is leading me toward the conclusion that the
"wizard-ized" project doesn't handled the scenario I'm trying to
tackle.
FYI, for sake of openness what I'm trying to do is wrap lwjgl
(http://lwjgl.org) in a single OSGi bundle.
So, what was doing was to taking the resources and jars that are
provided (there are ~6-7 jars, and 2 folders worth of resources, some
being the native libraries for the various platforms) and essentially
merge those into a single bundle (exposing of course only the lwjgl
APIs).
- Ray
org.lwjgl
bnd.bnd -> multi descriptor
core.bnd
Include-Resource: \
@jar/lwjgl.jar, \
native/linux/liblwjgl.so, \
native/linux/liblwjgl64.so, \
native/macosx/liblwjgl.jnlib, \
native/solaris/liblwjgl.so, \
native/solaris/liblwjgl64.so, \
native/windows/lwjgl.dll, \
native/windows/lwjgl64.dll
Bundle-NativeCode: ....
util.bnd
Include-Resource: \
@jar/lwjgl_util.jar, \
...
Anyway, this should make it clear how you can set this up. One warning, OSGi cannot handle dependencies between native libraries, you'll have to make sure yourself that libraries are loaded in proper order. Included you find a mail that Holger Hofstatte from Paremus sent to the Apache Felix list that is a very fundamental and great treatise of the subject.
Kind regards,
Peter Kriens
I'll approach it this way.
I'll update the status of this as soon as I get some more free time to
work on it (it's a side project.)
- Ray