Your pom looks fine. It seems that it's a transitive dependency. Take a
look at "libusbjava" pom. Maybe it has this dependency.
Nguyen Tien Luong wrote:
Thanks Vadeg,
In fact I don't need "javax.microedition.io" dependency. I don't know why felix
told me that I must resolve this dependency.
The only thing that I need is libusbjava dependency, but I think there is no problem with
that because the JAR can be installed by FELIX ( no error when I did " start file:
.... libusbjava.1.0.0.jar " on felix)
Here my POM, will be better when you take a look in that :)
<project>
<modelVersion>4.0.0</modelVersion>
<packaging>bundle</packaging>
<groupId>com.moospirit.m2m</groupId>
<artifactId>oregonWMR200Provider</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Oregon WMR200 USB Adapter Provider</name>
<dependencies>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.ipojo.annotations</artifactId>
<version>1.4.0</version>
<type>bundle</type>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<version>4.2.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.moospirit.m2m</groupId>
<artifactId>libusbjava</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>1.4.3</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
<Private-Package>
com.moospirit.m2m.oregonwmr200.host,
com.moospirit.m2m.oregonwmr200,
com.moospirit.m2m.oregonwmr200.constants,
com.moospirit.m2m.oregonwmr200.utils
</Private-Package>
<Import-Package>*</Import-Package>
<Export-Package>
com.moospirit.m2m.oregonwmr200.service
</Export-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-ipojo-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>ipojo-bundle</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
=========================================================================
NGUYEN Tien Luong | M2PGI - UFRIMAG
13 Rue Blanche MONIER | Tel : 06.45.42.46.33
38000 GRENOBLE | http://tienluong.info
________________________________
From: Vadeg <[email protected]>
To: [email protected]
Sent: Tue, 16 March, 2010 10:36:16
Subject: Re: Unresolved constraint in bundle (package=javax.microedition.io)
Are you trying to start felix on JavaME? Your bundle has dependency on
javaME system package "javax.microedition.io". This package must be
loaded via felix system bundle like other core java packages. But for
that, you'll need to start felix on Java ME instance and do the following:
${jme-1.5}
Try to add following lines to your config.properties
org.osgi.framework.system.packages=<some_other_package_definitions>,
${jme-1.5}
jme-1.5 = javax.microedition.io
But I'm afraid it won't start...
The other solution is to start felix in standart JDK, but provide JME
packages via classpath
java -jar felix.jar -classpath "javame_libs"
or build a bundle with JME libs and deploy it to felix.
Do you really need "javax.microedition.io" dependency in your bundle?
What application are trying to deploy in Felix? :)
Nguyen Tien Luong wrote:
Hi Vadeg,
I have <Import-Package>*</Import-Package> in my POM, and when I removed
it, rebuild the JAR but the same error appears.
For systempackages, Do you mean the configorg.osgi.framework.system.packages.extra in config.properties of felix.
I tried to change it to
org.osgi.framework.system.packages.extra=javax.microedition.*
but it didn't work either.
Maybe you have another suggestions ?
Thanks
=========================================================================
NGUYEN Tien Luong | M2PGI - UFRIMAG
13 Rue Blanche MONIER | Tel : 06.45.42.46.33
38000 GRENOBLE | http://tienluong.info