当我尝试创建一个webapp maven项目时,我收到此错误。
以下是整个错误消息。
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\Osvaldo\.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\Osvaldo\.m2\repository)
以下是我尝试过的一些解决方法:
删除C:\Users\XXXX\\.m2\repository
并运行MAVEN -> UPDATE MAVEN
编辑maven settings.xml
取消激活所有代理。在文件的上方:
<proxy>
<id>XXXX</id>
<active>**false**</active>
<protocol>http</protocol>
<!-- US Proxies -->
<host>172.20.100.5</host>
<port>8080</port>
</proxy>
在eclipse上仔细检查settings.xml的引用
Window -> Preferences -> Maven -> User Settings
手动添加远程maven目录
Window -> Preferences -> Maven -> Archetypes