reda-alaoui opened a new issue, #13413:
URL: https://github.com/apache/maven/issues/13413

   ### Affected version
   
   3.10.0, 3.9.16
   
   ### Bug description
   
   When a double-quoted argument reaches Maven split on whitespace, the closing 
quote is not recognised: the argument swallows every argument after it, goals 
included.
   
   Reproducer, in any project:
   
   ```
   mvn '"-Dfoo=a' 'b"' validate
   ```
   
   ```
   [ERROR] No goals have been specified for this build. ...
   ```
   
   Expected: `foo` = `a b`, and `validate` runs. The same quoted argument 
passed as a single token works:
   
   ```
   mvn '"-Dfoo=a b"' validate
   ```
   
   This happens in practice through `MAVEN_ARGS`, which `bin/mvn` expands 
unquoted:
   
   ```
   MAVEN_ARGS='"-Dmaven.repo.local=/path with space/repo"' mvn validate
   ```
   
   fails the same way. Jenkins' Pipeline Maven Integration plugin builds 
`--settings "<path>"` and `"-Dmaven.repo.local=<path>"` arguments this way, so 
its builds fail as soon as the workspace path contains a space 
(jenkinsci/pipeline-maven-plugin#1525).
   


-- 
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]

Reply via email to