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

We use the Eclipse + Maven plugin to get the library from Nexus, which is good. And we also hosted our in-house library on the Nexus.

When we release the new version of the library for Nexus, we want the old version to be "obsolete", is this possible? For example, when using the Eclipse Maven plugin, it selects the old version, and Eclipse shows "it is deprecated."

Since some older systems still need the old version, we cannot remove it directly from Nexus. But we do not want the new systems to use the old version.

+6
source share
3 answers

You can add a rule through maven-enforcer-plugin to prevent using the old version, but only through companay pom, which should be used by all new projects.

+5
source

Unable to “opt out” of release in Maven.

The reason for this is that the old release is still working - old projects are still using it, and they are happy. Usually there is no need to force update projects.

In addition, Nexus (by default and for good reason) will not allow you to modify the released POM.

What you need is a way to communicate with the best people that people should use right now. The right way to do this is with a website. Just add the URL to the <url> element of your POM so people can find it easily.

Alternatively, you can use mvn versions:display-dependency-updates and mvn versions:display-plugin-updates from the plugin version to get a list of dependencies with a higher version than you are.

+2
source

You do not want to remove it from Nexus. What happens if someone wants to create an old version of your software?

I would rather use the Java method / class reject methods and discard the old API calls in your new library version.

0
source

Source: https://habr.com/ru/post/958137/


All Articles