Normally you would separate out the piece that is depended on in two
places to a separate module to break the circle.

-----Original Message-----
From: Dave Rathnow [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 27, 2008 11:27 AM
To: Maven Users List
Subject: RE: Can you build native lib and Jar with a single pom.xml?


Okay.

Can you explain how one uses Maven to build jni libraries?  Assume you
have a jar project containing the Java source file (i.e. main and test)
that provides the interface to the native code, and another project that
contains the native code, how do you build them?  

Building the jar file requires the unit tests to run but they rely on
the native library but it can't be built because it relys on the Java
class in the jar file that is built from the Java project, but it can't
be built because it can't run unit tests that rely on the native code
from the native project but it can't be built....and on it goes. Chicken
and Egg problem.

How do you do this?

Dave.
 

-----Original Message-----
From: Brian Fox [mailto:[EMAIL PROTECTED] 
Sent: May 26, 2008 09:52 PM
To: Maven Users List
Subject: Re: Can you build native lib and Jar with a single pom.xml?

The golden rule is one pom, one artifact.

On May 26, 2008, at 5:41 PM, "Dave Rathnow" <[EMAIL PROTECTED]>
wrote:

>
> I have built a pom to build a native JNI library but the Java class  
> that
> sits on top of it is in a separate project.  It makes running unit  
> tests
> a little tricky.  I would like to move the Java code into the same
> project and have the Jar and the library built with a single pom.
>
> Is this possible?  If so, how does one go about getting Maven to build
> both a native library and a jar file?
>
> Thanks,
> Dave.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to