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/03/04 03:49:13 UTC
[5/5] maven git commit: [MNG-6115] prevent writing temp-files to
lib/ext/
[MNG-6115] prevent writing temp-files to lib/ext/
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/5ee18b33
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/5ee18b33
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/5ee18b33
Branch: refs/heads/MNG-6115
Commit: 5ee18b33b30a3866eb7d205b3cf0ebe24ae59cf9
Parents: 748551d
Author: rfscholte <rf...@apache.org>
Authored: Sun Feb 26 00:09:43 2017 +0100
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Sat Mar 4 04:48:44 2017 +0100
----------------------------------------------------------------------
apache-maven/src/bin/mvn | 8 +++++++-
apache-maven/src/bin/mvn.cmd | 4 +++-
2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/5ee18b33/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index cfb39b0..a262243 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -117,6 +117,13 @@ if $cygwin ; then
CLASSWORLDS_JAR=`cygpath --path --windows "$CLASSWORLDS_JAR"`
fi
+for libjansi in ${MAVEN_HOME}/lib/ext/libjansi-* ; do
+ if [ -x "$libjansi" ] ; then
+ MAVEN_OPTS="$MAVEN_OPTS -Dlibrary.jansi.path=${libjansi}"
+ break
+ fi
+done
+
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
@@ -191,5 +198,4 @@ exec "$JAVACMD" \
-classpath "${CLASSWORLDS_JAR}" \
"-Dclassworlds.conf=${MAVEN_HOME}/bin/m2.conf" \
"-Dmaven.home=${MAVEN_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
- "-Dlibrary.jansi.path=${MAVEN_HOME}/lib/ext" \
${CLASSWORLDS_LAUNCHER} "$@"
http://git-wip-us.apache.org/repos/asf/maven/blob/5ee18b33/apache-maven/src/bin/mvn.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index c86662b..36d9993 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -170,6 +170,8 @@ for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do s
for %%i in ("%MAVEN_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+if exist "%MAVEN_HOME%\lib\ext\jansi.dll" set "JANSI_ARGS=-Dlibrary.jansi.path=%MAVEN_HOME%\lib\ext\jansi.dll"
+
"%JAVACMD%" ^
%JVM_CONFIG_MAVEN_PROPS% ^
%MAVEN_OPTS% ^
@@ -178,7 +180,7 @@ set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
"-Dclassworlds.conf=%MAVEN_HOME%\bin\m2.conf" ^
"-Dmaven.home=%MAVEN_HOME%" ^
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
- "-Dlibrary.jansi.path=%MAVEN_HOME%\lib\ext" ^
+ %JANSI_ARGS% ^
%CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
if ERRORLEVEL 1 goto error
goto end