转载自:https://blog.csdn.net/fyydashen/article/details/105921518

用idea创建第一个maven项目的时候可能会出现如图所示问题(maven版本问题)

idea创建第一个maven项目报错:Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5

这个时候可以去看一下这里的配置是不是跟自己本地的一致

idea创建第一个maven项目报错:Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5

如果给出警告:如图所示

idea创建第一个maven项目报错:Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5

这个可能就比较麻烦一些

需要手动下载 archetype-catalog.xml文件,放在本地仓库的根路径下。

https://repo1.maven.org/maven2/archetype-catalog.xml

然后添加archetype-catalog.xml到本地仓库的文件夹后,还需要修改一个设置。指定-DarchetypeCatalog为local,即可使用maven默认的archetype-catalog.xml,而不用再remote下载。打开Idea,点击Configure --> Settings→maven→runner,在Runner页面的VM Options添加:-DarchetypeCatalog=local,点击Apply,点击OK。

官网介绍:https://maven.apache.org/archetype/archetype-models/archetype-catalog/archetype-catalog.html

镜像和本地仓库不要忘了配置!!

idea创建第一个maven项目报错:Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5

idea创建第一个maven项目报错:Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2021-06-22
  • 2021-05-04
  • 2022-12-23
  • 2022-01-09
猜你喜欢
  • 2022-01-17
  • 2021-12-13
  • 2021-09-14
  • 2022-12-23
  • 2021-04-06
  • 2022-12-23
  • 2021-08-23
相关资源
相似解决方案