I'm currently working at a project where I need to transfer PDE style plugins to bnd style plugins. I ran into the problem with external jars so I build up bundles for every jar and included them to the build path. For most of the jars this worked fine but I got one which don't behave as expected.
The org.apache.commons.codec.language. This package comes from the jar org.apache.commons.codec and it resolves fine (at least for bndtools) but when I run the bundle I get the following error:
! could not resolve the bundles: [test-0.0.0 org.osgi.framework.BundleException: Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
]
! Failed to start bundle test-0.0.0, exception Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
org.osgi.framework.BundleException: Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:447)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:431)
at aQute.launcher.Launcher.startBundles(Launcher.java:519)
at aQute.launcher.Launcher.activate(Launcher.java:425)
at aQute.launcher.Launcher.run(Launcher.java:303)
at aQute.launcher.Launcher.main(Launcher.java:149)
In this github repo I extracted one that produces an error as a reference: https://github.com/MaPhil/osgi-externals-test
I googled quite a lot about this topic but the most answers seems to be around liferay or other specific libraries. I hope anyone of you can give me a hint.