gnodet opened a new pull request, #13530: URL: https://github.com/apache/maven/pull/13530
Backport of #13447 to `maven-4.0.x`. ### Problem In `bin/mvn`, `concat_lines` executes `JvmConfigParser.java` and captures output with `2>&1`. When `JAVA_TOOL_OPTIONS`, `JDK_JAVA_OPTIONS`, or `_JAVA_OPTIONS` is set, the JVM prints notices such as `Picked up JAVA_TOOL_OPTIONS: ...` to `stderr`. Because `stderr` was merged into `stdout`, the notice was captured into `MAVEN_OPTS`, causing the JVM to treat `Picked` (or `NOTE:`) as the main class name on launch. ### Solution - Separate stdout from stderr in `bin/mvn` when executing `JvmConfigParser.java`. - Redirect stderr to a temporary file and only display it if the parser exits with a non-zero code. - Added `test-mvn-jvm-config.sh` to verify that JVM notices do not pollute JVM arguments and that parser errors are still reported. - Added the test script to the `shell-script-tests` profile in `apache-maven/pom.xml`. -- 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]
