Frage

Is it possible to add double quote to the commandlineArgs of the maven mojo plugin?
On the batch i have %1 - getting just first part of the string until the first white space


I tried quot: " but it didnt help
e.g. <commandlineArgs>"path"</commandlineArgs>


I tried &quot ; <commandlineArgs>&quot;path&quot;</commandlineArgs>
But i am getting:

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.2</version>
            <executions>
                <execution>
                    <id>export_objects</id>
                    <phase>package</phase>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <executable>export_obj.bat</executable>
                <commandlineArgs>###LONG PATH WITH SPACE###</commandlineArgs>   
            </configuration>
        </plugin>
War es hilfreich?

Lösung

Use XML CDATA:

<commandlineArgs><![CDATA[###LONG PATH WITH SPACE###]]></commandlineArgs>

or:

<arguments><argument><![CDATA[###LONG PATH WITH SPACE###]]></argument></arguments>
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top