0

尝试执行以下命令时:

mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org.

我收到以下错误消息:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
.2:generate (default-cli) on project standalone-pom: Execution default-cli of go
al org.apache.maven.plugins:maven-archetype-plugin:2.2:generate failed: Plugin o
rg.apache.maven.plugins:maven-archetype-plugin:2.2 or one of its dependencies co
uld not be resolved: The following artifacts could not be resolved: org.codehaus
.groovy:groovy:jar:1.8.3, org.apache.ant:ant:jar:1.8.1: Could not transfer artif
act org.codehaus.groovy:groovy:jar:1.8.3 from/to central (http://repo.maven.apac
he.org/maven2): GET request of: org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.ja
r from central failed: Read timed out -> [Help 1]

[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException   

所以我参观了

https://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

它说要在挂毯文档中查看此错误的含义,但我在那里找不到。在我得到任何帮助的情况下提前谢谢。

4

1 回答 1

0

错误消息指出下载此文件时出现问题:

http://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar

我认为这是由您的网络设置引起的。在 ~/.m2/settings.xml 中是否有任何代理设置您应该考虑作为问题的根源?

于 2012-05-23T14:29:34.087 回答