maven的一些使用配置!

1.国外库太慢,更换为国内镜像库
在你的maven安装目录下找到conf目录下的setting.xml
修改:
<mirrors>
<id>CN</id>
<name>OSChina Central</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirrors>

2.采用archetype生成项目的时候,卡在:Generating project in Batch mode时间太长
首先手工下载http://repo1.maven.org/maven2/archetype-catalog.xml文件,放置在C:UsersAdministrator.m2 epositoryorgapachemavenarchetypearchetype-catalog2.4目录下
然后生成的时候在命令行后面加上参数:-DarchetypeCatalog=local

3.使用IDEA,生成解决办法:
在file->other settings->default settings->build,Execution,Deployment->build Tools->Maven->Runner里面的VM Options:里面填写-DarchetypeCatalog=local
IDEA里面的vaadin项目Maven运行配置:
run->edit run configurations command line写上:package jetty:run

原文地址:https://www.cnblogs.com/softman11/p/5481754.html