[ 
https://issues.apache.org/jira/browse/MNG-7131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17709462#comment-17709462
 ] 

Jeff Pierson commented on MNG-7131:
-----------------------------------

[~michael-o], ok so this is an expected breaking change? I couldn't find much 
details in documentation or other discussion other than the change to put 
arguments on separate lines. Is the workaround that I found the preferred one 
because like the original poster I did try quoting the argument value such as 
below which also didn't work.

-s ".mvn/settings.xml"

and

"-s .mvn/settings.xml"

At the same time I see that this issue which is about the allowing spaces with 
quoting behavior is marked fixed in previous versions. So I'm now wondering 
that if {{-s .mvn/settings.xml}} is not a regression from Maven 3 and an 
intentional breaking change on whether my attempt to quote the value as {{"-s 
.mvn/settings.xml"}} is a regression somewhere in the Maven 4 Alphas. Is there 
somewhere that explains this behavior and the breaking changes so that I can 
plan next steps for my projects which will adopt Maven 4 or help to open a new 
issue?

> maven.config doesn't handle arguments with spaces in them
> ---------------------------------------------------------
>
>                 Key: MNG-7131
>                 URL: https://issues.apache.org/jira/browse/MNG-7131
>             Project: Maven
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.6.3
>            Reporter: Stefan Oehme
>            Assignee: Michael Osipov
>            Priority: Minor
>             Fix For: 3.9.0, 4.0.0-alpha-2, 4.0.0
>
>
> I tried putting a path with a space in the maven.config like so:
> {code:java}
> "-Dmy.path=/some/path with/a/space"
> {code}
> When asking for the my.path property inside Maven, I get the path with a 
> trailing quote
> {code:java}
> /some/path with/a/space"
> {code}
> The file is parsed by [splitting it by 
> whitespace|https://github.com/apache/maven/blob/c3cf29438e3d65d6ee5c5726f8611af99d9a649a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L386].
>  I suggest replacing that code with the much better 
> [CommandLineUtils.translateCommandline(argLine)|https://github.com/codehaus-plexus/plexus-utils/blob/85a4a3c534752919dd97d757d4ef0fdb6d40eb8c/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java#L412]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to