如何在Eclipse/Maven/Nexus中弃用库? [英] How to deprecate a library in Eclipse/Maven/Nexus?

查看:43
本文介绍了如何在Eclipse/Maven/Nexus中弃用库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用Eclipse + Maven插件从Nexus获取库,这很好.而且我们还将内部库放在Nexus上.

We use Eclipse + Maven plugin to get library from Nexus, it's good. And we also put our internal library on Nexus.

当我们向Nexus发布库的新版本时,我们希望旧版本被弃用",这可能吗?例如,当使用Eclipse的Maven插件使用时,他选择了旧版本,并且Eclipse显示已弃用".

When we release a new version of a library to Nexus, we want to let old version to be "deprecated", is it possible? For example, when use use Eclipse's Maven plugin, he choose the old version and Eclipse shows "it's deprecated".

由于某些旧系统仍需要旧版本,因此我们无法直接将其从Nexus中删除.但是我们不希望新系统使用旧版本.

Because some old systems still need the old version, we cannot remove it from Nexus directly. But we don't want new systems to use old version.

推荐答案

您可以通过 maven-enforcer-plugin 阻止使用旧版本,但只能通过必须由所有新项目使用的公司pom来使用.

You can add a rule via the maven-enforcer-plugin to prevent using older version but only via a company pom which has to be used by all new projects.

这篇关于如何在Eclipse/Maven/Nexus中弃用库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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