You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2017/05/06 16:29:30 UTC
[1/2] maven git commit: [MNG-6205] upgraded JAnsi to 1.16 for console
encoding fix
Repository: maven
Updated Branches:
refs/heads/MNG-6205 [created] d9315fffb
[MNG-6205] upgraded JAnsi to 1.16 for console encoding fix
also fixes MNG-6218 MinGW bash detection fixed by JAnsi 1.14
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/db98a17b
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/db98a17b
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/db98a17b
Branch: refs/heads/MNG-6205
Commit: db98a17b0fa6b3d532e4d3c9ee37d2a533cd4373
Parents: f7d4bce
Author: Hervé Boutemy <hb...@apache.org>
Authored: Sat May 6 18:25:36 2017 +0200
Committer: Hervé Boutemy <hb...@apache.org>
Committed: Sat May 6 18:25:36 2017 +0200
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/db98a17b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2962487..e16d93b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -277,7 +277,7 @@ under the License.
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
- <version>1.13</version>
+ <version>1.16</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
[2/2] maven git commit: [MNG-6186] use enhanced HawtJNI library
loading (remove previous hack)
Posted by hb...@apache.org.
[MNG-6186] use enhanced HawtJNI library loading (remove previous hack)
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/d9315fff
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/d9315fff
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/d9315fff
Branch: refs/heads/MNG-6205
Commit: d9315fffbe014378a3bbd9d4ba1072fc24ddf79a
Parents: db98a17
Author: Hervé Boutemy <hb...@apache.org>
Authored: Sat May 6 18:28:04 2017 +0200
Committer: Hervé Boutemy <hb...@apache.org>
Committed: Sat May 6 18:28:04 2017 +0200
----------------------------------------------------------------------
apache-maven/src/bin/mvn | 4 +-
apache-maven/src/bin/mvn.cmd | 1 +
.../java/org/apache/maven/cli/MavenCli.java | 59 --------------------
3 files changed, 4 insertions(+), 60 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/d9315fff/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 623b5f2..2e6ba22 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -191,5 +191,7 @@ exec "$JAVACMD" \
$MAVEN_DEBUG_OPTS \
-classpath "${CLASSWORLDS_JAR}" \
"-Dclassworlds.conf=${MAVEN_HOME}/bin/m2.conf" \
- "-Dmaven.home=${MAVEN_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ "-Dmaven.home=${MAVEN_HOME}" \
+ "-Dlibrary.jansi.path=${MAVEN_HOME}/jansi-native" \
+ "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${CLASSWORLDS_LAUNCHER} "$@"
http://git-wip-us.apache.org/repos/asf/maven/blob/d9315fff/apache-maven/src/bin/mvn.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index 9d92279..b91480a 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -177,6 +177,7 @@ set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
-classpath %CLASSWORLDS_JAR% ^
"-Dclassworlds.conf=%MAVEN_HOME%\bin\m2.conf" ^
"-Dmaven.home=%MAVEN_HOME%" ^
+ "-Dlibrary.jansi.path=%MAVEN_HOME%\jansi-native" ^
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
%CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
if ERRORLEVEL 1 goto error
http://git-wip-us.apache.org/repos/asf/maven/blob/d9315fff/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index 79ab45d..e1e58c8 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -188,7 +188,6 @@ public class MavenCli
{
MavenCli cli = new MavenCli();
- prepareJansiNative();
MessageUtils.systemInstall();
int result = cli.doMain( new CliRequest( args, classWorld ) );
MessageUtils.systemUninstall();
@@ -196,64 +195,6 @@ public class MavenCli
return result;
}
- /**
- * temporary method while improvement reported to JAnsi+HawtJNI and integrated:
- * library.jansi.path should point to lib/jansi-native and HawtJNI should be able to detect
- * the platform instead of forcing the user having to point library.jansi.path to
- * lib/jansi-native/[platform]
- */
- private static void prepareJansiNative()
- {
- if ( System.getProperty( "library.jansi.path" ) == null )
- {
- String mavenHome = System.getProperty( "maven.home" );
-
- if ( mavenHome != null )
- {
- File jansiNative = new File( mavenHome, "lib/jansi-native/" + hawtJNIgetPlatform() );
- System.setProperty( "library.jansi.path", jansiNative.getAbsolutePath() );
- }
- }
- }
-
- private static String hawtJNIgetOperatingSystem()
- {
- String name = System.getProperty( "os.name" ).toLowerCase().trim();
- if ( name.startsWith( "linux" ) )
- {
- return "linux";
- }
- if ( name.startsWith( "mac os x" ) )
- {
- return "osx";
- }
- if ( name.startsWith( "win" ) )
- {
- return "windows";
- }
- return name.replaceAll( "\\W+", "_" );
-
- }
-
- private static String hawtJNIgetPlatform()
- {
- return hawtJNIgetOperatingSystem() + hawtJNIgetBitModel();
- }
-
- private static int hawtJNIgetBitModel()
- {
- String prop = System.getProperty( "sun.arch.data.model" );
- if ( prop == null )
- {
- prop = System.getProperty( "com.ibm.vm.bitmode" );
- }
- if ( prop != null )
- {
- return Integer.parseInt( prop );
- }
- return -1; // we don't know..
- }
-
// TODO need to externalize CliRequest
public static int doMain( String[] args, ClassWorld classWorld )
{