0

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?

Omri
  • 1,058
  • 3
  • 14
  • 26

1 Answers1

4

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

Ryan Stewart
  • 126,015
  • 21
  • 180
  • 199
  • Thanks, but it doesn't help. Path still appears as the full string instead of the relative path... – Omri Feb 24 '13 at 13:44
  • Why do you care what the path looks like? Explain "full string" vs. "relative path". How does the above not work? – Ryan Stewart Feb 24 '13 at 14:18
  • Ryan, you are correct. I indeed forgot the separator when trying to pass the relative path. Thanks for your time! – Omri Feb 25 '13 at 06:53