I am adding the following dependency to my OSGI bundle:
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4</artifactId>
<version>4.7</version>
</dependency>
But I am getting the following error when I include mycom.myProject.Antlr.* in <Private-Package>
:
ERROR: Bundle mycom.myProject.BundleFile [241] Error starting file:/C:/username/apache-servicemix-7.0.0.M2/deploy/BundleFile-1.0.0.jar (org.osgi.framework.BundleException: Unable to resolve mycom.myProject.BundleFile [241](R 241.76): missing requirement [mycom.myProject.BundleFile [241](R 241.76)] osgi.wiring.package; (&(osgi.wiring.package=org.antlr.v4.runtime)(version>=4.7.0)(!(version>=5.0.0))) Unresolved requirements: [[mycom.myProject.BundleFile [241](R 241.76)] osgi.wiring.package; (&(osgi.wiring.package=org.antlr.v4.runtime)(version>=4.7.0)(!(version >=5.0.0)))])
How can I resolve it?
Bundle-Name: MyProject::BundleFile Bundle-SymbolicName: mycom.MyProject.BundleFile Bundle-Version: 1.0.0 BundleType: MyProject Created-By: Apache Maven Bundle Plugin Import-Package: android.util,javax.jms;version="[1.1,2)",javax.net,javax .net.ssl,javax.security.auth.x500,org.antlr.v4.runtime;version="[4.7,5) ",org.antlr.v4.runtime.atn;version="[4.7,5)",org.antlr.v4.runtime.dfa;v ersion="[4.7,5)",org.antlr.v4.runtime.tree;version="[4.7,5)",org.apache .activemq;version="[5.7,6)",org.apache.camel.osgi,org.osgi.framework;ve rsion="[1.8,2)" Tool: Bnd-1.50.0
– CoderX