Adding envar MAVEN_CMD_LINE_ARGS to shell scripts to provide consistency for accessing CLI args via env.MAVEN_CMD_LINE_ARGS user property (from plugins, for example).

This commit is contained in:
John Casey 2013-10-21 13:26:56 -05:00
parent b0acd5e73a
commit 70218af1c1
2 changed files with 8 additions and 0 deletions

View File

@ -182,6 +182,10 @@ if $cygwin; then
CLASSPATH=`cygpath --path --windows "$CLASSPATH"` CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
fi fi
# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
export MAVEN_CMD_LINE_ARGS="$@"
exec "$JAVACMD" \ exec "$JAVACMD" \
$MAVEN_OPTS \ $MAVEN_OPTS \
-classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \ -classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \

View File

@ -186,6 +186,10 @@ if $cygwin; then
CLASSPATH=`cygpath --path --windows "$CLASSPATH"` CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
fi fi
# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
export MAVEN_CMD_LINE_ARGS="$@"
exec "$JAVACMD" \ exec "$JAVACMD" \
$MAVEN_OPTS \ $MAVEN_OPTS \
$MAVEN_DEBUG_OPTS \ $MAVEN_DEBUG_OPTS \