错误:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 解决思路:在本地库中装载maven-archetype-quickstart-1.1.jar第1步.从 http://maven.ibiblio.org/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/maven-archetype-quickstart-1.1.jar下载最新版maven-archetype-quickstart-1.1.jar
第2步.cmd窗口执行
mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId=maven-archetype-quickstart -Dversion=1.1 -Dpackaging=jar -Dfile=d:\maven-archetype-webapp-1.0.jar
红字是你jar包放在的位置
追加说明:
按照以上步骤仍然还不行,查明了原因。maven配置的镜像库是oschina的,貌似关闭了。后来改用阿里的就可以了。附上MAVEN依赖的比较全的镜像库地址:
alimaven aliyun maven http://maven.aliyun.com/nexus/content/groups/public/ central central Maven Repository Switchboard http://repo1.maven.org/maven2/ central repo2 central Human Readable Name for this Mirror. http://repo2.maven.org/maven2/ ibiblio central Human Readable Name for this Mirror. http://mirrors.ibiblio.org/pub/mirrors/maven2/ jboss-public-repository-group central JBoss Public Repository Group http://repository.jboss.org/nexus/content/groups/public maven.net.cn oneof the central mirrors in china http://maven.net.cn/content/groups/public/ central