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/08/02 19:10:21 UTC

[maven] branch MNG-7205 updated (d35a6bc -> 5acdfb6)

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

michaelo pushed a change to branch MNG-7205
in repository https://gitbox.apache.org/repos/asf/maven.git.


 discard d35a6bc  dd
 discard d3359a1  [MNG-7205] Simplify/unify Cygwin/MingGW handling in startup scripts
     new 5acdfb6  [MNG-7205] Simplify/unify Cygwin/MingGW handling in startup scripts

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (d35a6bc)
            \
             N -- N -- N   refs/heads/MNG-7205 (5acdfb6)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:

[maven] 01/01: [MNG-7205] Simplify/unify Cygwin/MingGW handling in startup scripts

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5acdfb665035c5e57c50a9f8198dee53da674df6
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Mon Aug 2 19:46:38 2021 +0200

    [MNG-7205] Simplify/unify Cygwin/MingGW handling in startup scripts
    
    This closes #520
---
 apache-maven/src/assembly/shared/init        | 28 +++-------------------------
 apache-maven/src/assembly/shared/mvnlauncher |  2 +-
 apache-maven/src/assembly/shared/run         | 20 +++++++++-----------
 apache-maven/src/assembly/shared/validate    |  1 -
 4 files changed, 13 insertions(+), 38 deletions(-)

diff --git a/apache-maven/src/assembly/shared/init b/apache-maven/src/assembly/shared/init
index d1c79b2..fe8780b 100755
--- a/apache-maven/src/assembly/shared/init
+++ b/apache-maven/src/assembly/shared/init
@@ -1,21 +1,9 @@
-CLASSWORLDS_CONF="${MAVEN_HOME}/bin/m2.conf"
+CLASSWORLDS_CONF="$MAVEN_HOME/bin/m2.conf"
 
-# For Cygwin, ensure paths are in Unix format before anything is touched
-if $cygwin ; then
-  [ -n "$MAVEN_HOME" ] &&
-    MAVEN_HOME=`cygpath --unix "$MAVEN_HOME"`
+# For Cygwin and MinGW, ensure paths are in Unix format before anything is touched
+if $cygwin || $mingw ; then
   [ -n "$JAVA_HOME" ] &&
     JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-  [ -n "$CLASSPATH" ] &&
-    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-fi
-
-# For Mingw, ensure paths are in Unix format before anything is touched
-if $mingw ; then
-  [ -n "$MAVEN_HOME" ] &&
-    MAVEN_HOME=`(cd "$MAVEN_HOME"; pwd)`
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`(cd "$JAVA_HOME"; pwd)`
 fi
 
 if [ -n "$JAVA_HOME" ] ; then
@@ -96,13 +84,3 @@ concat_lines() {
 
 MAVEN_PROJECTBASEDIR="`find_maven_basedir "$@"`"
 MAVEN_OPTS="`concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config"` $MAVEN_OPTS"
-
-# For Cygwin, switch project base directory path to Windows format before
-# executing Maven otherwise this will cause Maven not to consider it.
-if $cygwin ; then
-  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
-  MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
-fi
-
-export MAVEN_PROJECTBASEDIR
-
diff --git a/apache-maven/src/assembly/shared/mvnlauncher b/apache-maven/src/assembly/shared/mvnlauncher
index 943239b..c523a1d 100644
--- a/apache-maven/src/assembly/shared/mvnlauncher
+++ b/apache-maven/src/assembly/shared/mvnlauncher
@@ -1,3 +1,3 @@
-LAUNCHER_JAR=`echo "${MAVEN_HOME}"/boot/plexus-classworlds-*.jar`
+LAUNCHER_JAR=`echo "$MAVEN_HOME"/boot/plexus-classworlds-*.jar`
 MAVEN_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
 
diff --git a/apache-maven/src/assembly/shared/run b/apache-maven/src/assembly/shared/run
index 7e8d72a..676bfdd 100755
--- a/apache-maven/src/assembly/shared/run
+++ b/apache-maven/src/assembly/shared/run
@@ -1,20 +1,18 @@
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-  [ -n "$MAVEN_HOME" ] &&
-    MAVEN_HOME=`cygpath --path --windows "$MAVEN_HOME"`
+# For Cygwin and MinGW, switch paths to Windows format before running java(1) command
+if $cygwin || $mingw ; then
   [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
-  [ -n "$CLASSPATH" ] &&
-    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
-  [ -n "$LAUNCHER_JAR" ] &&
-    LAUNCHER_JAR=`cygpath --path --windows "$LAUNCHER_JAR"`
+    JAVA_HOME=`cygpath --windows "$JAVA_HOME"`
+  LAUNCHER_JAR=`cygpath --windows "$LAUNCHER_JAR"`
+  CLASSWORLDS_CONF=`cygpath --windows "$CLASSWORLDS_CONF"`
+  MAVEN_HOME=`cygpath --windows "$MAVEN_HOME"`
+  MAVEN_PROJECTBASEDIR=`cygpath --windows "$MAVEN_PROJECTBASEDIR"`
 fi
 
 exec "$JAVACMD" \
   $MAVEN_OPTS \
   $MAVEN_DEBUG_OPTS \
-  -classpath "${LAUNCHER_JAR}" \
+  -classpath "$LAUNCHER_JAR" \
   "-Dclassworlds.conf=$CLASSWORLDS_CONF" \
   "-Dmaven.home=$MAVEN_HOME" \
-  "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  "-Dmaven.multiModuleProjectDirectory=$MAVEN_PROJECTBASEDIR" \
   $MAVEN_LAUNCHER "$@"
diff --git a/apache-maven/src/assembly/shared/validate b/apache-maven/src/assembly/shared/validate
index 20603f1..0d22a8b 100644
--- a/apache-maven/src/assembly/shared/validate
+++ b/apache-maven/src/assembly/shared/validate
@@ -51,4 +51,3 @@ case "`uname`" in
   MINGW*) mingw=true;;
 esac
 
-