Native ARchive plugin for Maven
Java C C++ Shell HTML Objective-C
Clone or download
garlockchristopher and ctrueden Add 'sharedObjectName' flag to enable shared archives on AIX
This enhancement allows users to build shared archives out of their
shared library projects. By setting the sharedObjectName property users
can set the name of the shared object file which will be added to a
shared archive using the output file naming rules before being added to
nar file. This commit also adds a test and documentation for this flag
as well as two more flags which were recently added but not documented.
Latest commit ffe006d Apr 6, 2018

README.md

The NAR plugin for Maven allows you to compile native code (C++, C and Fortran) on a number of different architectures (Linux, Windows, MacOSX, Solaris, FreeBSD, ...) and with a number of different compilers/linkers (g++, Microsoft Visual C++, CC, ...) The output produced is wrapped up in Native ARchive files (.nar) some of which are machine independent (-noarch), while others are machine specific and thus depend on a combination of machine architecture(A), operating-system(O) and linker(L) identified as AOL. These nar files can be installed in the local Maven repository and deployed to a standard Maven (web) server, using the standard maven-install-plugin and maven-deploy-plugin.

Usage

In your POM:

<build>
	<plugins>
		<plugin>
			<groupId>com.github.maven-nar</groupId>
			<artifactId>nar-maven-plugin</artifactId>
			<version>3.5.1</version>
			<extensions>true</extensions>
			<configuration>
				...
			</configuration>
		</plugin>
	</plugins>
</build>

Of course, it is recommended that you use the latest version.

What you put in the <configuration> section will depend on your build; for ideas, see:

Documentation

Community

What about maven-nar-plugin?

This is the official maven-nar-plugin project, renamed to nar-maven-plugin as per Apache Maven's requirements.

Alternatives and Complements