tulasivk
tulasivk

Reputation: 21

How do I deprecate a custom Maven Archetype?

Is it possible to deprecate custom maven archetypes installed on nexus ?

I was thinking may be use something like this -

<project xmlns="http://maven.apache.org/POM/4.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
        http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.myorg.myarch</groupId>
<artifactId>maven-archetype-custom</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>Archetype - maven-archetype-custom</name>
**<deprecated>TRUE</deprecated>**
</project>

Re-install the archetype so that when a user tries to create a project using this, they get a message saying its deprecated.

Upvotes: 2

Views: 931

Answers (1)

khmarbaise
khmarbaise

Reputation: 97467

What you can do is to relocate your artifact but a real kind of deprecated configuration etc. does not exist. In your case i would recommend to remove the SNAPSHOT versions from the Nexus and really deploy a release version like 1.0.0. The Idea of artifacts in general in Maven is they are as they are...which means a rename will never happen, cause you can't know if someone has already used it.

Upvotes: 1

Related Questions