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