Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need to convert maven's ${project.basedir} from single backslash to double

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}?

like image 618
carlosgmercado Avatar asked Dec 03 '14 16:12

carlosgmercado


1 Answers

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>
like image 79
Inforedaster Avatar answered Nov 03 '22 11:11

Inforedaster