settings.xml的配置,以及本地资源库的设置
maven的配置文件settings.xml存在于两个地方:
1.安装的地方:${M3_HOME}/conf/settings.xml 全局配置
2.用户的目录:${user.home}/.m2/settings.xml 用户配置
如下是settings.xml的配置,重点讲解几个地方,因为接下来我们要配置安装自己的maven私有库
<?xml version="1.0" encoding="UTF-8"?>
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">
${user.home}/.m2/repository
true
false
false
org.codehaus.mojo
myproxy
true
http://…
proxy.somewhere.com
8080
proxyuser
somepassword
*.google.com|ibiblio.org
server001
my_login
my_password
${usr.home}/.ssh/id_dsa
some_passphrase
664
775
planetmirror.com
PlanetMirror Australia
http://downloads.planetmirror.com/pub/maven2
central
test
false
1.7
Windows XP
Windows
x86
5.1.2600
mavenVersion
2.0.3
/usr/local/hudson/hudson-home/jobs/maven-guide-zh-to-production/workspace/
/usr/local/hudson/hudson-home/jobs/maven-guide-zh-to-production/workspace/
usr/local/winner/jobs/maven-guide
codehausSnapshots
Codehaus Snapshots
false
always
warn
http://snapshots.maven.codehaus.org/maven2
default
env-test