You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2020/05/22 17:31:14 UTC

[maven] branch MNG-5937 updated: add validate script

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

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


The following commit(s) were added to refs/heads/MNG-5937 by this push:
     new 9899f29  add validate script
9899f29 is described below

commit 9899f298384d1ccc86f288e2f333261b0ca48a9b
Author: rfscholte <rf...@apache.org>
AuthorDate: Fri May 22 19:31:01 2020 +0200

    add validate script
---
 apache-maven/maven-wrapper.pom                |  2 +
 apache-maven/pom.xml                          |  2 +
 apache-maven/src/assembly/maven/component.xml |  2 +
 apache-maven/src/assembly/shared/init         | 90 ---------------------------
 apache-maven/src/assembly/shared/mvnvalidate  | 23 +++++++
 apache-maven/src/assembly/shared/validate     | 67 ++++++++++++++++++++
 apache-maven/src/assembly/wrapper/bin.xml     |  1 +
 apache-maven/src/assembly/wrapper/script.xml  |  1 +
 apache-maven/src/assembly/wrapper/source.xml  |  1 +
 9 files changed, 99 insertions(+), 90 deletions(-)

diff --git a/apache-maven/maven-wrapper.pom b/apache-maven/maven-wrapper.pom
index 0790ab5..455e3a6 100644
--- a/apache-maven/maven-wrapper.pom
+++ b/apache-maven/maven-wrapper.pom
@@ -43,9 +43,11 @@ under the License.
             <excludes combine.children="append">
               <exclude>src/assembly/maven/bin/m2.conf</exclude>
               <!-- these are partial scripts, resulting in mvn/mwnw scripts -->
+              <exclude>src/assembly/shared/init</exclude>
               <exclude>src/assembly/shared/init.cmd</exclude>
               <exclude>src/assembly/shared/mvnlauncher</exclude>
               <exclude>src/assembly/shared/mvnlauncher.cmd</exclude>
+              <exclude>src/assembly/shared/mvnvalidate</exclude>
               <exclude>src/assembly/shared/mvnvalidate.cmd</exclude>
               <exclude>src/assembly/shared/mvnwlauncher</exclude>
               <exclude>src/assembly/shared/mvnwlauncher.cmd</exclude>
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index 53c9bc6..99c4032 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -130,9 +130,11 @@ under the License.
             <excludes combine.children="append">
               <exclude>src/assembly/maven/bin/m2.conf</exclude>
               <!-- these are partial scripts, resulting in mvn/mwnw scripts -->
+              <exclude>src/assembly/shared/init</exclude>
               <exclude>src/assembly/shared/init.cmd</exclude>
               <exclude>src/assembly/shared/mvnlauncher</exclude>
               <exclude>src/assembly/shared/mvnlauncher.cmd</exclude>
+              <exclude>src/assembly/shared/mvnvalidate</exclude>
               <exclude>src/assembly/shared/mvnvalidate.cmd</exclude>
               <exclude>src/assembly/shared/mvnwlauncher</exclude>
               <exclude>src/assembly/shared/mvnwlauncher.cmd</exclude>
diff --git a/apache-maven/src/assembly/maven/component.xml b/apache-maven/src/assembly/maven/component.xml
index b7b79fa..9befc3b 100644
--- a/apache-maven/src/assembly/maven/component.xml
+++ b/apache-maven/src/assembly/maven/component.xml
@@ -118,6 +118,8 @@ under the License.
     </file>
     <file>
       <sources>
+        <source>src/assembly/shared/validate</source>
+        <source>src/assembly/shared/mvnvalidate</source>
         <source>src/assembly/shared/init</source>
         <source>src/assembly/shared/mvnlauncher</source>
         <source>src/assembly/shared/run</source>
diff --git a/apache-maven/src/assembly/shared/init b/apache-maven/src/assembly/shared/init
index ff8e770..25e22d3 100755
--- a/apache-maven/src/assembly/shared/init
+++ b/apache-maven/src/assembly/shared/init
@@ -1,93 +1,3 @@
-#!/bin/sh
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# -----------------------------------------------------------------------------
-# Apache Maven Startup Script
-#
-# Environment Variable Prerequisites
-#
-#   JAVA_HOME       Must point at your Java Development Kit installation.
-#   MAVEN_OPTS      (Optional) Java runtime options used when Maven is executed.
-#   MAVEN_SKIP_RC   (Optional) Flag to disable loading of mavenrc files.
-# -----------------------------------------------------------------------------
-
-if [ -z "$MAVEN_SKIP_RC" ] ; then
-
-  if [ -f /etc/mavenrc ] ; then
-    . /etc/mavenrc
-  fi
-
-  if [ -f "$HOME/.mavenrc" ] ; then
-    . "$HOME/.mavenrc"
-  fi
-
-fi
-
-# OS specific support. $var _must_ be set to either true or false.
-cygwin=false;
-mingw=false
-darwin=false;
-case "`uname`" in
-  CYGWIN*) cygwin=true ;;
-  MINGW*) mingw=true;;
-  Darwin*) darwin=true
-    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
-    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
-    if [ -z "$JAVA_HOME" ]; then
-      if [ -x "/usr/libexec/java_home" ]; then
-        export JAVA_HOME="`/usr/libexec/java_home`"
-      else
-        export JAVA_HOME="/Library/Java/Home"
-      fi
-    fi
-    ;;
-esac
-
-if [ -z "$JAVA_HOME" ] ; then
-  if [ -r /etc/gentoo-release ] ; then
-    JAVA_HOME=`java-config --jre-home`
-  fi
-fi
-
-## resolve links - $0 may be a link to Maven's home
-PRG="$0"
-
-# need this for relative symlinks
-while [ -h "$PRG" ] ; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG="`dirname "$PRG"`/$link"
-  fi
-done
-
-saveddir=`pwd`
-
-MAVEN_HOME=`dirname "$PRG"`/..
-
-# make it fully qualified
-MAVEN_HOME=`cd "$MAVEN_HOME" && pwd`
-
-cd "$saveddir"
-
 # For Cygwin, ensure paths are in Unix format before anything is touched
 if $cygwin ; then
   [ -n "$MAVEN_HOME" ] &&
diff --git a/apache-maven/src/assembly/shared/mvnvalidate b/apache-maven/src/assembly/shared/mvnvalidate
new file mode 100644
index 0000000..ca93607
--- /dev/null
+++ b/apache-maven/src/assembly/shared/mvnvalidate
@@ -0,0 +1,23 @@
+## resolve links - $0 may be a link to Maven's home
+PRG="$0"
+
+# need this for relative symlinks
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG="`dirname "$PRG"`/$link"
+  fi
+done
+
+saveddir=`pwd`
+
+MAVEN_HOME=`dirname "$PRG"`/..
+
+# make it fully qualified
+MAVEN_HOME=`cd "$MAVEN_HOME" && pwd`
+
+cd "$saveddir"
+
diff --git a/apache-maven/src/assembly/shared/validate b/apache-maven/src/assembly/shared/validate
new file mode 100644
index 0000000..f510eaf
--- /dev/null
+++ b/apache-maven/src/assembly/shared/validate
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# -----------------------------------------------------------------------------
+# Apache Maven Startup Script
+#
+# Environment Variable Prerequisites
+#
+#   JAVA_HOME       Must point at your Java Development Kit installation.
+#   MAVEN_OPTS      (Optional) Java runtime options used when Maven is executed.
+#   MAVEN_SKIP_RC   (Optional) Flag to disable loading of mavenrc files.
+# -----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+mingw=false
+darwin=false;
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
diff --git a/apache-maven/src/assembly/wrapper/bin.xml b/apache-maven/src/assembly/wrapper/bin.xml
index 0a9270b..0fef032 100644
--- a/apache-maven/src/assembly/wrapper/bin.xml
+++ b/apache-maven/src/assembly/wrapper/bin.xml
@@ -64,6 +64,7 @@ under the License.
     </file>
     <file>
       <sources>
+        <source>src/assembly/shared/validate</source>
         <source>src/assembly/shared/init</source>
         <source>src/assembly/shared/mvnwlauncher</source>
         <source>src/assembly/shared/run</source>
diff --git a/apache-maven/src/assembly/wrapper/script.xml b/apache-maven/src/assembly/wrapper/script.xml
index 066078d..b01eece 100644
--- a/apache-maven/src/assembly/wrapper/script.xml
+++ b/apache-maven/src/assembly/wrapper/script.xml
@@ -55,6 +55,7 @@ under the License.
     </file>
     <file>
       <sources>
+        <source>src/assembly/shared/validate</source>
         <source>src/assembly/shared/init</source>
         <source>src/assembly/shared/mvnwlauncher</source>
         <source>src/assembly/wrapper/script/download</source>
diff --git a/apache-maven/src/assembly/wrapper/source.xml b/apache-maven/src/assembly/wrapper/source.xml
index 6dd16a7..2dd27a3 100644
--- a/apache-maven/src/assembly/wrapper/source.xml
+++ b/apache-maven/src/assembly/wrapper/source.xml
@@ -55,6 +55,7 @@ under the License.
     </file>
     <file>
       <sources>
+        <source>src/assembly/shared/validate</source>
         <source>src/assembly/shared/init</source>
         <source>src/assembly/shared/mvnwlauncher</source>
         <source>src/assembly/wrapper/source/download</source>