Could not resolve archetype org.apache.maven.archetypes: maven-archetype-webapp

I am getting the error above when I try to create a simple maven project. I have exhausted previous suggestions, for example. Window> Preferences> Maven> Archetypes> Add Remote Catalog ... and adding this as a catalog file: http://repo1.maven.org/maven2/archetype-catalog.xml

When I click on the confirm button, it says it is empty.

I also tried deleting the maven repository in the .m2 directory with no reward.

My complete mistake:

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-webapp/maven-metadata.xml in local (C:\Users\USER_ID\.m2\repository)
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-webapp/maven-metadata.xml in local (C:\Users\USER_ID\.m2\repository)

      

The maven-metadata.xml file is in the correct location (I think), but I'm not entirely sure if this is the correct file content, what should I do in this file?

I also tried deleting and modifying the settings.xml file in terms of both content and location, again with this repeated, gratuitous post.

+3


source to share


1 answer


After doing some research on the same problem, I found that one of the solutions I found was this:

Open Window> Preferences
Open Maven> Archetypes

Click Add Remote Directory and add the following:



Hope you find this helpful.

+3


source







All Articles