You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Nicolas Roduit <ni...@mycable.ch> on 2010/01/23 19:22:39 UTC

How to remove native library reference in the bundle classpath ?

Hi All,

I use maven-bundle-plugin to build a bundle that contains a native 
library. Everything works well except a warning during the compilation:
Valid JAR file on Bundle-Classpath does not have .jar extension: 
target/dependency/libclib_jiio.so

I didn't find a way to prevent the inscription of the native reference 
by bnd in the manifest. When I start this bundle with Equinox, there are 
many many errors in the log file, Equinox seems to search classes  in 
this reference and throws errors like "FrameworkEvent ERROR 
java.util.zip.ZipException: error in opening zip file..."

I have tried to add the <Bundle-ClassPath> tag without success.  Here is 
the bundle configuration:

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<manifestLocation>META-INF</manifestLocation>
<unpackBundle>true</unpackBundle>
<instructions>
<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
<Bundle-Version>${pom.version}</Bundle-Version>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
<_removeheaders>
                             
Bnd-LastModified,Include-Resource,Private-Package,Tool,Built-By,Build-Jdk,Created-By
</_removeheaders>
<_nouses>true</_nouses>
<Import-Package>*</Import-Package>
<Export-Package>!${bundle.namespace}.internal.*,${bundle.namespace}.*;version="${pom.version}"</Export-Package>
<Bundle-NativeCode>target/dependency/libclib_jiio.so; processor=x86; 
osname=Linux</Bundle-NativeCode>
<Embed-Directory>target/dependency</Embed-Directory>
<Embed-StripGroup>true</Embed-StripGroup>
<Embed-StripVersion>true</Embed-StripVersion>
<Embed-Dependency>*;scope=compile;inline=false</Embed-Dependency>
</instructions>
</configuration>
</plugin>

Thanks,

Nicolas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org