解決intellij idea新建maven項目,加載archetype模型很慢

一:問題描述bash

用開發工具 intellij idea 新建maven項目的時候,無論選擇什麼archetype模型,加載都很慢網絡

二:緣由maven

maven構建的時候,每次去請求 ide

archetype-catalog.xml

文件工具

請求地址:http://repo1.maven.org/maven2/archetype-catalog.xml開發工具

致使很慢idea

三:解決辦法code

讓maven直接加載本地 archetype-catalog.xml 文件,不讓請求網絡xml

1:第一步:找到本地 maven項目 archetype 目錄開發

好比個人目錄:

把從 http://repo1.maven.org/maven2/archetype-catalog.xml下載的內容,本地生成一個

archetype-catalog.xml 文件 放入archetype-catalog\2.4 目錄下

2:第二步:

intellij idea 打開maven項目後,在settings中設置 maven的運行參數:

添加:

-DarchetypeCatalog=local

如圖

3:第三步

從新引入maven

致使,慢的問題解決!

相關文章
相關標籤/搜索