maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MNG-6115) Add Jansi native library search path to our start scripts
Date Sat, 04 Mar 2017 20:29:46 GMT

    [ https://issues.apache.org/jira/browse/MNG-6115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15895862#comment-15895862
] 

Michael Osipov commented on MNG-6115:
-------------------------------------

[~hboutemy], all the hard work is done by HawtJNI, see [here|https://github.com/fusesource/hawtjni/blob/master/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java].
[~rfscholte], this won't work. See [here|https://github.com/fusesource/hawtjni/blob/master/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java#L175-L185].
OS and arch are only evaluated if the library it is extracted from the JAR.

Unless someone changes HawtJNI to our needs, this won't scale. I would ship a modified JAR
without {{jansi-1.13.jar!/META-INF/native}} (or rename) to avoid the constant extraction,
add the patch Hervé did and add documentation for users if they need {{istty}} support, they
have to place {{libjansi.so}}/{{libjansi.dylib}}/{{jansi.dll}} to {{$\{maven.home}/lib/ext}}.

Personally, I would people expect to put the library to {{/usr/local/lib}} once. This is where
a native lib belongs and modify {{library.jansi.path}}. This is what I will recommend for
the FreeBSD port of Maven. Alternatively, the user can always set {{LD_LIBRARY_PATH}} in his
{{mavenrc}} pointing to the directory where the native lib resides.

There is a reason why I have created this ticket months ago.

> Add Jansi native library search path to our start scripts
> ---------------------------------------------------------
>
>                 Key: MNG-6115
>                 URL: https://issues.apache.org/jira/browse/MNG-6115
>             Project: Maven
>          Issue Type: Improvement
>          Components: Bootstrap & Build, Command Line
>            Reporter: Michael Osipov
>            Assignee: Hervé Boutemy
>             Fix For: 3.5.0-alpha-2
>
>
> By default Jansi extracts the native, shared library to temp which results in unnecessary
file I/O and a huge amount of temp files when Maven is run very often. One can avoid that
by adding {{-Dlibrary.jansi.path=$\{MAVEN_HOME\}/lib/ext}} to the start script. The user has
to copy the {{libjansi.so}} or {{jansi.dll}} once and will avoid the overhead.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message