Eclipse 中的 Maven 编译器警告和错误
我已经问了相反的问题但现在我越来越喜欢 Maven,并且想在我的 pom 中设置编译器警告,这些警告实际上映射到 eclipse 项目,使 eclipse 能够标记“错误”行警告。
我认为(?)Maven 已经设置了覆盖每个项目的默认警告的勾号,但随后只是将默认值复制到非默认设置中。那么对于插件来说,设置“成员可以是静态的”来警告应该不会是一个大麻烦?
写插件是哪个?我无法让编译器插件有任何选项。
I already asked the opposite question but now I'm growing fond of Maven and would like to set compiler warnings in my pom that are actually mapped to the eclipse project, enabling eclipse to mark "wrong" lines with warnings.
I think(?) Maven already sets the tick to overwrite the default warnings per project, but then just copies the default values into the non default settings. Then it shouldn't be a big hasle for a plugin to e.g. set "Member can be static" to warn?
Which is the write plugin? I can't the the compiler plugin to have any options for this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定我完全理解你的问题。对于警告位,您可以使用 maven 编译器插件中的
showWarnings
实体覆盖它:Not sure I fully understand your question. For the warnings bit, you can override it using the
showWarnings
entity in the maven compiler plugin: