maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Karg" <>
Subject AW: How to tell Maven to put DLL dependency into java.library.path?
Date Mon, 25 Mar 2013 07:58:45 GMT

thank you for this tip. I is working very well. But one question I still do have: If I have
a second project which needs the same native dependency, obviously I have to tell configure
maven-surefire-plugin again. This is a bit strange, as obviously the fact that the configuration
is needed is related to the dependency, not to the dependent project. I wonder if Maven has
a solution that roughly spoken does the same but is configured inside oft he dependency's
POM, not inside oft he dependent POM? That would allow to use the dependency as "any other"
dependency without having to remember that it actually is a DLL...


-----Urspr√ľngliche Nachricht-----
Von: Dan Tran [] 
Gesendet: Mittwoch, 27. Februar 2013 17:41
An: Maven Users List
Betreff: Re: How to tell Maven to put DLL dependency into java.library.path?

- Use maven profile to detect OS arch and set it into a maven property

- Use maven-dependcy-plugin to down all requires dll.  Make sure to take advantage of the
property set in step 1

- Configure maven-surefire-plugin to set PATH env variable into the download directory

Good luck


On Wed, Feb 27, 2013 at 6:58 AM, Markus Karg <> wrote:
> My POM declared a dependency to a DLL:
> <dependency>
>                 <groupId>net.sf.jacob-project</groupId>
>                 <artifactId>jacob-runtime</artifactId>
>                 <type>dll</type>
>                 <classifier>x64</classifier>
>                 <version>1.17-M2</version>
>                 <scope>runtime</scope>
> </dependency>
> (1)    How can I tell Maven that when doing "mvn test", that DLL shall
> be found on java.library.path, so that the JVM can load native classes 
> from it (using JNI)?
> (2)    How can I tell Maven that it shall not statically be "x64", but
> instead it depends on the architecture of the system actually 
> executing "mvn test" (e. g. "x86")?
> Thanks! J
> -Markus

To unsubscribe, e-mail:
For additional commands, e-mail:
View raw message