- 基本元素预览
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
<localRepository></localRepository>
<servers> </servers>
<mirrors> </mirrors>
<profiles></profiles>
</settings>
-
配置解释
localRepository
配置本地仓库的地址,默认${user.home}/.m2/repository
如:C:\Users\29422\.m2\repository
servers
用于配置仓库的账号密码等信息
此处id对应pom.xml中distributionManagement>repository中ID
deploymentRepo
repouser
repopwd
mirrors
用于配置maven镜像,一般可以用来配置aliyu等镜像仓库
alimaven
central
aliyun maven
http://maven.aliyun.com/nexus/content/repositories/central
central
Maven Repository Switchboard
http://repo1.maven.org/maven2
central
profiles
根据不同环境配置不同的参数