To be clear, the Maven dependency has nothing to do with OSGi, it is
just for building the system.
Since your bundle has dependencies on JNA, maven-bundle-plugin
automatically adds imports for its packages, which is why you are
getting the constraint error.
You could just try create a bundle for JNA and see what happens. Create
a project whose POM simply depends on JNA and exports com.sun.jna.*
(assuming this includes everything you need). Then you can deploy this
bundle to resolve your dependencies.
If JNA cannot be deployed this way, then you could always resort to
putting it on the class path and setting the boot delegation property to
expose all of its packages. The first approach is preferred.
-> richard
On 7/21/09 10:59 AM, Johnny Giacomoni wrote:
Hi everybody !
I work on a project using NetBeans and Maven for iPOJO. In my project, I
need jna.jar for one bundle. So I add in the concerned bundle pom:
<dependecy>
<groupId>com.sun</groupId>
<artifactId>jna</artifactId>
<version>3.0.9</version>
<scope>system</scope>
<systemPath>/home/johnny/project/lib/jna.jar</systemPath>
</dependency>
So, when I use the jna package (com.sun.jna.Pointer or com.sun.jna.Native),
I can use its functions (like native.loadlibrary()). All the project build
successfully.
But when I want to start by bundle (which is the implementation part), Felix
sends me a constraint error on the bundle (packacge com.sun.jna).
So I want to solve after reading:
http://mail-archives.apache.org/mod_mbox/felix-users/200904.mbox/%[email protected]%3e
or
http://osdir.com/ml/users-felix-apache/2009-04/msg00325.html
But i don't know how to put jna.jar un a bundle. I don't understand the way
I can do that.
Someone can help me ?
Thanks.
Have a nice day.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]