Skip to content

Fix MAVEN_ARGS parsing to handle quoted strings with spaces#11824

Open
gnodet wants to merge 1 commit intomasterfrom
fix/maven-args-parsing
Open

Fix MAVEN_ARGS parsing to handle quoted strings with spaces#11824
gnodet wants to merge 1 commit intomasterfrom
fix/maven-args-parsing

Conversation

@gnodet
Copy link
Copy Markdown
Contributor

@gnodet gnodet commented Mar 23, 2026

Summary

  • Replace naive String.split(" ") with a proper argument parser that handles single and double quoted strings, preserving backslashes for Windows paths
  • Applied to both EmbeddedMavenExecutor and ForkedMavenExecutor
  • Added unit tests for both executors covering simple args, quoted paths, empty input, and extra whitespace

Fixes #11487

Test plan

  • Unit tests for parseArguments() method in both executor implementations
  • Manual test with MAVEN_ARGS='-f "C:\Program Files\project\pom.xml"' on Windows

🤖 Generated with Claude Code

Replace naive String.split(" ") with a proper argument parser that
handles single and double quoted strings, preserving backslashes
for Windows paths. This fixes MAVEN_ARGS values like:
  -f "C:\Program Files\project\pom.xml"

Applied to both EmbeddedMavenExecutor and ForkedMavenExecutor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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.

[regression] Maven4 unable to pass settings path on Windows

1 participant