maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylwester Lachiewicz (JIRA)" <>
Subject [jira] [Commented] (MNG-5448) Putting dll/so-type dependencies on java.library.path by default
Date Sun, 13 Jan 2019 23:44:00 GMT


Sylwester Lachiewicz commented on MNG-5448:

This issue has been auto closed because it has been inactive for a long period of time. If
you think this issue still applies, retest your problem with the most recent version of Maven
and the affected component, reopen and post your results.

> Putting dll/so-type dependencies on java.library.path by default
> ----------------------------------------------------------------
>                 Key: MNG-5448
>                 URL:
>             Project: Maven
>          Issue Type: Bug
>            Reporter: Markus Karg
>            Priority: Major
> Many people are using Maven to build products that are using native dependencies (e.
g. using JNI directly or indirectly). These people have to declare in some way this dependency,
so Maven will download the DLL/SO to [target]. But what they also need is to tell Java that
the target folder has to be scanned for the DLL/SO, hence they need to set java.library path.
> There are several solutions but all of them lack one thing: They are no default but always
do "tricks". This is a problem, because:
> * m2e needs to tell Eclipse where to find DLLs.
> * There might be other tools that want to read or write the POM.
> * How should different tools understand that DLL dependencies are to be put on java.library.path
if there is no STANDARD way to find this information in the POM?
> The only "real" solution would be that Maven 3.1 clearly defines the one and only unique
> In my opinion the way clearly means:
> * Clearly define that any <packaging>dll</packaging> and <packaging>exe</packaging>
dependencies MUST be put to [target/native] and that [target/native] MUST be part of java.library.path!
> That way, it will become most simple to use any DLL/SO as a dependency, either Maven-built
or not. And it will be absolutely clear to m2e and any other tools that such dependencies
must be told to Eclipse and other environments as to be put on the java.library.path!
> I do not say that it must exactly work THIS way, but what I really like to say is that
Maven MUST provide ONE and EXACTLY ONE clear and unambiguous way to tell ANY POM-reading tool
that a dependency is a DLL/SO and MUST be found on java.library.path in turn.
> This is NOT up to the POM author, as it is pretty clear that ANY DLL/SO that is a dependency
only serves the single and simple purpose of BEING on java.library.path -- otherwise one would
not have made it a dependency!
> I mean, ANY JAR dependency is put on the CLASSPATH already, so it makes pretty much sense
to do the same with DLL/SO dependency and java.library.path!

This message was sent by Atlassian JIRA

View raw message