Maven无法终身下载maven-plugin-descriptor-2.0.6

时间:2012-11-05 13:53:02

标签: maven-3

基本信息: 我在Eclipse Juno中使用嵌入式Maven 3.0.4(使用JBoss Tools)。

settings.xml(直接来自community.jboss.org/wiki/MavenGettingStarted-Users):

<profile>
    <id>jboss-public-repository</id>
    <repositories>
        <repository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Maven Repository Group</name>
            <url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Maven Repository Group</name>
            <url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
</profile>
<activeProfiles>
    <activeProfile>jboss-public-repository</activeProfile>
    <activeProfile>jboss-deprecated-repository</activeProfile>
</activeProfiles>

注意:我也尝试了repository.jboss.org/nexus/content/groups/jboss和repository.jboss.org/nexus/content/groups/public/,结果相同。

我做了什么: 我使用工件org.jboss.spec.archetypes jboss-javaee6-webapp从scrath创建了Maven项目。系统尝试下载repos。一切都下载得很好,除了两个POM:

maven-plugin-descriptor-2.0.6.pom
plexus-2.0.2.pom

我将专注于maven-plugin-descriptor,但plexus表现相同。

错误:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project example: 
Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed: 
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: 
Failed to collect dependencies for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 (): 
Failed to read artifact descriptor for org.apache.maven:maven-plugin-descriptor:jar:2.0.6: 
Could not transfer artifact org.apache.maven:maven-plugin-descriptor:pom:2.0.6 from/to central (repo.maven.apache.org/maven2): 
No response received after 60000 -> [Help 1]

在repository.jboss.org/nexus/content/groups/public-jboss/org/apache/maven/maven-plugin-descriptor/2.0.6/中完全没有请求的文件(返回404)。 我试图直接在浏览器中访问repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-descriptor/2.0.6/。文件maven-plugin-descriptor-2.0.6.pom存在,但点击后认为...认为...认为... aaand连接重置。请注意,从repo.maven.apache.org下载了许多其他POM没有问题。只有这个文件出于某种原因Just Do Not Work(TM)。

其他: 我不是代理人。我DID使用“删除whatever.lastUpdated”技巧。甚至删除了整个仓库以强制再次下载所有内容。当然没用。

有什么想法吗?或者我可能在错误的树上吠叫,并且必须在settings.xml中设置其他一些存储库?我的印象是maven试图下载太旧的版本......

1 个答案:

答案 0 :(得分:4)

问题解决了。如果有人遇到与我类似的问题,他必须使用镜像

在settings.xml中:

<settings>
...
    <mirrors>
        <mirror>
            <id>uk.maven.org</id>
            <mirrorOf>central</mirrorOf>
            <name>UK Central</name>
            <url>http://uk.maven.org/maven2</url>
        </mirror>
    </mirrors>
...
</settings>