Question

I'm using the exec-maven-plugin in order to execute a non java file and pass another file as an argument. I need to be able to use a full path which is on top of the ${basedir} directory. How can I access such a directory without using the full path?

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <configuration>
    <executable>[Path to my .exe file]</executable
        <argument>${basedir}\..\..\somedir\anotherdir</argument>
    <arguments>

Using the below code doesn't work and outputs the following cmd argument-

"c:\dir1\dir2\dir3\mybasedir..\..\somedir\anotherdir"

which is off course meaningless as a command line argument. Any ideas?

Was it helpful?

Solution

You forgot a separator: ${basedir}\..\..\somedir\anotherdir

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top