Maven:无法解析原型

时间:2014-09-26 18:02:03

标签: java maven

当我尝试创建一个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)

以下是我尝试过的一些解决方法:

  1. 删除C:\Users\XXXX\\.m2\repository并运行MAVEN -> UPDATE MAVEN

  2. 编辑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>
    
  3. 在eclipse上仔细检查settings.xml的引用

    Window -> Preferences -> Maven -> User Settings

  4. 手动添加远程maven目录

    Window -> Preferences -> Maven -> Archetypes

0 个答案:

没有答案