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

maven-3, windows

Solution

Well after looking to several posts related to this issue seems to be that the only and effective way to overcome this issue is to use the a list of properties and use them accordingly implementing profiling. Although is not an elegant workaround gives you the option to dynamically assign files paths regardless of the OS/Platform used to run maven.

Problem

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

Original source