gnodet opened a new pull request, #12348: URL: https://github.com/apache/maven/pull/12348
Fixes #11487 ## Summary - Move `$MAVEN_ARGS` out of the `eval`'d `cmd` string in the `mvn` launcher script - The variable reference is now single-quoted (`'$MAVEN_ARGS'`) on the `eval` line, so `eval` expands it as a normal variable rather than re-parsing the already-expanded value — preserving backslashes - Same approach used for `"$@"` in PR #11983 ## Root cause `eval exec "$cmd"` re-parses the expanded string. When `$MAVEN_ARGS` was embedded in `cmd` at assignment time, its value became literal text in the `eval`'d string, causing backslashes (e.g. Windows paths like `C:\Users\...`) to be interpreted as escape characters and stripped. ## Test plan - [ ] Set `MAVEN_ARGS="-Dfoo=C:\path\to\file"` and verify the property value reaches Maven with backslashes intact - [ ] Verify `MAVEN_OPTS` with quoted values still works correctly (eval still handles those) - [ ] Verify `MAVEN_ARGS` with multiple space-separated arguments still works 🤖 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]
