views:

179

answers:

2

I am currently trying to develop a cross-platform solution that will make some UI components that are not already part of the java standard library available to my java code. I am writing xlib code for X11 and using the relevant win32 api's for windows.

Is it possible (or even recommended?) to setup a java and c code build system using Maven? I need a build system that will compile and link the X11 code and compile and link the win32 code and package them in the jar along with the java interface code. Should I be using Ant to do this?

I have used both build tools before but I don't know which is considered the recommended tool for JNI code.

+1  A: 

It is certainly possible using the native-maven-plugin. I would create a multi-module maven project with separate modules for each of the native interfaces.

Kevin
A: 

It is possible and not contraindicated. I would use the Native Maven Plugin or the Makefile Orchestration Plugin (if you have an existing makefile), with specific modules or profiles for each targeted platform.

Pascal Thivent