I need to pass a directory using windows format as an argument for an exec on maven, here is an excerpt of the pom.xml
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>export</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<escape>true</escape>
<executable>${cmdl.exec}</executable>
<workingDirectory>${cmdl.location}</workingDirectory>
<arguments>
<argument>${project.basedir}\\target\\classes\\publishRoute</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
The problem that i had encountered is that the ${project.basedir} resolve to single slash:
cmd /c script_cmdline.bat C:\Talend_CI\talend\release\Routes\SimpleRoute\\target\\classes\\publishRoute
and i need to pass it with double backslash. How can I achieve this using the ${project.basedir}?
you have one way to overload the variable or to declare a new variable to mean the project basedir like this :
<basdir.home>C:/Talend_CI/talend/release/Routes/</basdir.home>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With