Plugin breaks arguments containing quotes
-----------------------------------------

                 Key: MEXEC-100
                 URL: https://jira.codehaus.org/browse/MEXEC-100
             Project: Maven 2.x Exec Plugin
          Issue Type: Bug
          Components: exec
    Affects Versions: 1.2
            Reporter: Gili
            Priority: Minor


This issue is an extension of MEXEC-81.

The plugin does a good job quoting arguments automatically, but if a user is 
not aware of auto-quoting and insists on quoting paths themselves "bad things 
happen". Given:

{code}
                        <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>exec-maven-plugin</artifactId>
                                <version>1.2</version>
                                <executions>
                                        <execution>
                                                <goals>
                                                        <goal>exec</goal>
                                                </goals>
                                                <phase>process-resources</phase>
                                                <configuration>
                                                        
<executable>cmd.exe</executable>
                                                        
<workingDirectory>${project.build.directory}/nsis/${vitex.classifier}</workingDirectory>
                                                        <arguments>
                                                                
<argument>/c</argument>
                                                                
<argument>echo</argument>
                                                                
<argument>MyPath="${project.build.directory}/Name With Spaces.exe</argument>
                                                        </arguments>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>
{code}

The plugin will transform the last argument into:

  MyPath="C:\Users\g.tzabari\Documents\vitex\installer\windows\target/Name With 
Spaces.exe

notice the lack of a closing quote. Here is the output I get from echo:

  "MyPath="C:\Users\g.tzabari\Documents\vitex\installer\windows\target/Name 
With Spaces.exe"

Expected behavior: If an argument contains quotes, do not attempt to auto-quote 
it. Respect the quotes provided by the user.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to