失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > eclipse maven工程时报错Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart

eclipse maven工程时报错Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart

时间:2018-11-03 21:58:44

相关推荐

eclipse maven工程时报错Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart

在新建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》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。