Maven-在Eclipse中禁止覆盖托管版本警告 [英] Maven - Suppress Overriding managed version warning in Eclipse

查看:392
本文介绍了Maven-在Eclipse中禁止覆盖托管版本警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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:

为validation-api覆盖托管版本1.0.0.GA

Overriding managed version 1.0.0.GA for validation-api

如何在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

忽略此警告

Ignore this warning

这将在版本行上添加注释,例如:

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中禁止覆盖托管版本警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆