1 回答
TA贡献1829条经验 获得超4个赞
我的 maven 构建有同样的错误“无效标志:-h 目标/标头”。
我尝试了上面 Gyro Gearless 的建议。我将原来的“-h 目标/标题”分成“-h”和“目标/标题”。那解决了我的问题。现在我项目中的所有 jni 标题都正确生成并放置在目标/标题中。
这是我的 pom.xml 中的整个编译器插件配置部分:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<compilerArgs>
<arg>-h</arg>
<arg>target/headers</arg>
</compilerArgs>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
使用这个 pom,命令 'mvn compile' 足以生成 JNI 头文件。请注意,'mvn clean'不会删除以前生成的标题。
添加回答
举报
