?
?
?
?
注意1:MAVEN 是依赖JAVA运行环境的,故只有JAVA先安装好并配置好才能使用MAVEN
注意2:环境(win7,jdk1.7.0_51)
1、maven 下载,先进入该地址(http://maven.apache.org/download.cgi)
?
下载下该文件。解压该文件(本人的解压路径:D:\soft\maven\apache-maven-3.3.3)。
?
2、配置windows7下的路径:
1)新增环境变量:key = MAVEN_HOME,value=D:\soft\maven\apache-maven-3.3.3
?
2)新增环境变量2(修改原有的变量值): key = Path, value增加(;%MAVEN_HOME%\bin;)
?
?
3、??测试安装结果:?在控制台中输入:mvn? -v
?
?
4、在Eclipse中配置maven
?
1)直接在eclipse 中的preferences,在eclipse中添加maven的路径
?
?
2)修改maven的settings.xml文件(D:\soft\maven\apache-maven-3.3.3\conf\setting.xml)
(1)? 修改本地的仓库地址
修改之后:
3)修改官服路径:?
?
注意:要修改mirrorOf为central,意思是与官服的配置相同
?
?
?4) 修改代理
<proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <host>proxy.xxxx</host> <port>8080</port> <nonProxyHosts>192.168.xxx.*</nonProxyHosts> </proxy>
?
5)修改 网络私服
?
<mirror>
<id>central</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://xxx.xxx.xxx.xxx:8081/nexus/content/repositories/public</url>
</mirror>
?
?
?6)修改 上传路径?
? ?
<profile> <id>dev</id> <repositories> <repository> <id>local-nexus</id> <url>http://xxx.xxx.xxx.xxx:8081/nexus/content/groups/public</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> </profile>
?
?
?
?
?
? ? ? ? ? ?
原文:http://knight-black-bob.iteye.com/blog/2247319