I am having problems with MANIFEST.MF generated by the maven-bundle plugin. For some reason, when I have the version numbers listed in the field <Import-Package>, OSGi does not download my package.
I experimented and noticed that if I delete the version numbers in the manifest, then the package will load correctly.
How can I tell maven-bundle-plugin to skip version numbers?
It currently generates:
Import-Package: com.ghc.ghTester.expressions,org.apache.ws.security.proc
essor;version="[1.5,2)",org.apache.ws.security;version="[1.5,2)",org.ap
ache.ws.security.message;version="[1.5,2)",org.apache.ws.security.compo
nents.crypto;version="[1.5,2)",org.apache.ws.security.message.token;ver
sion="[1.5,2)"
But I need to generate it:
Import package: com.ghc.ghTester.expressions, org.apache.ws.security.proc Essor, org.apache.ws.security, org.apache.ws.security.message, org.apache. ws.security.components.crypto, org.apache.ws.security.message.token
My plugin configuration:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${pom.groupId}.${pom.artifactId};singleton:=true</Bundle-SymbolicName>
<Bundle-Name>${pom.name}</Bundle-Name>
<Bundle-Version>${pom.version}</Bundle-Version>
<Bundle-ClassPath>{maven-dependencies},.</Bundle-ClassPath>
<Embed-Dependency>*;scope=compile</Embed-Dependency>
<Export-Package/>
<Import-Package>com.ghc.ghTester.expressions,org.apache.ws.*</Import-Package>
</instructions>
</configuration>
</plugin>
, :
org.osgi.framework.BundleException: Could not resolve module: com.rit.message-level-security [978]
Unresolved requirement: Import-Package: org.apache.ws.security; version="[1.0.0,3.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:412)
at com.ghc.ghTester.Activator.installTempBundle(Activator.java:157)