0

Java以外のファイルを実行し、引数として別のファイルを渡すために、exec-maven-pluginを使用しています。${basedir}ディレクトリのにあるフルパスを使用できる必要があります。フルパスを使用せずにそのようなディレクトリにアクセスするにはどうすればよいですか?

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

以下のコードを使用しても機能せず、次のcmd引数を出力します-

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

これはもちろん、コマンドライン引数としては無意味です。何か案は?

4

1 に答える 1

4

セパレータを忘れました:${basedir}\..\..\somedir\anotherdir

于 2013-02-24T13:40:53.060 に答える