slawekjaranowski opened a new pull request, #13926: URL: https://github.com/apache/maven/pull/13926
Follow-up to #13888. #13888 dropped JLine and JAnsi, so Maven no longer loads any native code at startup. The two JVM flags that `mvn` and `mvn.cmd` added for those libraries are no longer needed: - **MNG-8248**: `--enable-native-access=ALL-UNNAMED` was added because on JDK 24+ `JLineNativeLoader` / `JansiLoader` call `System::load`, which printed the "restricted method in java.lang.System has been called" warning. Nothing calls `System::load` any more, so the warning can't occur. - **MNG-8169**: `--add-opens java.base/java.lang=ALL-UNNAMED` was added on MINGW (Git Bash) because Jansi 2.4.1 used reflection into `java.lang` to detect the MINGW pseudo-terminal and its width. Terminal detection is now done without Jansi, so the flag isn't needed. Changes: - `mvn`: remove the probe for `--enable-native-access` support and the MINGW-only `--add-opens` flag. - `mvn.cmd`: remove the `--enable-native-access` probe and the now-unused `INTERNAL_MAVEN_OPTS` variable. This also saves one extra JVM start (`java --enable-native-access=ALL-UNNAMED -version`) on every Maven invocation. Users who need these flags for other reasons can still set them in `MAVEN_OPTS` or `.mvn/jvm.config`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
