如何使用-Xlint编译:在Maven项目中取消选中? [英] How to compile using -Xlint:unchecked in a Maven project?
问题描述
在NetBeans 7.2中,我无法找到如何使用-Xlint进行编译:在Maven项目中未选中。在Ant项目下,您可以通过转到项目属性 - >编译来更改编译器标志,但Maven项目似乎没有任何此类选项。
In NetBeans 7.2, I'm having trouble finding how to compile using -Xlint:unchecked in a Maven project. Under an Ant project, you can change compiler flags by going to Project Properties -> Compiling, but Maven projects don't seem to have any such option.
有没有配置IDE使用Maven使用这些标志进行编译的方法?
Is there any way to configure the IDE to compile with such flags using Maven?
推荐答案
我想你可以在你的pom.xml中设置编译器参数。请参阅此 http://maven.apache.org/plugins/maven -compiler-plugin / examples / pass-compiler-arguments.html
I guess you can set compiler arguments in your pom.xml. Please refer this http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass-compiler-arguments.html
<compilerArgument>-Xlint:unchecked</compilerArgument>
这篇关于如何使用-Xlint编译:在Maven项目中取消选中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!