Hi again,
Is there noone who knows how to get the Maven/BND plugin to
export/import the same version of an embedded dependency?
To be more specific, here's what I get. The embedded dependency is
exported with (using Maven BND plugin):
Export-Package: ... ,info.aduna.collections, ...
and then the import for it reads:
Import-Package: ... info.aduna.collections;version="2.6" ...
Which causes the bundle to be undeployable, since the export version
does not match the import version. Is there any way I can remove the
version from the import, or even better, add the version to the export?
Note that *some* of the dependencies I have do not specify version on
import. Only some (no pattern). None of the exported jars have versions
specified.
thanks,
Rickard
On 2010-05-14 13.35, Rickard Öberg wrote:
Hi,
I need to bundle all my external jar files in a Maven project into one
bundle. I've gotten some of it to work, but seems to be stumbling on
that the created manifest has a "Export-Package:" that does not specify
the version of the exported jar files, but then the "Import-Package:"
header *does* specify version. I'm assuming that because of this the
version of the exported package is set to that of the bundle as a whole,
which is meaningless.
Here are my Maven BND plugin settings:
<instructions>
<_exportcontents>*</_exportcontents>
<Import-Package>!com.sun.jdmk.comm;!sun.net.spi.nameservice;!org.springframework.beans.factory;!org.springframework.context;!org.springframework.core.io;!org.jdom;!org.jdom.input;!org.jdom.output;!org.mortbay.jetty;!org.mortbay.jetty.servlet;!org.mortbay.log;!org.relaxng.datatype;!org.jboss.resource.adapter.jdbc;!org.jboss.resource.adapter.jdbc.vendor;!org.hibernate.cfg;!org.hibernate.dialect;!org.hibernate.engine;!org.hibernate.mapping;!org.hibernate;!org.apache.log.output.io;!org.apache.log.format;!org.apache.log;!org.apache.commons.logging;!org.apache.bsf.util;!org.apache.bsf;!net.sf.cglib.asm.util;!junit.framework;!antlr;!com.werken.xpath;!javax.portlet;*</Import-Package>
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
<Embed-Dependency>*;scope=compile|runtime;type=!pom;inline=false;artifactId=!jmxri|jmxtools|slf4j-simple</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
</instructions>
This bundle should ONLY contain all the jar files I depend on, and
should export them, and import them, so that I in my app can create
services that use them. Is there any way I can get the Export-Package to
specify versions of the embedded jar files? It seems the above is SO
close, and yet the version part is what I *seem* to be stumbling on.
My server is Glassfishv3, latest, with Felix embedded.
Any ideas?
thanks, Rickard
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]