问题描述
我正在使用spring-boot
,并且遇到与此处所述的错误类似的错误.我在pom.xml中添加了以下内容.
I am using spring-boot
, and experienced an error similar to the one described here. I added the following to my pom.xml.
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId><!--$NO-MVN-MAN-VER$-->
<version>1.1.0.Final</version>
</dependency>
我通过Spring Boot覆盖了在我的父pom.xml中定义的validation-api 1.0.0依赖关系,这给出了讨厌的警告消息:
I am overriding the validation-api 1.0.0 dependency defined in my parent pom.xml, by way of Spring boot, and this gives the pesky warning message:
如何在Eclipse中永久禁止显示此警告消息?它同时显示在我的pom.xml和问题视图中.
How can I permanently suppress this warning message in Eclipse? It shows up both in my pom.xml and my problems view.
推荐答案
显示该警告时,您可以打开警告上的快速修复"菜单(Ctrl + 1)并选择
When that warning shows up, you can open the Quick-Fix menu on the warning (Ctrl+1) and select
这将在版本行上添加注释,例如:
This will add the comment on the version line, like :
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version><!--$NO-MVN-MAN-VER$-->
</dependency>
您的问题是您在错误的行上手动添加了该评论.
Your problem is you manually added that comment on the wrong line.
这篇关于Maven-在Eclipse中禁止覆盖托管版本警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!