Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apache-maven/src/bin/mvn
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ export MAVEN_PROJECTBASEDIR
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
export MAVEN_CMD_LINE_ARGS

# MNG-8248
if "$JAVACMD" --enable-native-access=ALL-UNNAMED -version >/dev/null 2>&1; then
Comment thread
michael-o marked this conversation as resolved.
MAVEN_OPTS="--enable-native-access=ALL-UNNAMED $MAVEN_OPTS"
fi

exec "$JAVACMD" \
$MAVEN_OPTS \
$MAVEN_DEBUG_OPTS \
Expand Down
6 changes: 6 additions & 0 deletions apache-maven/src/bin/mvn.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ if "_%MAVEN_PROJECTBASEDIR:~-1%"=="_\" set "MAVEN_PROJECTBASEDIR=%MAVEN_PROJECTB
for %%i in ("%MAVEN_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher

@REM MNG-8248
"%JAVACMD%" --enable-native-access=ALL-UNNAMED -version >nul 2>&1
if ERRORLEVEL 1 goto skipEnableNativeAccess
set "MAVEN_OPTS=--enable-native-access=ALL-UNNAMED %MAVEN_OPTS%"
:skipEnableNativeAccess

"%JAVACMD%" ^
%JVM_CONFIG_MAVEN_PROPS% ^
%MAVEN_OPTS% ^
Expand Down
Loading