From 2b0a5e9dc7e61315addcde6d5df75a5f30d7088c Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Thu, 15 Sep 2016 16:10:58 +0200 Subject: [PATCH] Updating mvnw for all projects --- mvnw | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mvnw b/mvnw index fe1957e3..a1af4c42 100755 --- a/mvnw +++ b/mvnw @@ -226,12 +226,21 @@ export MAVEN_CMD_LINE_ARGS WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain +echo "Running version check for the first time to ensure all jars are downloaded. Without this wrong version might be chosen" VERSION=$(exec "$JAVACMD" \ $MAVEN_OPTS \ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ -Dexec.executable="echo" -Dexec.args='${project.version}' ${WRAPPER_LAUNCHER} -q --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec ) +echo "Running version check for the second time in order to output only the version" +VERSION=$(exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + -Dexec.executable="echo" -Dexec.args='${project.version}' ${WRAPPER_LAUNCHER} -q --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec ) +echo "The found version is [${VERSION}]" + if echo $VERSION | egrep -q 'M|RC'; then echo Activating \"milestone\" profile for version=\"$VERSION\" echo $MAVEN_ARGS | grep -q milestone || MAVEN_ARGS="$MAVEN_ARGS -Pmilestone"