下载archetype-catalog.xml文件,在maven的VM Options加上-DarchetypeCatalog=localgit
默认状况下,建立maven项目是从网络下载catalog文件,咱们能够将catalog文件下到本地,而后经过设置archetype的使用方式为local,这样就不用每次都从网络上下载了。github
步骤:web
一、下载archetype-catalog.xml文件到本地。apache
文件的位置是http://repo1.maven.org/maven2/archetype-catalog.xml,但直接访问是下载不了,我把该文件放在了github上,有须要的同窗能够点击下载。网络
二、下载后放到本地仓库中对应的位置post
maven本地仓库的位置与settting.xml中的配置有关,例如个人setting.xml配置仓库的位置是:D:\apache-maven-3.6.0\repositoryorm
改以后cdn
直接换了个单位!!!!xml