You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by jtkb <ka...@avionicengineers.com> on 2015/12/05 23:40:45 UTC
Using maven-bundle-plugin with nar-maven-plugin
I'm trying to use the nar-maven-plugin with maven-bundle-plugin as I
want to create a bundle which contains a native library. Unfortunately I
have one small hurdle I cannot overcome.
No matter how I try to configure the plugins in the POM, I cannot get
the final archive to be named '.jar' it will only be '.nar'.
This is the relevant parts of my POM to configure the plugins:
<build>
<plugins>
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<version>3.2.3</version>
<extensions>true</extensions>
<configuration>
<output>.. removed for brevity...</output>
<libraries>
<library>
<type>jni</type>
</library>
</libraries>
<javah>
<jniDirectory>${basedir}/target/nar/jni</jniDirectory>
</javah>
<c>
<includePaths>
<includePath>${basedir}/target/nar</includePath>
</includePaths>
</c>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
<executions>
<execution>
<id>default-bundle-package</id>
<phase>package</phase>
<goals>
<goal>bundle</goal>
</goals>
<configuration>
<packaging>jar</packaging>
<!--<outputDirectory>target/bundle</outputDirectory>-->
<supportedProjectTypes>
<supportedProjectType>jar</supportedProjectType>
<supportedProjectType>bundle</supportedProjectType>
<supportedProjectType>nar</supportedProjectType>
</supportedProjectTypes>
<instructions>
.. Removed for brevity ..
</instructions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
a few things to point out :
1. I'm using an old version of the maven-bundle-plugin but using version
3.0.1 makes no difference
2. The <package> configuration makes no difference whatsoever in the build
3. Using the <outputDirectory> doesn't force the output directory either
but just seems to cause the build to throw warnings.
Can anyone assist?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org