You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2021/09/16 20:11:26 UTC

[maven] branch master updated: [MNG-7254] Expand Windows native libraries for Jansi due to JDK-8195129 (workaround)

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new 8c297e9  [MNG-7254] Expand Windows native libraries for Jansi due to JDK-8195129 (workaround)
8c297e9 is described below

commit 8c297e93a3d4d4e41130b87fa24271194eabdded
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Thu Sep 16 13:52:15 2021 +0200

    [MNG-7254] Expand Windows native libraries for Jansi due to JDK-8195129 (workaround)
    
    This closes #542
---
 apache-maven/pom.xml                                     | 16 ++++++++++++++++
 apache-maven/src/assembly/maven/component.xml            |  7 +++++++
 .../src/assembly/maven/lib/jansi-native/README.txt       |  8 ++++++++
 apache-maven/src/assembly/shared/run                     |  1 +
 apache-maven/src/assembly/shared/run.cmd                 |  1 +
 5 files changed, 33 insertions(+)

diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index 15de95f..40917d5 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -146,6 +146,22 @@ under the License.
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <configuration>
+          <includeArtifactIds>jansi</includeArtifactIds>
+          <includes>org/fusesource/jansi/internal/native/Windows/**</includes>
+        </configuration>
+        <executions>
+          <execution>
+            <id>unpack-jansi-native</id>
+            <goals>
+              <goal>unpack-dependencies</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <executions>
           <execution>
diff --git a/apache-maven/src/assembly/maven/component.xml b/apache-maven/src/assembly/maven/component.xml
index b828712..a82a7d3 100644
--- a/apache-maven/src/assembly/maven/component.xml
+++ b/apache-maven/src/assembly/maven/component.xml
@@ -73,6 +73,13 @@ under the License.
       <lineEnding>dos</lineEnding>
     </fileSet>
     <fileSet>
+      <directory>target/dependency/org/fusesource/jansi/internal/native</directory>
+      <outputDirectory>lib/jansi-native</outputDirectory>
+      <includes>
+        <include>**</include>
+      </includes>
+    </fileSet>
+	<fileSet>
       <directory>src/assembly/maven/bin</directory>
       <outputDirectory>bin</outputDirectory>
       <includes>
diff --git a/apache-maven/src/assembly/maven/lib/jansi-native/README.txt b/apache-maven/src/assembly/maven/lib/jansi-native/README.txt
new file mode 100644
index 0000000..26a957e
--- /dev/null
+++ b/apache-maven/src/assembly/maven/lib/jansi-native/README.txt
@@ -0,0 +1,8 @@
+This directory contains Jansi native libraries extracted from Jansi JAR.
+
+You can add your own build for platforms not natively supported by Jansi.
+See here [1] on how to compile for your platform and and here [2] how libraries
+follow Jansi's directory and filename conventions.
+
+[1] https://github.com/fusesource/jansi/tree/master/src/main/native
+[2] https://github.com/fusesource/jansi/blob/321a8ff71c731e10f4ea05c607860180276b2215/src/main/java/org/fusesource/jansi/internal/OSInfo.java
diff --git a/apache-maven/src/assembly/shared/run b/apache-maven/src/assembly/shared/run
index 676bfdd..0b2c1bd 100755
--- a/apache-maven/src/assembly/shared/run
+++ b/apache-maven/src/assembly/shared/run
@@ -14,5 +14,6 @@ exec "$JAVACMD" \
   -classpath "$LAUNCHER_JAR" \
   "-Dclassworlds.conf=$CLASSWORLDS_CONF" \
   "-Dmaven.home=$MAVEN_HOME" \
+  "-Dlibrary.jansi.path=${MAVEN_HOME}/lib/jansi-native" \
   "-Dmaven.multiModuleProjectDirectory=$MAVEN_PROJECTBASEDIR" \
   $MAVEN_LAUNCHER "$@"
diff --git a/apache-maven/src/assembly/shared/run.cmd b/apache-maven/src/assembly/shared/run.cmd
index 717dea6..2ce22ac 100755
--- a/apache-maven/src/assembly/shared/run.cmd
+++ b/apache-maven/src/assembly/shared/run.cmd
@@ -5,6 +5,7 @@
   -classpath %LAUNCHER_JAR% ^
   "-Dclassworlds.conf=%CLASSWORLDS_CONF%" ^
   "-Dmaven.home=%MAVEN_HOME%" ^
+  "-Dlibrary.jansi.path=%MAVEN_HOME%\lib\jansi-native" ^
   "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
   %MAVEN_LAUNCHER% %*
 if ERRORLEVEL 1 goto error