I am trying to build an C++ application for both x86/amd64 and ARM with the Maven NAR plugin on Debian/Ubuntu. I've troubles to set up a correct profile for the ARM cross-compile build with arm-linux-gnueabi-gcc.
The profile snippet from my pom.xml looks like this:
<profile>
<id>arm-linux-cross</id>
<properties>
<debug.option>true</debug.option>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<configuration>
<arch>arm</arch>
<cpp>
<name>arm-linux-gnueabi-g++</name>
<options>
<option>-march=armv5</option>
</options>
</cpp>
<linker>
<name>arm-linux-gnueabi-gcc</name>
<sysLibs>
<sysLib>
<name>stdc++</name>
</sysLib>
...
</sysLibs>
</linker>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Building that profile with `mvn compile -P arm-linux-cross' does not work:
[INFO] Using AOL: amd64-Linux-arm-linux-gnueabi-gcc
[INFO] ------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------
[INFO] Total time: 1.464s
[INFO] Finished at: Fri Feb 13 11:00:05 CET 2015
[INFO] Final Memory: 10M/147M
[INFO] -----------------------------------------------------------
[ERROR] Failed to execute goal com.github.maven-nar:nar-maven-plugin:3.0.0:nar-validate (default-nar-validate) on project sirka-model: Cannot find version number for linker 'arm-linux-gnueabi-gcc' -> [Help 1]
Obviously the AOL used here is not available so Maven does not recognize the compiler/linker. But how can I add the required AOL? Or is there another way to cross-compile for ARM with Maven?