File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -226,12 +226,21 @@ export MAVEN_CMD_LINE_ARGS
226
226
227
227
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
228
228
229
+ echo " Running version check for the first time to ensure all jars are downloaded. Without this wrong version might be chosen"
229
230
VERSION=$( exec " $JAVACMD " \
230
231
$MAVEN_OPTS \
231
232
-classpath " $MAVEN_PROJECTBASEDIR /.mvn/wrapper/maven-wrapper.jar" \
232
233
" -Dmaven.home=${M2_HOME} " " -Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR} " \
233
234
-Dexec.executable=" echo" -Dexec.args=' ${project.version}' ${WRAPPER_LAUNCHER} -q --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec )
234
235
236
+ echo " Running version check for the second time in order to output only the version"
237
+ VERSION=$( exec " $JAVACMD " \
238
+ $MAVEN_OPTS \
239
+ -classpath " $MAVEN_PROJECTBASEDIR /.mvn/wrapper/maven-wrapper.jar" \
240
+ " -Dmaven.home=${M2_HOME} " " -Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR} " \
241
+ -Dexec.executable=" echo" -Dexec.args=' ${project.version}' ${WRAPPER_LAUNCHER} -q --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec )
242
+ echo " The found version is [${VERSION} ]"
243
+
235
244
if echo $VERSION | egrep -q ' M|RC' ; then
236
245
echo Activating \" milestone\" profile for version=\" $VERSION \"
237
246
echo $MAVEN_ARGS | grep -q milestone || MAVEN_ARGS=" $MAVEN_ARGS -Pmilestone"
You can’t perform that action at this time.
0 commit comments