1.修改遠程倉庫的位置(maven默認倉庫是國外,所以我們下載jar包很慢)
找到我們安裝的maven路徑下的conf文件夾下的settings.xml文件

將文件復制到 C:\Users\Administrator\.m2\下 ,修改文件中的倉庫位置,我用的是阿里雲的一個鏡像倉庫
<mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> </mirror>

2.設置archetypeCatalog=local(下面有圖示)
1.由於默認情況下,根據archetype創建maven項目會從網絡下載catalog文件,導致創建maven項目緩慢
Searching for remote catalog: http://repo1.maven.org/maven2/archetype-catalog.xml
2.解決辦法可以設置使用本地catalog文件,在IDEA中設置archetype的使用方式為local;
-DarchetypeCatalog=local
直接使用360瀏覽器新建一個下載項

將archetypeCatalog的下載地址復制進去

下載后放到哪里呢,這里與本地倉庫的位置有關,假如本地倉庫是maven默認的,並沒有修改 那么就需要放到 C:\Users\del-berlin\.m2\repository\org\apache\maven\archetype\archetype-catalog\2.4\下 ,本地倉庫的默認位置:Default: ${user.home}/.m2/repository



選擇defalut Settings進行設置,否則你設置的是你當前項目


