新建一个maven项目的时候,报了如下错误:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (D:\FlexPro\libs)
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (D:\FlexPro\libs)
这里查询到的解决方案是:
1.从http://maven.oschina.net/content/groups/public/org/apache/maven/archetypes/maven-archetype-quickstart/ 下载最新版maven-archetype-quickstart-1.1.jar
2.命令行到下载目录下执行mvn install:install-file
-DgroupId=org.apache.maven.archetypes
-DartifactId=maven-archetype-quickstart -Dversion=1.1 -Dpackaging=jar -Dfile=maven-archetype-quickstart-1.1.jar