Maven execプラグインを使用してJavaツールjavah
を実行する際に問題が発生します。私は、ヘッダファイルが配置されるが、私はエラーを取得javah
に出力ディレクトリを指定しようとしています:Maven execプラグインを使用して実行するとjavahが失敗する
[INFO] --- exec-maven-plugin:1.5.0:exec (create-jni-headers) @ jni-test-osgi --- Error: unknown option: -d /home/kerry [ERROR] Command execution failed.
これは、POMの関連セクションです:私はjavah -d /home/kerry com.javatechnics.jni.test.osgi.HelloWorld
を実行した場合
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>create-jni-headers</id>
<goals>
<goal>exec</goal>
</goals>
<phase>compile</phase>
<configuration>
<executable>javah</executable>
<workingDirectory>${project.build.outputDirectory}</workingDirectory>
<arguments>
<argument>-d /home/kerry</argument>
<argument>com.javatechnics.jni.test.osgi.HelloWorld</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
コマンドラインから問題がありません。
私は何か間違っているか、Maven execプラグインに問題がありますか?
私はそれを試みたと思ったが、明らかにそうではなかった!どうもありがとう。 – Kerry