You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Markus Karg <ka...@quipsy.de> on 2013/02/27 15:58:51 UTC

How to tell Maven to put DLL dependency into java.library.path?

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


RE: How to tell Maven to put DLL dependency into java.library.path?

Posted by Markus Karg <ka...@quipsy.de>.
Dan,

sounds reasonable. I think I'll do that! :-)

Thanks a lot!
-Markus

> -----Original Message-----
> From: Dan Tran [mailto:dantran@gmail.com]
> Sent: Mittwoch, 27. Februar 2013 17:41
> To: Maven Users List
> Subject: 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
> 
> -D
> 
> On Wed, Feb 27, 2013 at 6:58 AM, Markus Karg <ka...@quipsy.de> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

RE: AW: How to tell Maven to put DLL dependency into java.library.path?

Posted by Martin Gainty <mg...@hotmail.com>.
Markus
plugin-management section with a plugin config that allows you to specify LD_LIBRARY_PATH 
e.g maven-nar-plugin
<artifactId>parent-plugin</artifactId>  <build>
    <pluginManagement>
    <plugins>   <plugin>  <artifactId>maven-nar-plugin</artifactId><configuration> <linker>  <lib>       <name/>
        <type/>
        <directory/> http://duns.github.com/maven-nar-plugin/configuration.html?
Martin ______________________________________________ 
Verzicht und Vertraulichkeitanmerkung 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > Subject: AW: How to tell Maven to put DLL dependency into java.library.path?
> Date: Tue, 26 Mar 2013 08:16:58 +0100
> From: karg@quipsy.de
> To: users@maven.apache.org
> 
> �Maybe you like to vote or comment: http://jira.codehaus.org/browse/MNG-5448 ? :-)
> 
> Regards
> -Markus
> 
> -----Ursprüngliche Nachricht-----
> Von: Dan Tran [mailto:dantran@gmail.com] 
> Gesendet: Montag, 25. März 2013 17:04
> An: Maven Users List
> Betreff: Re: How to tell Maven to put DLL dependency into java.library.path?
> 
> dont think maven can do that ( surefire understand jars but not dll/so ). I am facing the same issue and the best I can come up ATM is to configure every single project
> 
> -D
> 
> On Mon, Mar 25, 2013 at 12:58 AM, Markus Karg <ka...@quipsy.de> wrote:
> > Dan,
> >
> > 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...
> >
> > Thanks!
> > -Markus
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Dan Tran [mailto:dantran@gmail.com]
> > 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
> >
> > -D
> >
> > On Wed, Feb 27, 2013 at 6:58 AM, Markus Karg <ka...@quipsy.de> 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> Т���������������������������������������������������������������������ХF�V�7V'67&�&R�R���âW6W'2�V�7V'67&�&T�fV��6�R��&pФf�"FF�F����6����G2�R���âW6W'2ֆV��fV��6�R��&p
 		 	   		  

AW: How to tell Maven to put DLL dependency into java.library.path?

Posted by Markus Karg <ka...@quipsy.de>.
Maybe you like to vote or comment: http://jira.codehaus.org/browse/MNG-5448 ? :-)

Regards
-Markus

-----Ursprüngliche Nachricht-----
Von: Dan Tran [mailto:dantran@gmail.com] 
Gesendet: Montag, 25. März 2013 17:04
An: Maven Users List
Betreff: Re: How to tell Maven to put DLL dependency into java.library.path?

dont think maven can do that ( surefire understand jars but not dll/so ). I am facing the same issue and the best I can come up ATM is to configure every single project

-D

On Mon, Mar 25, 2013 at 12:58 AM, Markus Karg <ka...@quipsy.de> wrote:
> Dan,
>
> 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...
>
> Thanks!
> -Markus
>
> -----Ursprüngliche Nachricht-----
> Von: Dan Tran [mailto:dantran@gmail.com]
> 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
>
> -D
>
> On Wed, Feb 27, 2013 at 6:58 AM, Markus Karg <ka...@quipsy.de> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

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

Re: How to tell Maven to put DLL dependency into java.library.path?

Posted by Dan Tran <da...@gmail.com>.
dont think maven can do that ( surefire understand jars but not dll/so
). I am facing the same issue and the best I can come up ATM is to
configure every single project

-D

On Mon, Mar 25, 2013 at 12:58 AM, Markus Karg <ka...@quipsy.de> wrote:
> Dan,
>
> 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...
>
> Thanks!
> -Markus
>
> -----Ursprüngliche Nachricht-----
> Von: Dan Tran [mailto:dantran@gmail.com]
> 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
>
> -D
>
> On Wed, Feb 27, 2013 at 6:58 AM, Markus Karg <ka...@quipsy.de> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

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


AW: How to tell Maven to put DLL dependency into java.library.path?

Posted by Markus Karg <ka...@quipsy.de>.
Dan,

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...

Thanks!
-Markus

-----Ursprüngliche Nachricht-----
Von: Dan Tran [mailto:dantran@gmail.com] 
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

-D

On Wed, Feb 27, 2013 at 6:58 AM, Markus Karg <ka...@quipsy.de> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

Re: How to tell Maven to put DLL dependency into java.library.path?

Posted by Dan Tran <da...@gmail.com>.
- 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

-D

On Wed, Feb 27, 2013 at 6:58 AM, Markus Karg <ka...@quipsy.de> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


AW: How to tell Maven to put DLL dependency into java.library.path?

Posted by Markus Karg <ka...@quipsy.de>.
EclEmma simply runs code coverage. AFAIK it does not care about java.library.path at all. My actual need is one POM-centric declaration of a DLL dependency that works in *any* tools able to deal with POMs. :-)


-----Ursprüngliche Nachricht-----
Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im Auftrag von Anders Hammar
Gesendet: Donnerstag, 28. Februar 2013 12:25
An: Maven Users List
Betreff: Re: How to tell Maven to put DLL dependency into java.library.path?

Ok. I just assumed that the EclEmma Eclipse plugin would handle all of this in Eclipse. I haven't used it myself.
Any CI problems are not related to this; I was just focusing on the Eclipse part of the problem.

/Anders


On Thu, Feb 28, 2013 at 11:08 AM, Markus Karg <ka...@quipsy.de> wrote:

> Who said that I do not use the EclEmma Eclipse plugin? Actually I do. 
> :-)
>
> But that does neither solve the problem that each new guy in the team 
> needs to set up his java.library.path in Eclipse again, nor the 
> problem that a CI server like Jenkins / Hudson needs to know about all 
> native libraries for running unit tests. *And* m2e clears the manual 
> native lib settings in Eclipse each time it updates from the POM.xml! 
> ;-(
>
> -----Ursprüngliche Nachricht-----
> Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im 
> Auftrag von Anders Hammar
> Gesendet: Donnerstag, 28. Februar 2013 08:54
> An: Maven Users List
> Betreff: Re: How to tell Maven to put DLL dependency into 
> java.library.path?
>
> Why not just use the EclEmma Eclipse plugin? It uses Jacoco from what 
> I read on their web site, despite the "emma" in the name of the plugin.
>
> /Anders
>
>
> On Thu, Feb 28, 2013 at 8:48 AM, Dan Tran <da...@gmail.com> wrote:
>
> > I think that would work if you invoke 'maven install' using m2e.
> > However, if you use eclispe's unit test, that may not possible since 
> > I too could not working.  I basically configure eclispe or put the 
> > dlls in my system path
> >
> > -D
> >
> > On Wed, Feb 27, 2013 at 11:21 PM, Markus Karg <ka...@quipsy.de> wrote:
> > > I fact these are not "my " DLLs but are ready-to-use artifacts of 
> > > the
> > JACOCO project on SourceForge. So I will *never* build them on my own.
> > But I need to have it working m2e. Do you think your solution will 
> > convince m2e to add lib to java.library.path?
> > >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Dan Tran [mailto:dantran@gmail.com]
> > > Gesendet: Mittwoch, 27. Februar 2013 22:29
> > > An: Maven Users List
> > > Betreff: Re: How to tell Maven to put DLL dependency into
> > java.library.path?
> > >
> > > if you already have all you DLL loaded at your maven repo, Then it 
> > > make
> > sense to do so at this moment
> > >
> > > if you are required to build dll with maven, better look into NAR
> > >
> > > -D
> > >
> > > On Wed, Feb 27, 2013 at 12:35 PM, Wayne Fay <wa...@gmail.com>
> wrote:
> > >>> thank you for this interesting idea. I think this would be the 
> > >>> most sophisticated ("most mavenic") solution, but I have the 
> > >>> feeling that Dan's to be simpler to set up in the short term for 
> > >>> a
> Maven novice?
> > >>
> > >> Go with Dan's solution for now, but I think you'll change to the 
> > >> Nar plugin eventually.
> > >>
> > >> Wayne
> > >>
> > >> -----------------------------------------------------------------
> > >> --
> > >> -- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >
> > > ------------------------------------------------------------------
> > > --
> > > - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > > ------------------------------------------------------------------
> > > --
> > > - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: How to tell Maven to put DLL dependency into java.library.path?

Posted by Anders Hammar <an...@hammar.net>.
Ok. I just assumed that the EclEmma Eclipse plugin would handle all of this
in Eclipse. I haven't used it myself.
Any CI problems are not related to this; I was just focusing on the Eclipse
part of the problem.

/Anders


On Thu, Feb 28, 2013 at 11:08 AM, Markus Karg <ka...@quipsy.de> wrote:

> Who said that I do not use the EclEmma Eclipse plugin? Actually I do. :-)
>
> But that does neither solve the problem that each new guy in the team
> needs to set up his java.library.path in Eclipse again, nor the problem
> that a CI server like Jenkins / Hudson needs to know about all native
> libraries for running unit tests. *And* m2e clears the manual native lib
> settings in Eclipse each time it updates from the POM.xml! ;-(
>
> -----Ursprüngliche Nachricht-----
> Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im
> Auftrag von Anders Hammar
> Gesendet: Donnerstag, 28. Februar 2013 08:54
> An: Maven Users List
> Betreff: Re: How to tell Maven to put DLL dependency into
> java.library.path?
>
> Why not just use the EclEmma Eclipse plugin? It uses Jacoco from what I
> read on their web site, despite the "emma" in the name of the plugin.
>
> /Anders
>
>
> On Thu, Feb 28, 2013 at 8:48 AM, Dan Tran <da...@gmail.com> wrote:
>
> > I think that would work if you invoke 'maven install' using m2e.
> > However, if you use eclispe's unit test, that may not possible since I
> > too could not working.  I basically configure eclispe or put the dlls
> > in my system path
> >
> > -D
> >
> > On Wed, Feb 27, 2013 at 11:21 PM, Markus Karg <ka...@quipsy.de> wrote:
> > > I fact these are not "my " DLLs but are ready-to-use artifacts of
> > > the
> > JACOCO project on SourceForge. So I will *never* build them on my own.
> > But I need to have it working m2e. Do you think your solution will
> > convince m2e to add lib to java.library.path?
> > >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Dan Tran [mailto:dantran@gmail.com]
> > > Gesendet: Mittwoch, 27. Februar 2013 22:29
> > > An: Maven Users List
> > > Betreff: Re: How to tell Maven to put DLL dependency into
> > java.library.path?
> > >
> > > if you already have all you DLL loaded at your maven repo, Then it
> > > make
> > sense to do so at this moment
> > >
> > > if you are required to build dll with maven, better look into NAR
> > >
> > > -D
> > >
> > > On Wed, Feb 27, 2013 at 12:35 PM, Wayne Fay <wa...@gmail.com>
> wrote:
> > >>> thank you for this interesting idea. I think this would be the
> > >>> most sophisticated ("most mavenic") solution, but I have the
> > >>> feeling that Dan's to be simpler to set up in the short term for a
> Maven novice?
> > >>
> > >> Go with Dan's solution for now, but I think you'll change to the
> > >> Nar plugin eventually.
> > >>
> > >> Wayne
> > >>
> > >> -------------------------------------------------------------------
> > >> -- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >
> > > --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > > --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

AW: How to tell Maven to put DLL dependency into java.library.path?

Posted by Markus Karg <ka...@quipsy.de>.
Who said that I do not use the EclEmma Eclipse plugin? Actually I do. :-)

But that does neither solve the problem that each new guy in the team needs to set up his java.library.path in Eclipse again, nor the problem that a CI server like Jenkins / Hudson needs to know about all native libraries for running unit tests. *And* m2e clears the manual native lib settings in Eclipse each time it updates from the POM.xml! ;-(

-----Ursprüngliche Nachricht-----
Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im Auftrag von Anders Hammar
Gesendet: Donnerstag, 28. Februar 2013 08:54
An: Maven Users List
Betreff: Re: How to tell Maven to put DLL dependency into java.library.path?

Why not just use the EclEmma Eclipse plugin? It uses Jacoco from what I read on their web site, despite the "emma" in the name of the plugin.

/Anders


On Thu, Feb 28, 2013 at 8:48 AM, Dan Tran <da...@gmail.com> wrote:

> I think that would work if you invoke 'maven install' using m2e.
> However, if you use eclispe's unit test, that may not possible since I 
> too could not working.  I basically configure eclispe or put the dlls 
> in my system path
>
> -D
>
> On Wed, Feb 27, 2013 at 11:21 PM, Markus Karg <ka...@quipsy.de> wrote:
> > I fact these are not "my " DLLs but are ready-to-use artifacts of 
> > the
> JACOCO project on SourceForge. So I will *never* build them on my own. 
> But I need to have it working m2e. Do you think your solution will 
> convince m2e to add lib to java.library.path?
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Dan Tran [mailto:dantran@gmail.com]
> > Gesendet: Mittwoch, 27. Februar 2013 22:29
> > An: Maven Users List
> > Betreff: Re: How to tell Maven to put DLL dependency into
> java.library.path?
> >
> > if you already have all you DLL loaded at your maven repo, Then it 
> > make
> sense to do so at this moment
> >
> > if you are required to build dll with maven, better look into NAR
> >
> > -D
> >
> > On Wed, Feb 27, 2013 at 12:35 PM, Wayne Fay <wa...@gmail.com> wrote:
> >>> thank you for this interesting idea. I think this would be the 
> >>> most sophisticated ("most mavenic") solution, but I have the 
> >>> feeling that Dan's to be simpler to set up in the short term for a Maven novice?
> >>
> >> Go with Dan's solution for now, but I think you'll change to the 
> >> Nar plugin eventually.
> >>
> >> Wayne
> >>
> >> -------------------------------------------------------------------
> >> -- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: How to tell Maven to put DLL dependency into java.library.path?

Posted by Anders Hammar <an...@hammar.net>.
Why not just use the EclEmma Eclipse plugin? It uses Jacoco from what I
read on their web site, despite the "emma" in the name of the plugin.

/Anders


On Thu, Feb 28, 2013 at 8:48 AM, Dan Tran <da...@gmail.com> wrote:

> I think that would work if you invoke 'maven install' using m2e.
> However, if you use eclispe's unit test, that may not possible since I
> too could not working.  I basically configure eclispe or put the dlls
> in my system path
>
> -D
>
> On Wed, Feb 27, 2013 at 11:21 PM, Markus Karg <ka...@quipsy.de> wrote:
> > I fact these are not "my " DLLs but are ready-to-use artifacts of the
> JACOCO project on SourceForge. So I will *never* build them on my own. But
> I need to have it working m2e. Do you think your solution will convince m2e
> to add lib to java.library.path?
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Dan Tran [mailto:dantran@gmail.com]
> > Gesendet: Mittwoch, 27. Februar 2013 22:29
> > An: Maven Users List
> > Betreff: Re: How to tell Maven to put DLL dependency into
> java.library.path?
> >
> > if you already have all you DLL loaded at your maven repo, Then it make
> sense to do so at this moment
> >
> > if you are required to build dll with maven, better look into NAR
> >
> > -D
> >
> > On Wed, Feb 27, 2013 at 12:35 PM, Wayne Fay <wa...@gmail.com> wrote:
> >>> thank you for this interesting idea. I think this would be the most
> >>> sophisticated ("most mavenic") solution, but I have the feeling that
> >>> Dan's to be simpler to set up in the short term for a Maven novice?
> >>
> >> Go with Dan's solution for now, but I think you'll change to the Nar
> >> plugin eventually.
> >>
> >> Wayne
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

AW: How to tell Maven to put DLL dependency into java.library.path?

Posted by Markus Karg <ka...@quipsy.de>.
The bad thing is that just I noticed that m2e actually *clears* already manually configured native library paths from  Eclipse's build path config!
So while it is unable to *set* that information, it is checky enough to *remove* correct, existing, wanted settings. :-(

-----Ursprüngliche Nachricht-----
Von: Dan Tran [mailto:dantran@gmail.com] 
Gesendet: Donnerstag, 28. Februar 2013 08:49
An: Maven Users List
Betreff: Re: How to tell Maven to put DLL dependency into java.library.path?

I think that would work if you invoke 'maven install' using m2e.
However, if you use eclispe's unit test, that may not possible since I too could not working.  I basically configure eclispe or put the dlls in my system path

-D

On Wed, Feb 27, 2013 at 11:21 PM, Markus Karg <ka...@quipsy.de> wrote:
> I fact these are not "my " DLLs but are ready-to-use artifacts of the JACOCO project on SourceForge. So I will *never* build them on my own. But I need to have it working m2e. Do you think your solution will convince m2e to add lib to java.library.path?

>
> -----Ursprüngliche Nachricht-----
> Von: Dan Tran [mailto:dantran@gmail.com]
> Gesendet: Mittwoch, 27. Februar 2013 22:29
> An: Maven Users List
> Betreff: Re: How to tell Maven to put DLL dependency into java.library.path?
>
> if you already have all you DLL loaded at your maven repo, Then it 
> make sense to do so at this moment
>
> if you are required to build dll with maven, better look into NAR
>
> -D
>
> On Wed, Feb 27, 2013 at 12:35 PM, Wayne Fay <wa...@gmail.com> wrote:
>>> thank you for this interesting idea. I think this would be the most 
>>> sophisticated ("most mavenic") solution, but I have the feeling that 
>>> Dan's to be simpler to set up in the short term for a Maven novice?
>>
>> Go with Dan's solution for now, but I think you'll change to the Nar 
>> plugin eventually.
>>
>> Wayne
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

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

Re: How to tell Maven to put DLL dependency into java.library.path?

Posted by Dan Tran <da...@gmail.com>.
I think that would work if you invoke 'maven install' using m2e.
However, if you use eclispe's unit test, that may not possible since I
too could not working.  I basically configure eclispe or put the dlls
in my system path

-D

On Wed, Feb 27, 2013 at 11:21 PM, Markus Karg <ka...@quipsy.de> wrote:
> I fact these are not "my " DLLs but are ready-to-use artifacts of the JACOCO project on SourceForge. So I will *never* build them on my own. But I need to have it working m2e. Do you think your solution will convince m2e to add lib to java.library.path?
>
> -----Ursprüngliche Nachricht-----
> Von: Dan Tran [mailto:dantran@gmail.com]
> Gesendet: Mittwoch, 27. Februar 2013 22:29
> An: Maven Users List
> Betreff: Re: How to tell Maven to put DLL dependency into java.library.path?
>
> if you already have all you DLL loaded at your maven repo, Then it make sense to do so at this moment
>
> if you are required to build dll with maven, better look into NAR
>
> -D
>
> On Wed, Feb 27, 2013 at 12:35 PM, Wayne Fay <wa...@gmail.com> wrote:
>>> thank you for this interesting idea. I think this would be the most
>>> sophisticated ("most mavenic") solution, but I have the feeling that
>>> Dan's to be simpler to set up in the short term for a Maven novice?
>>
>> Go with Dan's solution for now, but I think you'll change to the Nar
>> plugin eventually.
>>
>> Wayne
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

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


AW: How to tell Maven to put DLL dependency into java.library.path?

Posted by Markus Karg <ka...@quipsy.de>.
I fact these are not "my " DLLs but are ready-to-use artifacts of the JACOCO project on SourceForge. So I will *never* build them on my own. But I need to have it working m2e. Do you think your solution will convince m2e to add lib to java.library.path?

-----Ursprüngliche Nachricht-----
Von: Dan Tran [mailto:dantran@gmail.com] 
Gesendet: Mittwoch, 27. Februar 2013 22:29
An: Maven Users List
Betreff: Re: How to tell Maven to put DLL dependency into java.library.path?

if you already have all you DLL loaded at your maven repo, Then it make sense to do so at this moment

if you are required to build dll with maven, better look into NAR

-D

On Wed, Feb 27, 2013 at 12:35 PM, Wayne Fay <wa...@gmail.com> wrote:
>> thank you for this interesting idea. I think this would be the most 
>> sophisticated ("most mavenic") solution, but I have the feeling that 
>> Dan's to be simpler to set up in the short term for a Maven novice?
>
> Go with Dan's solution for now, but I think you'll change to the Nar 
> plugin eventually.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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

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

Re: How to tell Maven to put DLL dependency into java.library.path?

Posted by Dan Tran <da...@gmail.com>.
if you already have all you DLL loaded at your maven repo, Then it
make sense to do so at this moment

if you are required to build dll with maven, better look into NAR

-D

On Wed, Feb 27, 2013 at 12:35 PM, Wayne Fay <wa...@gmail.com> wrote:
>> thank you for this interesting idea. I think this would be the most
>> sophisticated ("most mavenic") solution, but I have the feeling that Dan's
>> to be simpler to set up in the short term for a Maven novice?
>
> Go with Dan's solution for now, but I think you'll change to the Nar
> plugin eventually.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


AW: How to tell Maven to put DLL dependency into java.library.path?

Posted by Markus Karg <ka...@quipsy.de>.
Possibly. Because in fact, I need other tools to understand the need for java.library.path, too, mosty the m2e Eclipse plugin, which I doubt will understand any manual PATH changes in the surefire config (does it?).

-----Ursprüngliche Nachricht-----
Von: Wayne Fay [mailto:waynefay@gmail.com] 
Gesendet: Mittwoch, 27. Februar 2013 21:35
An: Maven Users List
Betreff: Re: How to tell Maven to put DLL dependency into java.library.path?

> thank you for this interesting idea. I think this would be the most 
> sophisticated ("most mavenic") solution, but I have the feeling that 
> Dan's to be simpler to set up in the short term for a Maven novice?

Go with Dan's solution for now, but I think you'll change to the Nar plugin eventually.

Wayne

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

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

Re: How to tell Maven to put DLL dependency into java.library.path?

Posted by Wayne Fay <wa...@gmail.com>.
> thank you for this interesting idea. I think this would be the most
> sophisticated ("most mavenic") solution, but I have the feeling that Dan's
> to be simpler to set up in the short term for a Maven novice?

Go with Dan's solution for now, but I think you'll change to the Nar
plugin eventually.

Wayne

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


RE: How to tell Maven to put DLL dependency into java.library.path?

Posted by Markus Karg <ka...@quipsy.de>.
Jörg,

thank you for this interesting idea. I think this would be the most sophisticated ("most mavenic") solution, but I have the feeling that Dan's to be simpler to set up in the short term for a Maven novice?

Thanks! :-)
Markus

> -----Original Message-----
> From: Jörg Schaible [mailto:Joerg.Schaible@scalaris.com]
> Sent: Mittwoch, 27. Februar 2013 18:03
> To: users@maven.apache.org
> Subject: Re: How to tell Maven to put DLL dependency into
> java.library.path?
> 
> Hi Marcus,
> 
> 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")?
> 
> Have a look at the nar plugin. Create a JNI example project and have a
> look at the artifacts it will create. You may pack your DLLs into
> similar artifacts and then use this plugin to download and unpack the
> native stuff automatically when using those artifacts as dependency.
> 
> - Jörg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

Re: How to tell Maven to put DLL dependency into java.library.path?

Posted by Jörg Schaible <Jo...@scalaris.com>.
Hi Marcus,

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")?

Have a look at the nar plugin. Create a JNI example project and have a look 
at the artifacts it will create. You may pack your DLLs into similar 
artifacts and then use this plugin to download and unpack the native stuff 
automatically when using those artifacts as dependency.

- Jörg


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