Skip to content

[MNG-6385] Windows mvn.cmd fail with incorrect command syntax. #7474

@jira-importer

Description

@jira-importer

Eric Barboni opened MNG-6385 and commented

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

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

Affects: 3.5.0, 3.5.2, 3.5.3

Issue Links:

  • NETBEANS-245 Profiler fails to launch when using Maven 3.5.x
    ("blocks")

  • MNG-5889 .mvn directory should be picked when using --file
    ("is caused by")

  • MNG-6346 ... was unexpected at this time when using -f option and path contains brackets

  • MNG-6256 Maven script can break if "-f" path contains special characters

2 votes, 7 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:majorMajor loss of function

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions