Starting this morning, Maven fails with the tomcat-maven plugin

Starting this morning, Maven cannot create any project that requires the tomcat-maven-plugin module. I tried with minimalistic pom.xml, having only one dependency, but in all cases I get the following:

[INFO] Error creating POM (this POM project may not be).

Project ID: org.codehaus.mojo: cat-Maven-plugin

Reason: error getting POM for 'Org.codehaus.mojo: cat-Maven-plugin' from the repository: unable to read local copy of metadata: unable to read metadata from 'C: \ Users \ *** \. M2 \ repository \ org \ codehaus \ mojo \ tomcat-maven-plugin \ maven-metadata-codehaus release.xml ': the end tag name must match the start tag name


from line 7 (position: TEXT ... \ n ... @ 9: 8)
org.codehaus.mojo: cat-Maven-plugin: R: Last

for the org.codehaus.mojo project: cat-maven-plugin

Firstly, I tried deleting local data and reloading, but I just got checksum errors. I opened maven-metadata-codehaus release.xml to see this inside:

301 moved forever

Moved Constantly

The document has moved https://nexus.codehaus.org/content/repositories/releases/org/codehaus/mojo/tomcat-maven-plugin/maven-metadata.xml here.


Apache / 2.0.52 (Red Hat) Server in repository.codehaus.org 80 folder

I'm tired of changing versions and repositories, but nothing helped. Any ideas anybody?

PS Here is the minimum pom I tried with:

<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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.codehaus.mojo</groupId> <artifactId>my-project</artifactId> <version>1.0</version> <pluginRepositories> <pluginRepository> <id>Codehaus Snapshots</id> <url>http://snapshots.repository.codehaus.org/</url> <snapshots> <enabled>true</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </pluginRepository> </pluginRepositories> <build> <finalName>my-webapp</finalName> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <version>1.0-SNAPSHOT</version> </plugin> </plugins> </build> </project> 
+4
source share
1 answer

It seems that the redirect is wrong, Codehaus snapshots are proxied: https://nexus.codehaus.org/content/repositories/codehaus-snapshots/ .

So, declare the following pluginRepository to use the tomcat-maven module's SNAPSHOT versions:

 <pluginRepositories> <pluginRepository> <id>Codehaus Snapshots</id> <url>https://nexus.codehaus.org/content/repositories/codehaus-snapshots</url> </pluginRepository> </pluginRepositories> 
+5
source

All Articles