Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quick

Posted 吴武陵

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quick相关的知识,希望对你有一定的参考价值。

很久用eclipse了,创建maven的quickstart项目时出现错误“Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quick……”

emmm,网上看到的方法是下载一个maven-archetype-quickstart-1.1.jar文件,之后执行安装,刚好我本地有一个这样的文件,就将其复制到maven安装目录下的lib目录中,并执行如下的命令

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

忽然想为啥会出现这个问题?明明之前使用eclipse的时候都没什么事。

看到执行上述mvn时出现的INFO如下

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---
[INFO] Installing D:\\apache-maven\\apache-maven-3.6.0\\lib\\maven-archetype-quickstart-1.1.jar to E:\\IntelliJ\\maven-repository\\org\\apache\\maven\\archetypes\\maven-archetype-quickstart\\1.1\\maven-archetype-quickstart-1.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.945 s
[INFO] Finished at: 2019-11-03T11:04:44+08:00
[INFO] ------------------------------------------------------------------------

难道是因为自己使用IDEA后重新配置了maven的本地仓库的原因?

记录一下。

 

 

附上参考博客:https://www.cnblogs.com/xsi640/p/3758095.html

以上是关于Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quick的主要内容,如果未能解决你的问题,请参考以下文章

IDEA用github提交Could not resolve host: github.com的解决方案

mysql could not be resolved: Name or service not known

ssh: Could not resolve hostname问题终于解决了?

Push to GitHub:could not resolve host: github.com

Could not resolve bean definition resource pattern 解答了加分

git提示错误关于错误:ssh: Could not resolve hostname github.com: Name or service not known.fatal: Could not r