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:\Users\Administrator\.m2\repository\org\apache\maven\archetype\archetype-catalog\2.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

posted @ 2016-05-11 14:24  softman11  阅读(782)  评论(0编辑  收藏  举报