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