daguozb

Idea新建maven项目时会很卡,可以采用如下设置;具体原因如下:

IDEA根据maven archetype的本质,其实是执行mvn archetype:generate命令,该命令执行时,需要指定一个archetype-catalog.xml文件。

该命令的参数-DarchetypeCatalog,可选值为:remoteinternal  local等,用来指定archetype-catalog.xml文件从哪里获取。

默认为remote,即从 http://repo1.maven.org/maven2/archetype-catalog.xml路径下载archetype-catalog.xml文件。

http://repo1.maven.org/maven2/archetype-catalog.xml 文件约为3-4M,下载速度很慢,导致创建过程卡住。

解决方法:

1新建到这步时新增:

key为:archetypeCatalog

Value为:internal或者lacal

   

 

 

2、配置maven时直接配置archetypeCatalog (一劳永逸)

 新增配置:-DarchetypeCatalog=internal

 

分类:

技术点:

相关文章:

  • 2021-07-30
  • 2021-06-29
  • 2021-10-26
  • 2022-01-09
  • 2021-06-10
  • 2022-02-20
猜你喜欢
  • 2021-12-11
  • 2021-07-18
  • 2021-07-29
  • 2022-01-07
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案