Eclipse Creating Web with maven Error: Could not resolve archetype ORG.APACHE.MAVEN.ARCHETYPES:MAVEN-ARCHETYPE-WEBAP

Source: Internet
Author: User
Tags xmlns aliyun


Problem Description:



Create a Web project using the Eclipse's own maven plugin error:



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\liujunguang\.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\liujunguang\.m2\ Repository



Error as shown in figure:












Solution:



Add a new catalog configuration to the Eclipse MAVEN configuration: Http://repo1.maven.org/maven2/archetype-catalog.xml
can also be downloaded to local, and then add, so faster, eclipse networking is slow

As shown in figure:









Next, create a Web project with the catalog you just added






At this point, you can see the Eclipse Internet download:




This time to see if the creation was successful.






If you are still unable to create or if the problem is not resolved, you can install the following method:



1. Delete the file path that Maven has downloaded:. m2\repository\org\apache\maven



Delete and then try again, this time if you see progress, only need to wait patiently on the line






2.Maven download jar slow can use domestic Ari image



The specific configuration file (settings.xml) is shown below, placed under the. M2 folder,. M2 is typically located in the user directory





<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<! -- this is to configure Alibaba Maven image -- >
<mirrors>
<mirror>
<id>aliyun</id>
<name>aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>central</id>
<url>http://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>ansj-repo</id>
<name>ansj Repository</name>
<url>http://maven.nlpcn.org/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings> 

Original link: http://blog.csdn.net/afgasdg/article/details/12757433
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.