Skip to content

Fix #13092: tokenize quoted --define in maven.config - #13093

Open
kalayciburak wants to merge 1 commit into
apache:masterfrom
kalayciburak:fix-13092-maven-config-define
Open

Fix #13092: tokenize quoted --define in maven.config#13093
kalayciburak wants to merge 1 commit into
apache:masterfrom
kalayciburak:fix-13092-maven-config-define

Conversation

@kalayciburak

Copy link
Copy Markdown
Contributor

Summary

.mvn/maven.config treated each line as a single argv token. That made --define 'revision=1.0-SNAPSHOT' an unrecognized option, while the same tokens on the CLI and -Drevision=... in the same file both worked.

Each config line is now split on unquoted whitespace (quotes are stripped), matching how the shell tokenizes the equivalent CLI.

Test Plan

  • mvn -pl impl/maven-cli -Dtest=MavenParserTest,CommonsCliOptionsTest test — 6/0
  • mvn -pl compat/maven-embedder -Dtest=CleanArgumentTest,MavenCliTest test — 51/0 (1 skipped)

Fixes #13092

Each maven.config line was passed to Commons CLI as a single argv
token, so --define 'revision=...' was treated as an unrecognized
option while -Drevision=... and the equivalent CLI tokens worked.

Split each config line on unquoted whitespace, stripping quotes,
before parsing.

Signed-off-by: Burak KALAYCI <kalayciburak1996@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.mvn/maven.onfig option parsing fails with --define

1 participant