You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Joerg Hohwiller <jo...@j-hohwiller.de> on 2007/04/06 21:24:53 UTC

dependency on system library (java.library.path)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,

I have already used SWT and GWT together with maven. Both need native system
libraries at some specific point. This causes trouble when running code (e.g.
test-cases) with maven.

Are there any plans to add dependencies with <type>dll</type> (or
<type>so</type>) to java.library.path?

For system libraries however the name cares when it is loaded from something
that I can not control (foo-1.0.jar loads foo.dll and it can not be named
foo-1.0.dll).
Is there a way to put various artifacts with different versions but the same
file-name into a maven repository? In other words: The filename of an artifact
is automatically derived from artifactId, version, classifier and type. Is there
a way to override this default behaviour and specify an explicit name?
Example:

org/eclipse/swt/swt-win32/3.2.1/swt-win32.dll
org/eclipse/swt/swt-win32/3.2.2/swt-win32.dll

<dependency>
  <groupId>org.eclipse.swt</groupdId>
  <artifactId>swt-win32</artifactId>
  <version>3.2.2</version>
  <type>dll</type>
  <scope>runtime</scope>
  <!-- something like this -->
  <filename>swt-win32.dll</filename>
</dependency>

Thanks
  Jörg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGFp6EmPuec2Dcv/8RAoDjAKCJrr0xdI3iXUvYzLYiE2RLi45XLgCfThMo
1ecdAOdt55WlfcTYfE7AS+k=
=W5G2
-----END PGP SIGNATURE-----

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


Re: dependency on system library (java.library.path)

Posted by Joerg Hohwiller <jo...@j-hohwiller.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,
> On 4/12/07, Aaron Digulla <di...@hepe.com> wrote:
>>
>> Joerg Hohwiller wrote:
>> > Hi there,
>> >
>> > I have already used SWT and GWT together with maven. Both need native
>> system
>> > libraries at some specific point. This causes trouble when running code
>> (e.g.
>> > test-cases) with maven.
>>
>> The latest 3.3 release of SWT includes the library files in the JAR! I
>> have no idea how they do it and how the Java VM can find and load these
>> but it works. Maybe you could ask the SWT guys how they did it and
> 
> 
> http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html#loadLibrary(java.lang.String)
> 
> 
Thanks to everybody for this valuable infos.

Cheers
  Jörg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGJSJ6mPuec2Dcv/8RAjzMAKCIth+q+bS11TMst1OgIr2Vin3BOQCgiotn
EgN3qFaNJg76yyjZbS5aIX8=
=m6gW
-----END PGP SIGNATURE-----

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


Re: dependency on system library (java.library.path)

Posted by Eric Redmond <er...@gmail.com>.
On 4/12/07, Aaron Digulla <di...@hepe.com> wrote:
>
> Joerg Hohwiller wrote:
> > Hi there,
> >
> > I have already used SWT and GWT together with maven. Both need native
> system
> > libraries at some specific point. This causes trouble when running code
> (e.g.
> > test-cases) with maven.
>
> The latest 3.3 release of SWT includes the library files in the JAR! I
> have no idea how they do it and how the Java VM can find and load these
> but it works. Maybe you could ask the SWT guys how they did it and


http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html#loadLibrary(java.lang.String)

provide a Maven plugin to add dll/so-files to a JAR in such a way that
> the Java runtime can find and load them without messing with
> java.library.path.
>

 It loads it to the runtime, not a classpath, so a simple plugin could take
the dll location (or extract from a jar) and load it, then the build
lifecycle can be on it's merry way. However, the NAR option looks to be the
best.

Eric

Re: dependency on system library (java.library.path)

Posted by Aaron Digulla <di...@hepe.com>.
Joerg Hohwiller wrote:
> Hi there,
> 
> I have already used SWT and GWT together with maven. Both need native system
> libraries at some specific point. This causes trouble when running code (e.g.
> test-cases) with maven.

The latest 3.3 release of SWT includes the library files in the JAR! I
have no idea how they do it and how the Java VM can find and load these
but it works. Maybe you could ask the SWT guys how they did it and
provide a Maven plugin to add dll/so-files to a JAR in such a way that
the Java runtime can find and load them without messing with
java.library.path.

Regards,

-- 
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/

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


Re: dependency on system library (java.library.path)

Posted by Damien Lecan <ml...@dlecan.com>.
Hello,

> For system libraries however the name cares when it is loaded from something
> that I can not control (foo-1.0.jar loads foo.dll and it can not be named
> foo-1.0.dll).
> Is there a way to put various artifacts with different versions but the same
> file-name into a maven repository? In other words: The filename of an artifact
> is automatically derived from artifactId, version, classifier and type. Is there
> a way to override this default behaviour and specify an explicit name?

Use maven-dependency-plugin to copy these dll/so in your project when
you package
http://maven.apache.org/plugins/maven-dependency-plugin/

Damien

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


Re: dependency on system library (java.library.path)

Posted by Joerg Hohwiller <jo...@j-hohwiller.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Marc,
> We can change the license to something else, no problem.
Of course this is your decision.
But you could think about dual licensing your project.
Here is something to consider:
http://wiki.apache.org/jakarta/Using_LGPL'd_code
> 
> Regards
> Mark
Regards
  Jörg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGJSIlmPuec2Dcv/8RAgspAJ9YrsHLqoCqVxAitYaoILrunpVCNQCfUZ7Q
Ue1dhmXwUCpQ0BGSIQ4DJSw=
=v4kR
-----END PGP SIGNATURE-----

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


Re: dependency on system library (java.library.path)

Posted by Mark Donszelmann <Ma...@slac.stanford.edu>.
We can change the license to something else, no problem.

Regards
Mark

On Apr 7, 2007, at 12:37 AM, Jason Dillon wrote:

> Ah, I remember reading about this before, though it was a while ago.
>
> Too bad this is LGPL, as that is going to prevent a lot of folks  
> from using it :-(
>
> --jason
>
>
> On Apr 6, 2007, at 7:21 PM, Mark Donszelmann wrote:
>
>> Hi
>>
>> the freehep-nar-plugin does exactly what you describe.
>>
>> http://java.freehep.org/freehep-nar-plugin
>>
>> Regards
>> Mark Donszelmann
>>
>> On Apr 6, 2007, at 5:33 PM, jason.dillon@gmail.com wrote:
>>
>>> Its probably better to zip the natives up and then use the zip  
>>> file as the artifact, and then hook up support to extract them to  
>>> some tmp dir for inclusion in the library path.
>>>
>>> Would also be nice to have a standard artifact type/ext to use  
>>> for all share library types.
>>>
>>> And perhaps allow multipule arch files in the same artifact,  
>>> probably including some descriptor to configure while bits get  
>>> loaded for which platform.
>>>
>>> --jason
>>>
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Joerg Hohwiller <jo...@j-hohwiller.de>
>>> Date: Fri, 06 Apr 2007 21:24:53
>>> To:Maven Developers List <de...@maven.apache.org>
>>> Subject: dependency on system library (java.library.path)
>>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Hi there,
>>>
>>> I have already used SWT and GWT together with maven. Both need  
>>> native system
>>> libraries at some specific point. This causes trouble when  
>>> running code (e.g.
>>> test-cases) with maven.
>>>
>>> Are there any plans to add dependencies with <type>dll</type> (or
>>> <type>so</type>) to java.library.path?
>>>
>>> For system libraries however the name cares when it is loaded  
>>> from something
>>> that I can not control (foo-1.0.jar loads foo.dll and it can not  
>>> be named
>>> foo-1.0.dll).
>>> Is there a way to put various artifacts with different versions  
>>> but the same
>>> file-name into a maven repository? In other words: The filename  
>>> of an artifact
>>> is automatically derived from artifactId, version, classifier and  
>>> type. Is there
>>> a way to override this default behaviour and specify an explicit  
>>> name?
>>> Example:
>>>
>>> org/eclipse/swt/swt-win32/3.2.1/swt-win32.dll
>>> org/eclipse/swt/swt-win32/3.2.2/swt-win32.dll
>>>
>>> <dependency>
>>>   <groupId>org.eclipse.swt</groupdId>
>>>   <artifactId>swt-win32</artifactId>
>>>   <version>3.2.2</version>
>>>   <type>dll</type>
>>>   <scope>runtime</scope>
>>>   <!-- something like this -->
>>>   <filename>swt-win32.dll</filename>
>>> </dependency>
>>>
>>> Thanks
>>>   Jörg
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.5 (GNU/Linux)
>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>>
>>> iD8DBQFGFp6EmPuec2Dcv/8RAoDjAKCJrr0xdI3iXUvYzLYiE2RLi45XLgCfThMo
>>> 1ecdAOdt55WlfcTYfE7AS+k=
>>> =W5G2
>>> -----END PGP SIGNATURE-----
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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


Re: dependency on system library (java.library.path)

Posted by Jason Dillon <ja...@planet57.com>.
Ah, I remember reading about this before, though it was a while ago.

Too bad this is LGPL, as that is going to prevent a lot of folks from  
using it :-(

--jason


On Apr 6, 2007, at 7:21 PM, Mark Donszelmann wrote:

> Hi
>
> the freehep-nar-plugin does exactly what you describe.
>
> http://java.freehep.org/freehep-nar-plugin
>
> Regards
> Mark Donszelmann
>
> On Apr 6, 2007, at 5:33 PM, jason.dillon@gmail.com wrote:
>
>> Its probably better to zip the natives up and then use the zip  
>> file as the artifact, and then hook up support to extract them to  
>> some tmp dir for inclusion in the library path.
>>
>> Would also be nice to have a standard artifact type/ext to use for  
>> all share library types.
>>
>> And perhaps allow multipule arch files in the same artifact,  
>> probably including some descriptor to configure while bits get  
>> loaded for which platform.
>>
>> --jason
>>
>>
>>
>>
>> -----Original Message-----
>> From: Joerg Hohwiller <jo...@j-hohwiller.de>
>> Date: Fri, 06 Apr 2007 21:24:53
>> To:Maven Developers List <de...@maven.apache.org>
>> Subject: dependency on system library (java.library.path)
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi there,
>>
>> I have already used SWT and GWT together with maven. Both need  
>> native system
>> libraries at some specific point. This causes trouble when running  
>> code (e.g.
>> test-cases) with maven.
>>
>> Are there any plans to add dependencies with <type>dll</type> (or
>> <type>so</type>) to java.library.path?
>>
>> For system libraries however the name cares when it is loaded from  
>> something
>> that I can not control (foo-1.0.jar loads foo.dll and it can not  
>> be named
>> foo-1.0.dll).
>> Is there a way to put various artifacts with different versions  
>> but the same
>> file-name into a maven repository? In other words: The filename of  
>> an artifact
>> is automatically derived from artifactId, version, classifier and  
>> type. Is there
>> a way to override this default behaviour and specify an explicit  
>> name?
>> Example:
>>
>> org/eclipse/swt/swt-win32/3.2.1/swt-win32.dll
>> org/eclipse/swt/swt-win32/3.2.2/swt-win32.dll
>>
>> <dependency>
>>   <groupId>org.eclipse.swt</groupdId>
>>   <artifactId>swt-win32</artifactId>
>>   <version>3.2.2</version>
>>   <type>dll</type>
>>   <scope>runtime</scope>
>>   <!-- something like this -->
>>   <filename>swt-win32.dll</filename>
>> </dependency>
>>
>> Thanks
>>   Jörg
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.5 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFGFp6EmPuec2Dcv/8RAoDjAKCJrr0xdI3iXUvYzLYiE2RLi45XLgCfThMo
>> 1ecdAOdt55WlfcTYfE7AS+k=
>> =W5G2
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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


Re: dependency on system library (java.library.path)

Posted by Mark Donszelmann <Ma...@slac.stanford.edu>.
Hi Joerg,

our test nar goal (which we call integration test nar, since it checks
tests against the jar and the native libs, will put any native libs
on the java.library.parth which are (transitive) dependencies.

For libs that are dependencies but that we do not build, we just wrap
them in a nar file and publish them locally, so that we can
depend on them. Wrapping is no more that jar-ring up the file
structure correctly (look in a produced nar file) and adding a  
nar.properties file.

For a set of system libs, you should get a yourlib-version.jar file (w/o
java files I guess), and some yourlib-version-aol-static.nar file.

Regards
Mark

On Apr 9, 2007, at 3:54 PM, Joerg Hohwiller wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>> Hi
> Hello Mark,
>>
>> the freehep-nar-plugin does exactly what you describe.
>>
>> http://java.freehep.org/freehep-nar-plugin
> Thanks for the hint. This sounds promising.
> Anyways I am not creating system libraries, I just want to use them  
> in my
> project. From your documentation I could not really find how to get  
> startet
> in putting the *.so and *.dll files in a NAR file and define this  
> as dependency
> so my test-cases will have this available in java.library.path.
> Can you give me another hint how to archieve this?
>>
>> Regards
>> Mark Donszelmann
> Thanks
>   Jörg
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGGsQ9mPuec2Dcv/8RAqHRAJ9XVaB/LpVdkMxo7A+F9m9UtT8K3gCfY4tI
> WP8yvDPbVyxDUD4lCCVLRtg=
> =Nu4R
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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


Re: dependency on system library (java.library.path)

Posted by Joerg Hohwiller <jo...@j-hohwiller.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Hi
Hello Mark,
> 
> the freehep-nar-plugin does exactly what you describe.
> 
> http://java.freehep.org/freehep-nar-plugin
Thanks for the hint. This sounds promising.
Anyways I am not creating system libraries, I just want to use them in my
project. From your documentation I could not really find how to get startet
in putting the *.so and *.dll files in a NAR file and define this as dependency
so my test-cases will have this available in java.library.path.
Can you give me another hint how to archieve this?
> 
> Regards
> Mark Donszelmann
Thanks
  Jörg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGGsQ9mPuec2Dcv/8RAqHRAJ9XVaB/LpVdkMxo7A+F9m9UtT8K3gCfY4tI
WP8yvDPbVyxDUD4lCCVLRtg=
=Nu4R
-----END PGP SIGNATURE-----

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


RE: dependency on system library (java.library.path)

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Nice powerpoint on that site. In less than 3 mins, I already know a ton about the plugin and how it works. 

-----Original Message-----
From: Mark Donszelmann [mailto:Mark.Donszelmann@slac.stanford.edu] 
Sent: Friday, April 06, 2007 10:22 PM
To: Maven Developers List
Subject: Re: dependency on system library (java.library.path)

Hi

the freehep-nar-plugin does exactly what you describe.

http://java.freehep.org/freehep-nar-plugin

Regards
Mark Donszelmann

On Apr 6, 2007, at 5:33 PM, jason.dillon@gmail.com wrote:

> Its probably better to zip the natives up and then use the zip file  
> as the artifact, and then hook up support to extract them to some  
> tmp dir for inclusion in the library path.
>
> Would also be nice to have a standard artifact type/ext to use for  
> all share library types.
>
> And perhaps allow multipule arch files in the same artifact,  
> probably including some descriptor to configure while bits get  
> loaded for which platform.
>
> --jason
>
>
>
>
> -----Original Message-----
> From: Joerg Hohwiller <jo...@j-hohwiller.de>
> Date: Fri, 06 Apr 2007 21:24:53
> To:Maven Developers List <de...@maven.apache.org>
> Subject: dependency on system library (java.library.path)
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi there,
>
> I have already used SWT and GWT together with maven. Both need  
> native system
> libraries at some specific point. This causes trouble when running  
> code (e.g.
> test-cases) with maven.
>
> Are there any plans to add dependencies with <type>dll</type> (or
> <type>so</type>) to java.library.path?
>
> For system libraries however the name cares when it is loaded from  
> something
> that I can not control (foo-1.0.jar loads foo.dll and it can not be  
> named
> foo-1.0.dll).
> Is there a way to put various artifacts with different versions but  
> the same
> file-name into a maven repository? In other words: The filename of  
> an artifact
> is automatically derived from artifactId, version, classifier and  
> type. Is there
> a way to override this default behaviour and specify an explicit name?
> Example:
>
> org/eclipse/swt/swt-win32/3.2.1/swt-win32.dll
> org/eclipse/swt/swt-win32/3.2.2/swt-win32.dll
>
> <dependency>
>   <groupId>org.eclipse.swt</groupdId>
>   <artifactId>swt-win32</artifactId>
>   <version>3.2.2</version>
>   <type>dll</type>
>   <scope>runtime</scope>
>   <!-- something like this -->
>   <filename>swt-win32.dll</filename>
> </dependency>
>
> Thanks
>   Jörg
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGFp6EmPuec2Dcv/8RAoDjAKCJrr0xdI3iXUvYzLYiE2RLi45XLgCfThMo
> 1ecdAOdt55WlfcTYfE7AS+k=
> =W5G2
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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


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


Re: dependency on system library (java.library.path)

Posted by Mark Donszelmann <Ma...@slac.stanford.edu>.
Hi

the freehep-nar-plugin does exactly what you describe.

http://java.freehep.org/freehep-nar-plugin

Regards
Mark Donszelmann

On Apr 6, 2007, at 5:33 PM, jason.dillon@gmail.com wrote:

> Its probably better to zip the natives up and then use the zip file  
> as the artifact, and then hook up support to extract them to some  
> tmp dir for inclusion in the library path.
>
> Would also be nice to have a standard artifact type/ext to use for  
> all share library types.
>
> And perhaps allow multipule arch files in the same artifact,  
> probably including some descriptor to configure while bits get  
> loaded for which platform.
>
> --jason
>
>
>
>
> -----Original Message-----
> From: Joerg Hohwiller <jo...@j-hohwiller.de>
> Date: Fri, 06 Apr 2007 21:24:53
> To:Maven Developers List <de...@maven.apache.org>
> Subject: dependency on system library (java.library.path)
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi there,
>
> I have already used SWT and GWT together with maven. Both need  
> native system
> libraries at some specific point. This causes trouble when running  
> code (e.g.
> test-cases) with maven.
>
> Are there any plans to add dependencies with <type>dll</type> (or
> <type>so</type>) to java.library.path?
>
> For system libraries however the name cares when it is loaded from  
> something
> that I can not control (foo-1.0.jar loads foo.dll and it can not be  
> named
> foo-1.0.dll).
> Is there a way to put various artifacts with different versions but  
> the same
> file-name into a maven repository? In other words: The filename of  
> an artifact
> is automatically derived from artifactId, version, classifier and  
> type. Is there
> a way to override this default behaviour and specify an explicit name?
> Example:
>
> org/eclipse/swt/swt-win32/3.2.1/swt-win32.dll
> org/eclipse/swt/swt-win32/3.2.2/swt-win32.dll
>
> <dependency>
>   <groupId>org.eclipse.swt</groupdId>
>   <artifactId>swt-win32</artifactId>
>   <version>3.2.2</version>
>   <type>dll</type>
>   <scope>runtime</scope>
>   <!-- something like this -->
>   <filename>swt-win32.dll</filename>
> </dependency>
>
> Thanks
>   Jörg
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGFp6EmPuec2Dcv/8RAoDjAKCJrr0xdI3iXUvYzLYiE2RLi45XLgCfThMo
> 1ecdAOdt55WlfcTYfE7AS+k=
> =W5G2
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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


Re: dependency on system library (java.library.path)

Posted by ja...@gmail.com.
Its probably better to zip the natives up and then use the zip file as the artifact, and then hook up support to extract them to some tmp dir for inclusion in the library path. 

Would also be nice to have a standard artifact type/ext to use for all share library types. 

And perhaps allow multipule arch files in the same artifact, probably including some descriptor to configure while bits get loaded for which platform. 

--jason


  

-----Original Message-----
From: Joerg Hohwiller <jo...@j-hohwiller.de>
Date: Fri, 06 Apr 2007 21:24:53 
To:Maven Developers List <de...@maven.apache.org>
Subject: dependency on system library (java.library.path)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,

I have already used SWT and GWT together with maven. Both need native system
libraries at some specific point. This causes trouble when running code (e.g.
test-cases) with maven.

Are there any plans to add dependencies with <type>dll</type> (or
<type>so</type>) to java.library.path?

For system libraries however the name cares when it is loaded from something
that I can not control (foo-1.0.jar loads foo.dll and it can not be named
foo-1.0.dll).
Is there a way to put various artifacts with different versions but the same
file-name into a maven repository? In other words: The filename of an artifact
is automatically derived from artifactId, version, classifier and type. Is there
a way to override this default behaviour and specify an explicit name?
Example:

org/eclipse/swt/swt-win32/3.2.1/swt-win32.dll
org/eclipse/swt/swt-win32/3.2.2/swt-win32.dll

<dependency>
  <groupId>org.eclipse.swt</groupdId>
  <artifactId>swt-win32</artifactId>
  <version>3.2.2</version>
  <type>dll</type>
  <scope>runtime</scope>
  <!-- something like this -->
  <filename>swt-win32.dll</filename>
</dependency>

Thanks
  Jörg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGFp6EmPuec2Dcv/8RAoDjAKCJrr0xdI3iXUvYzLYiE2RLi45XLgCfThMo
1ecdAOdt55WlfcTYfE7AS+k=
=W5G2
-----END PGP SIGNATURE-----

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


Re: dependency on system library (java.library.path)

Posted by Joerg Hohwiller <jo...@j-hohwiller.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Eric,

> It should be a type, I agree. But if you are trying to keep moving, I just
> drop the dll in the repo directory with the GWT jar.
Thanks for the hint. This works for the GWT but NOT for a raw SWT project.
> 
> Eric
Regards
  Jörg
> 
> On 4/6/07, Joerg Hohwiller <jo...@j-hohwiller.de> wrote:
>>
> Hi there,
> 
> I have already used SWT and GWT together with maven. Both need native
> system
> libraries at some specific point. This causes trouble when running code (
> e.g.
> test-cases) with maven.
> 
> Are there any plans to add dependencies with <type>dll</type> (or
> <type>so</type>) to java.library.path?
> 
> For system libraries however the name cares when it is loaded from
> something
> that I can not control (foo-1.0.jar loads foo.dll and it can not be named
> foo-1.0.dll).
> Is there a way to put various artifacts with different versions but the
> same
> file-name into a maven repository? In other words: The filename of an
> artifact
> is automatically derived from artifactId, version, classifier and
> type. Is
> there
> a way to override this default behaviour and specify an explicit name?
> Example:
> 
> org/eclipse/swt/swt-win32/3.2.1/swt-win32.dll
> org/eclipse/swt/swt-win32/3.2.2/swt-win32.dll
> 
> <dependency>
>   <groupId>org.eclipse.swt</groupdId>
>   <artifactId>swt-win32</artifactId>
>   <version>3.2.2</version>
>   <type>dll</type>
>   <scope>runtime</scope>
>   <!-- something like this -->
>   <filename>swt-win32.dll</filename>
> </dependency>
> 
> Thanks
>   Jörg
>>
- ---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
>>
>>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGFqSVmPuec2Dcv/8RAgVJAKCHDiFlqqypM5I7/F5HFNzPYSHLpQCfXSqs
cc85ajbba0+YNQDCCkT/trc=
=IxmV
-----END PGP SIGNATURE-----

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


Re: dependency on system library (java.library.path)

Posted by Eric Redmond <er...@gmail.com>.
It should be a type, I agree. But if you are trying to keep moving, I just
drop the dll in the repo directory with the GWT jar.

Eric

On 4/6/07, Joerg Hohwiller <jo...@j-hohwiller.de> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi there,
>
> I have already used SWT and GWT together with maven. Both need native
> system
> libraries at some specific point. This causes trouble when running code (
> e.g.
> test-cases) with maven.
>
> Are there any plans to add dependencies with <type>dll</type> (or
> <type>so</type>) to java.library.path?
>
> For system libraries however the name cares when it is loaded from
> something
> that I can not control (foo-1.0.jar loads foo.dll and it can not be named
> foo-1.0.dll).
> Is there a way to put various artifacts with different versions but the
> same
> file-name into a maven repository? In other words: The filename of an
> artifact
> is automatically derived from artifactId, version, classifier and type. Is
> there
> a way to override this default behaviour and specify an explicit name?
> Example:
>
> org/eclipse/swt/swt-win32/3.2.1/swt-win32.dll
> org/eclipse/swt/swt-win32/3.2.2/swt-win32.dll
>
> <dependency>
>   <groupId>org.eclipse.swt</groupdId>
>   <artifactId>swt-win32</artifactId>
>   <version>3.2.2</version>
>   <type>dll</type>
>   <scope>runtime</scope>
>   <!-- something like this -->
>   <filename>swt-win32.dll</filename>
> </dependency>
>
> Thanks
>   Jörg
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGFp6EmPuec2Dcv/8RAoDjAKCJrr0xdI3iXUvYzLYiE2RLi45XLgCfThMo
> 1ecdAOdt55WlfcTYfE7AS+k=
> =W5G2
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
Eric Redmond
http://codehaus.org/~eredmond