maven settings配置 maven中setting配置_maven



<?xml version="1.0" encoding="UTF-8"?>
 
<settings xmlns="http:///SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:///SETTINGS/1.0.0 http:///xsd/settings-1.0.0.xsd"> <!--指定本地仓库存储路径。默认值为~/.m2/repository 即 ${user.home}/.m2/repository。 --> <localRepository>d:/.m2/repository</localRepository> <!--指定Maven是否需要和用户输入进行交互。true:需要与用户交互;false:使用一个合理的默认值。默认值为true。 --> <interactiveMode>true</interactiveMode> <!--指定是否使用plugin-registry.xml文件来管理插件版本。设为true表示使用。默认值为false。--> <usePluginRegistry>false</usePluginRegistry> <!--指定是否在离线模式下运行。设为true表示项目构建要在离线模式下运行,默认值为false。 --> <offline>false</offline> <!-- 指定插件groupId列表,用于搜索时插件的groupId没有明确规定。 --> <pluginGroups> <!-- 指定使用插件查找进一步的组标识符 --> <pluginGroup>com.micmiu.plugins</pluginGroup> </pluginGroups> <!-- 指定这台机器连接到网络的代理服务器的列表。除非另有规定(系统属性或命令行开关), 列表中配置的第一代理将被激活使用。--> <proxies> <!-- 配置代理服务器的相关参数 --> <proxy> <!-- 代理标识ID,默认值:default --> <id>micmiuProxy</id> <!-- 指定是否激活,默认值:true --> <active>true</active> <!-- 指定代理协议,默认值:http --> <protocol>http</protocol> <!-- 指定代理认证的用户名 --> <username>micmiu</username> <!-- 指定代理认证用户的密码 --> <password>mypwd</password> <!-- 指定代理服务器的主机名 --> <host>micmiu.com</host> <!-- 指定代理服务的端口 默认值:8080 --> <port>80</port> <!-- 指定不被代理的主机名列表。多个用|分隔。--> <nonProxyHosts>|ctosun.micmiu.com</nonProxyHosts> </proxy> </proxies> <!-- 这是一个认证配置的列表,系统内部根据配置的serverID使用。认证配置用于maven链接到远程服务--> <servers> <!-- 指定的身份认证信息用于连接到一个特定的服务器时,确定系统内的唯一的名称(简称下面的'id'属性)。--> <server> <!-- 这是server的id(注意不是用户登陆的id)。该id与distributionManagement中repository元素的id必须要匹配。--> <id>micmiu-releases</id> <!-- 服务器认证的用户名 --> <username>michael</username> <!-- 服务器认证的用户对应的密码 --> <password>mypwd</password> </server> <!-- 另一个示例 私钥/密码 --> <server> <id>micmiu-snapshots</id> <!-- 认证时使用的私钥文件。 --> <privateKey>/home/micmiu/.ssh/id_dsa</privateKey> <!-- 认证时使用的私钥密码,没有密码就设为空 --> <passphrase>mypwd</passphrase> <!-- 目录被创建时的权限设置。其值对应了unix文件系统的权限,如664,或者775 --> <directoryPermissions>775</directoryPermissions> <!-- 仓库文件创建时的权限设置。其值对应了unix文件系统的权限,如664,或者775。 --> <filePermissions>664</filePermissions