Avoid parsing MAVEN_OPTS (master/4.x) by BobVul · Pull Request #10970 · apache/maven (original) (raw)
Fixes apache#10937 by introducing an additional INTERNAL_MAVEN_OPTS for any arguments that need to be inserted by the script. Parsing the externally-defined MAVEN_OPTS variable can lead to incorrect processing of quotes and special characters, so use the separate variable to avoid doing so.
Additionally JVM_CONFIG_MAVEN_OPTS is introduced as its own variable to preserve the append behaviour.
marked this pull request as draft
Remove quotes from the new JVM_CONFIG_MAVEN_OPTS to also allow quoted pipes to work from jvm.config This is a follow-up to apache#10937, where the extra layer of quotes causes parsing issues in Windows cmd
BobVul marked this pull request as ready for review
Test that adding pipes to either MAVEN_OPTS or jvm.config does not break anything Note: it is important that a jvm.config exists for the MAVEN_OPTS portion of the test to work
BobVul marked this pull request as draft
Fixes apache#10937 by introducing an additional INTERNAL_MAVEN_OPTS for any arguments that need to be inserted by the script. Parsing the externally-defined MAVEN_OPTS variable can lead to incorrect processing of quotes and special characters, so use the separate variable to avoid doing so.
By default xargs handles quotes specially. To avoid this behaviour, -0 must be used instead, but first we need to convert LF to NUL.
Since quotes are no longer being stripped by xargs, we should also stop trying to add them back in otherwise nested quotes cause further issues
BobVul marked this pull request as ready for review
gnodet pushed a commit to gnodet/maven that referenced this pull request
Fixes apache#10937 by introducing an additional INTERNAL_MAVEN_OPTS for any arguments that need to be inserted by the script. Parsing the externally-defined MAVEN_OPTS variable can lead to incorrect processing of quotes and special characters, so use the separate variable to avoid doing so.
Additionally JVM_CONFIG_MAVEN_OPTS is introduced as its own variable to preserve the append behaviour.
Remove quotes from the new JVM_CONFIG_MAVEN_OPTS to also allow quoted pipes to work from jvm.config This is a follow-up to apache#10937, where the extra layer of quotes causes parsing issues in Windows cmd
Test that adding pipes to either MAVEN_OPTS or jvm.config does not break anything Note: it is important that a jvm.config exists for the MAVEN_OPTS portion of the test to work
By default xargs handles quotes specially. To avoid this behaviour, -0 must be used instead, but first we need to convert LF to NUL.
Since quotes are no longer being stripped by xargs, we should also stop trying to add them back in otherwise nested quotes cause further issues
Co-authored-by: Bob BobVul@users.noreply.github.com (cherry picked from commit aeff353)
gnodet added a commit that referenced this pull request
Fixes #10937 by introducing an additional INTERNAL_MAVEN_OPTS for any arguments that need to be inserted by the script. Parsing the externally-defined MAVEN_OPTS variable can lead to incorrect processing of quotes and special characters, so use the separate variable to avoid doing so.
Additionally JVM_CONFIG_MAVEN_OPTS is introduced as its own variable to preserve the append behaviour.
Remove quotes from the new JVM_CONFIG_MAVEN_OPTS to also allow quoted pipes to work from jvm.config This is a follow-up to #10937, where the extra layer of quotes causes parsing issues in Windows cmd
Test that adding pipes to either MAVEN_OPTS or jvm.config does not break anything Note: it is important that a jvm.config exists for the MAVEN_OPTS portion of the test to work
By default xargs handles quotes specially. To avoid this behaviour, -0 must be used instead, but first we need to convert LF to NUL.
Since quotes are no longer being stripped by xargs, we should also stop trying to add them back in otherwise nested quotes cause further issues
(cherry picked from commit aeff353)
Co-authored-by: Bob 1674237+BobVul@users.noreply.github.com Co-authored-by: Bob BobVul@users.noreply.github.com
gnodet pushed a commit to gnodet/maven that referenced this pull request
Fixes apache#10937 by introducing an additional INTERNAL_MAVEN_OPTS for any arguments that need to be inserted by the script. Parsing the externally-defined MAVEN_OPTS variable can lead to incorrect processing of quotes and special characters, so use the separate variable to avoid doing so.
Additionally JVM_CONFIG_MAVEN_OPTS is introduced as its own variable to preserve the append behaviour.
Remove quotes from the new JVM_CONFIG_MAVEN_OPTS to also allow quoted pipes to work from jvm.config This is a follow-up to apache#10937, where the extra layer of quotes causes parsing issues in Windows cmd
Test that adding pipes to either MAVEN_OPTS or jvm.config does not break anything Note: it is important that a jvm.config exists for the MAVEN_OPTS portion of the test to work
By default xargs handles quotes specially. To avoid this behaviour, -0 must be used instead, but first we need to convert LF to NUL.
Since quotes are no longer being stripped by xargs, we should also stop trying to add them back in otherwise nested quotes cause further issues
Co-authored-by: Bob BobVul@users.noreply.github.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})