这篇主要来介绍maven的settings.xml配置文件
这个文件是maven的全局配置 对所有的项目都有效,maven中存在两个settings。xml文件
一个在maven_home/conf目录中 最为全局配置 团队成员要保持一致
另一个在windows的用户目录下:${user.dir} /.m2/settings.xml。如果成员有自己的自定义配置 可在该文件中配置
settings.xml基本结构如下:
[code] <settings xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/> 本地库的保存位置,默认保存在${user.dir} /.m2/repository
<interactiveMode/>
<usePluginRegistry/>
<offline/> 如果不想每次编译,都去查找远程中心库,那就设置为true。当然前提是你已经下载了必须的依赖包。
<pluginGroups/>
<servers/>
<mirrors/> 镜像库
<proxies/>
<profiles/>
<activeProfiles/>
</settings>[/code]
参考 [url]http://blog.youkuaiyun.com/wind5shy/archive/2007/10/18/1830826.aspx[/url]
这个文件是maven的全局配置 对所有的项目都有效,maven中存在两个settings。xml文件
一个在maven_home/conf目录中 最为全局配置 团队成员要保持一致
另一个在windows的用户目录下:${user.dir} /.m2/settings.xml。如果成员有自己的自定义配置 可在该文件中配置
settings.xml基本结构如下:
[code] <settings xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/> 本地库的保存位置,默认保存在${user.dir} /.m2/repository
<interactiveMode/>
<usePluginRegistry/>
<offline/> 如果不想每次编译,都去查找远程中心库,那就设置为true。当然前提是你已经下载了必须的依赖包。
<pluginGroups/>
<servers/>
<mirrors/> 镜像库
<proxies/>
<profiles/>
<activeProfiles/>
</settings>[/code]
参考 [url]http://blog.youkuaiyun.com/wind5shy/archive/2007/10/18/1830826.aspx[/url]