Apache Maven 1.x has reached its end of life, and is no longer supported. For more information, see the announcement. Users are encouraged to migrate to the current version of Apache Maven.

Native Plugin Properties

Property Optional? Description
maven.jni.dest Yes

Default value is ${maven.build.dir}/jni.

maven.native.src Yes

Directory for native source files. Default value is src/unix.

maven.native.src.includes Yes Specifies a list of patterns to include into the native compile process. Default value is **/*.h **/*.c **/*.cpp.
maven.native.src.excludes Yes Specifies a list of patterns to exclude from the native compile process. Default value is empty.
maven.native.link Yes

Sets the output file type. Supported values "executable", "shared", and "static". Default value is shared.

maven.native.compiler.name Yes

Sets compiler type. Default value is gcc.

maven.native.linker.name Yes

Sets linker type. Default value is ${maven.native.compiler.name}.

maven.native.debug Yes

If set true, all targets will be built for debugging. Default value is true.

maven.native.include.os Yes

JDK directory for plattform depended include files. Default value is linux.

maven.native.compiler.target Yes Optional compiler target. Used for cross compile. arm-linux means that arm-linux-gcc is used.
maven.native.linker.target Yes Optional linker target. Used for cross compile. Default value ${maven.native.compiler.target}
maven.native.compiler.arg.start|mid|end Yes Space delimted list of optional compiler arguments. start|mid|end spcifies the position in the compiler argument list.
maven.native.linke.arg.start|mid|end Yes Space delimted list of optional linke arguments. start|mid|end spcifies the position in the linker argument list.
maven.native.compile.includepath Yes Space delimted list of optional include pathes.
maven.native.compile.sysincludepath Yes Space delimted list of optional system include pathes.

Dependencies on native libraries

Dependencies on native libraries can be handled by the maven dependency mechanism. The property native.syslib is optional. If set the syslibset tag is used insted of the normal libset tag. sos and dlls are supported a the moment.

    <dependency>
      <groupId>group</groupId>
      <artifactId>libmyDependendLib</artifactId
      <version>1.0</version>
      <type>so</type>
      <properties>
        <native.syslib>true</native.syslib>
      </properties>
    </dependency>