File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,11 @@ export MAVEN_PROJECTBASEDIR
196196MAVEN_CMD_LINE_ARGS=" $MAVEN_CONFIG $@ "
197197export MAVEN_CMD_LINE_ARGS
198198
199+ # MNG-8248
200+ if " $JAVACMD " --enable-native-access=ALL-UNNAMED -version > /dev/null 2>&1 ; then
201+ MAVEN_OPTS=" --enable-native-access=ALL-UNNAMED $MAVEN_OPTS "
202+ fi
203+
199204exec " $JAVACMD " \
200205 $MAVEN_OPTS \
201206 $MAVEN_DEBUG_OPTS \
Original file line number Diff line number Diff line change @@ -172,6 +172,12 @@ if "_%MAVEN_PROJECTBASEDIR:~-1%"=="_\" set "MAVEN_PROJECTBASEDIR=%MAVEN_PROJECTB
172172for %%i in (" %MAVEN_HOME% " \boot\plexus-classworlds-*) do set CLASSWORLDS_JAR = " %%i "
173173set CLASSWORLDS_LAUNCHER = org.codehaus.plexus.classworlds.launcher.Launcher
174174
175+ @ REM MNG-8248
176+ " %JAVACMD% " --enable-native-access=ALL-UNNAMED -version > nul 2 >& 1
177+ if ERRORLEVEL 1 goto skipEnableNativeAccess
178+ set " MAVEN_OPTS = --enable-native-access=ALL-UNNAMED %MAVEN_OPTS% "
179+ :skipEnableNativeAccess
180+
175181" %JAVACMD% " ^
176182 %JVM_CONFIG_MAVEN_PROPS% ^
177183 %MAVEN_OPTS% ^
You can’t perform that action at this time.
0 commit comments