在新建maven工程时报错:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories.
Could not resolve artifact
Missing org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE
解决思路:在本地库中装载maven-archetype-quickstart
1.从 /pub/mirrors/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/ 这个我下不了 从csdn下载的,有免费的
下载最新版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=maven-archetype-quickstart-1.1.jar
执行这个一直报连接fail,后来想到我把maven代理源换成OSCHINA的了,改成本来的
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>/maven2/</url>
</mirror>
<mirror>
<id>ui</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>/maven2/</url>
</mirror>
<mirror>
<id>jboss-public-repository-group</id>
<mirrorOf>central</mirrorOf>
<name>JBoss Public Repository Group</name>
<url>/nexus/content/groups/public</url>
</mirror>
再创建maven工程,成功
如果觉得《eclipse maven工程时报错Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart》对你有帮助,请点赞、收藏,并留下你的观点哦!