You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Richard van der Hoff <ri...@mxtelecom.com> on 2006/06/14 18:55:41 UTC

Re: suggestions for handling native libraries

A while ago, I posted here asking for help with using Maven to handle 
projects which make use of JNI code.

I was met by a stony wall of silence at that time... Anyway, a month 
later, and after quite a lot of thinking, hacking and tweaking, I've 
come up with a solution I'm reasonably happy with.

I've written it all up at 
http://docs.codehaus.org/display/MAVENUSER/Projects+With+JNI, in the 
hope that it may be useful to others. Feedback is welcome, although bear 
in mind that I've spent long enough on this now that I may be reluctant 
to do much more work :).

Cheers,

Rich



-- 
Richard van der Hoff <ri...@mxtelecom.com>
Telephony Gateways Project Manager
Tel: +44 (0) 845 666 7778
http://www.mxtelecom.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: suggestions for handling native libraries

Posted by Richard van der Hoff <ri...@mxtelecom.com>.
Hi Dan,

dan tran wrote:
> Hi Richard,
> 
> The native-maven-plugin JNI example shows that you can have your native
> project depends on a java jar project that has
> java jni  interfaces.  This way you can use native plugin to generate jni
> native include files before building the native artifacts.
> This is the same behavior in maven1.
> 
> Not sure why it is a "blocking" to you since it works

The question is, how do you then arrange for another project (maybe with 
more JNI, maybe not) to depend on that {native,java} project pair? It 
all gets incredibly messy. And believe me, I tried.

Furthermore, what do you do about unit tests with the 
native-maven-plugin? They have to run after the native artifacts are 
built, obviously.

I don't mean to step on your toes by setting up an alternative to the 
native-maven-plugin; it's just that the native-maven-plugin really 
didn't suit my needs at all.

Cheers,

Richard


-- 
Richard van der Hoff <ri...@mxtelecom.com>
Telephony Gateways Project Manager
Tel: +44 (0) 845 666 7778
http://www.mxtelecom.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: suggestions for handling native libraries

Posted by dan tran <da...@gmail.com>.
Hi Richard,

The native-maven-plugin JNI example shows that you can have your native
project depends on a java jar project that has
java jni  interfaces.  This way you can use native plugin to generate jni
native include files before building the native artifacts.
This is the same behavior in maven1.

Not sure why it is a "blocking" to you since it works

-Dan


On 6/14/06, Richard van der Hoff <ri...@mxtelecom.com> wrote:
>
> A while ago, I posted here asking for help with using Maven to handle
> projects which make use of JNI code.
>
> I was met by a stony wall of silence at that time... Anyway, a month
> later, and after quite a lot of thinking, hacking and tweaking, I've
> come up with a solution I'm reasonably happy with.
>
> I've written it all up at
> http://docs.codehaus.org/display/MAVENUSER/Projects+With+JNI, in the
> hope that it may be useful to others. Feedback is welcome, although bear
> in mind that I've spent long enough on this now that I may be reluctant
> to do much more work :).
>
> Cheers,
>
> Rich
>
>
>
> --
> Richard van der Hoff <ri...@mxtelecom.com>
> Telephony Gateways Project Manager
> Tel: +44 (0) 845 666 7778
> http://www.mxtelecom.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>