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

Robert Scholte commented on MNG-6385:
-------------------------------------

1. Before MNG-5889 we ignored the value of {{--file}} when looking for {{.mvn}} 
folder, it was done based on the working directory. However, the expected 
behavior is that {{.mvn}} should be calculated relative to the {{--file}} 
value. Because this folder can contain additional jvm arguments for Maven, it 
must be solved before calling the mainclass of Maven.
2. That would be an idea, but we don't have anything like that in Maven yet. 
But this seems to be a possibility. I'd say it is about reimplementing {{shift}}
3. I guess the wrapper would also be too late regarding jvm args.

ps. With {{mvn -Dexec.args="-Dinput=\"output output\""}} I would expect only 1 
argument, namely {{-Dexec.args="-Dinput=\"output output\""}}. It should be easy 
to verify: just have a look the output of the arguments when calling a {{public 
static void main(String[] args)}}

> Windows mvn.cmd fail with incorrect command syntax.
> ---------------------------------------------------
>
>                 Key: MNG-6385
>                 URL: https://issues.apache.org/jira/browse/MNG-6385
>             Project: Maven
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.5.0, 3.5.2, 3.5.3
>            Reporter: Eric Barboni
>            Priority: Major
>
> Hi, during some test using Apache Netbeans on windows it appears that some 
> cli can lead to failure of executing mvn.cmd
> It was working before on 3.3.9 version.
> In the code example (below) if space are removed from path in agentpath 
> section it works.
> Otherwise the arguments are cut during evaluation
> and the following syntax incorrect will happen
> if not "-agentpath:\"E:\opensource\space" == "" (
> Best Regards
> {code}
> e:\outils\apache-maven-3.5.3\bin\mvn 
> -Dexec.args="-agentpath:\"E:\opensource\space 
> netbeans\netbeans\profiler\lib\deployed\jdk16\windows-amd64\profilerinterface.dll\"=\"E:\opensource\space
>  netbeans\netbeans\profiler\lib\",5140,10 -XX:+HeapDumpOnOutOfMemoryError 
> -XX:HeapDumpPath=C:\Users\barboni\AppData\Local\NetBeans\Cache\dev\mavencachedirs\2080072884\org-netbeans-modules-profiler
>   -classpath %classpath com.mycompany.mavenproject23.newClass"  
> -Dexec.executable="C:\Program Files\Java\jdk1.8.0_162\bin\java.exe" 
> -Dexec.classpathScope=runtime -DskipTests=true 
> -Dmaven.ext.class.path="E:\opensource\space 
> netbeans\netbeans\java\maven-nblib\netbeans-eventspy.jar" 
> -Dfile.encoding=UTF-8 org.codehaus.mojo:exec-maven-plugin:1.5.0:exec
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to