根节点:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
localRepository
本地仓库路径配置,默认路径:~/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
interactiveMode
是否需要和用户交互,默认为true 通常在命令行里与用户进行交互,设置false表示使用默认配置
<interactiveMode>true</interactiveMode>
usePluginRegistry
是否需要使用plugin-registry.xml文件来管理插件版本
<usePluginRegistry>false</usePluginRegistry>
offline
maven是否需要在离线模式下运行。如果构建系统需要在离线模式下运行,则为true,默认为false。当由于网络设置原因或者安全因素,构建服务器不能连接远程仓库的时候,该配置就十分有用。
<offline>false</offline>
pluginGroups
当没有提供插件的组织id时默认使用的组织id列表
<pluginGroups>
<!--plugin的组织Id(groupId) -->
<pluginGroup>org.codehaus.mojo</pluginGroup>
</pluginGroups>
proxies
设置代理的时候能用到的配置,不过一般不用理会
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
servers
<servers>
<server>
<id>deploymentRepo</id>
<username>repouser</username>
<password>repopwd</password>
</server>
</servers>
mirrors
这个有点用,在国内使用国外的中央仓库会比较慢,可以使用阿里云的中央仓库
<mirrors>
<mirror>
<id>top-mvn-repository</id>
<mirrorOf>*</mirrorOf>
<name>All repository</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
其他属性暂时用不上,用上的时候再补上记录