0
我遇到了使用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的相關章節:
<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>
如果我執行javah -d /home/kerry com.javatechnics.jni.test.osgi.HelloWorld
從命令行然後沒有問題。
我做錯了什麼或者Maven exec插件有問題嗎?
我以爲我曾試過,但顯然不是!非常感謝。 – Kerry