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

2013-03-25 Thread Dan Tran
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 k...@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:dant...@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 k...@quipsy.de wrote:
 My POM declared a dependency to a DLL:



 dependency

 groupIdnet.sf.jacob-project/groupId

 artifactIdjacob-runtime/artifactId

 typedll/type

 classifierx64/classifier

 version1.17-M2/version

 scoperuntime/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-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org

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



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

2013-02-28 Thread Anders Hammar
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 k...@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.ham...@gmail.com [mailto:anders.g.ham...@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 dant...@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 k...@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:dant...@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 wayne...@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-unsubscr...@maven.apache.org
   For additional commands, e-mail: users-h...@maven.apache.org
  
  
   
   - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
   For additional commands, e-mail: users-h...@maven.apache.org
  
   
   - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
   For additional commands, e-mail: users-h...@maven.apache.org
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 

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




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

2013-02-27 Thread Dan Tran
- 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 k...@quipsy.de wrote:
 My POM declared a dependency to a DLL:



 dependency

 groupIdnet.sf.jacob-project/groupId

 artifactIdjacob-runtime/artifactId

 typedll/type

 classifierx64/classifier

 version1.17-M2/version

 scoperuntime/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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



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

2013-02-27 Thread Jörg Schaible
Hi Marcus,

Markus Karg wrote:

 My POM declared a dependency to a DLL:
 
  
 
 dependency
 
 groupIdnet.sf.jacob-project/groupId
 
 artifactIdjacob-runtime/artifactId
 
 typedll/type
 
 classifierx64/classifier
 
 version1.17-M2/version
 
 scoperuntime/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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



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

2013-02-27 Thread Markus Karg
Dan,

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

Thanks a lot!
-Markus

 -Original Message-
 From: Dan Tran [mailto:dant...@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 k...@quipsy.de wrote:
  My POM declared a dependency to a DLL:
 
 
 
  dependency
 
  groupIdnet.sf.jacob-project/groupId
 
  artifactIdjacob-runtime/artifactId
 
  typedll/type
 
  classifierx64/classifier
 
  version1.17-M2/version
 
  scoperuntime/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-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


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

2013-02-27 Thread Markus Karg
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.schai...@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
 
  groupIdnet.sf.jacob-project/groupId
 
  artifactIdjacob-runtime/artifactId
 
  typedll/type
 
  classifierx64/classifier
 
  version1.17-M2/version
 
  scoperuntime/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-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


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

2013-02-27 Thread Wayne Fay
 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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



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

2013-02-27 Thread Dan Tran
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 wayne...@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-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


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



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

2013-02-27 Thread Dan Tran
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 k...@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:dant...@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 wayne...@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-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


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

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

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



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

2013-02-27 Thread Anders Hammar
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 dant...@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 k...@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:dant...@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 wayne...@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-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org

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