Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7172

Remove expansion of Jansi native libraries

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Task
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 3.8.2, 4.0.0-alpha-2, 4.0.0
    • None
    • None


      (Copying from MNG-7165)


      With the latest SNAPSHOT (downloaded from https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven/job/master/169/artifact/org/apache/maven/apache-maven/4.0.0-alpha-1-SNAPSHOT/apache-maven-4.0.0-alpha-1-SNAPSHOT-bin.tar.gz) I get

      ./mvn --version
      Failed to load native library:libjansi.jnilib. osinfo: Mac/x86_64
      java.lang.UnsatisfiedLinkError: /Users/konradwindszus/Downloads/apache-maven/lib/jansi-native/Mac/x86_64/libjansi.jnilib: dlopen(/Users/konradwindszus/Downloads/apache-maven/lib/jansi-native/Mac/x86_64/libjansi.jnilib, 1): no suitable image found.  Did find:
      	/Users/konradwindszus/Downloads/apache-maven/lib/jansi-native/Mac/x86_64/libjansi.jnilib: code signature in (/Users/konradwindszus/Downloads/apache-maven/lib/jansi-native/Mac/x86_64/libjansi.jnilib) not valid for use in process using Library Validation: library load disallowed by system policy
      Apache Maven 4.0.0-alpha-1-SNAPSHOT (371faf7a49298bd1752632c2675aa499fee64667)
      Maven home: /Users/konradwindszus/Downloads/apache-maven
      Java version: 11.0.11, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
      Default locale: en_DE, platform encoding: UTF-8
      OS name: "mac os x", version: "11.4", arch: "x86_64", family: "mac"

      And Mac OS shows a warning “libjansi.jnilib” cannot be opened because the developer cannot be verified..

      Is the last version of JAnsi included in Maven properly signed?

      Options we have:

      Do nothing
      consistent use of JAnsi for all OSes
      no additional extraction of native libraries
      Annoying popup + warning for MacOS users (although as intended due to its security policy)

      Exclude lib/jansi-native/osx
      Maven runs without popup/warning
      no additional extraction of native libraries
      inconsistent use of JAnsi for OSes

      Don't unpack to lib/jansi-native
      consistent use of JAnsi for all OSes
      Maven will have extra overhead for every run due to extracting jansi-native

      Unpack lib/jansi-native on first use
      consistent use of JAnsi for all OSes
      In general we consider conf/ as the only directory that can be changed after installing. Now lib/jansi-native would become a "dynamic" directory.

      Get a signed native library for MacOS
      consistent use of JAnsi for all OSes
      somebody needs to build & sign the JAnsi native lib (requires a Mac and an Apple Developer ID)


        1. mng-7172-1.jpg
          34 kB
          Maarten Mulders
        2. mng-7172-2.jpg
          81 kB
          Maarten Mulders


          This comment will be Viewable by All Users Viewable by All Users


            rfscholte Robert Scholte
            kwin Konrad Windszus
            0 Vote for this issue
            6 Start watching this issue




                Issue deployment