Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deprecate a library in Eclipse/Maven/Nexus?

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

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".

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.

like image 611
Dennys Avatar asked Nov 15 '13 10:11

Dennys


People also ask

How to deprecate Maven dependency?

There is no way to "deprecate" a release in Maven. The reason for this is that the old release still works - old projects still use it and they are happy. There is usually no need to force projects to upgrade.

What is embedded Maven in Eclipse?

An embedded version of the Maven known as the Maven Embedder is already specified. This is what is used to execute Maven inside of Eclipse. If you have another installation of Maven which you would like to use instead of the Maven Embedder, you can add another Maven runtime by clicking on the Add..


1 Answers

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.

like image 86
khmarbaise Avatar answered Sep 20 '22 11:09

khmarbaise