你好,最近看到你blog上面Maven2的文章,自己配置了下有点问题请教你。
1.我第一次运行mvn archetype:create后从网上把要用的包下到了资源库里,第二次我网断了,再运行这个命令就出下面的错误,是不是一定要连网才可以运行啊?还是在哪里指定路径啊?请指教,谢谢。
C:\maven-2.0.9\project>mvn archetype:create -DgroupId=com.mycompany.app -Dartifa
ctId=my-app
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:create] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:create]
[WARNING] This goal is deprecated. Please use mvn archetype:generate instead
[INFO] Defaulting package to group ID: com.mycompany.app
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Error transferring file
org.apache.maven.archetypes:maven-archetype-quickstart:jar:1.0
from the specified remote repositories:
central (
http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14 seconds
[INFO] Finished at: Sun Jul 27 21:35:04 CST 2008
[INFO] Final Memory: 8M/14M
[INFO] ------------------------------------------------------------------------
回复 更多评论