You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2017/03/05 10:40:33 UTC

[jira] [Commented] (MNG-6115) Add Jansi native library search path to our start scripts to avoid extraction to temp file on each run

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

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

Just read the commit. I can only say: ouch. Not only we are duplicating the HawtJNI code, we are putting a lot of effort for just one library to load a native shared object. I would rather have two things:

1. Have Jansi remove the native libs from the default JAR and provide a attached artifact with them. Leave the task to the user adding the precompiled version to {{java.library.path}}.
2. Improve HawtJNI to load from an exploded directly just like it would be a JAR.

Consider that Jansi requires only one native operation: [org.fusesource.jansi.internal.CLibrary.isatty|http://pubs.opengroup.org/onlinepubs/7990989799/xsh/isatty.html].

> Add Jansi native library search path to our start scripts to avoid extraction to temp file on each run
> ------------------------------------------------------------------------------------------------------
>
>                 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)