持续集成环境:maven+nexus+jenkins+sonar
安装包准备:
1. maven
2. jdk7+tomcat7
3. nexus
4. Jenkins
5. Sonar
一、安装Nexus
windows下安装nexus的方法说明:
1.在F:\nexus\nexus-2.3.1-01-bundle\nexus-2.3.1-01\bin\jsw\conf中配置java路径
nexus-2.10.0-02/bin/jsw/conf/wrapper.conf
# Set the JVM executable
# (modify this to absolute path if you needa Java that is not on the OS path)
wrapper.java.command=C:\ProgramFiles\Java\jdk1.7.0_67\jre\bin\java.exe
2. 选择nexus-2.3.1-01-bundle\nexus-2.3.1-01\bin\jsw\windows-x86-64里面的install-nexus.bat 以管理员身份运行。
Nexus默认端口是8081,在浏览器中打开说明安装成功:http://localhost:8081/nexus
二、安装maven
将下载的maven解压放置在开发机上(windows),并配置conf目录下的setting.xml文件:
<?xmlversion="1.0" encoding="UTF-8"?>
<settingsxmlns="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.0http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!--配置maven本地仓库路径 -->
<localRepository>E:\MaveWork\java\repository</localRepository>
<servers>
<!--配置nexus的仓库用户名密码 -->
<server>
<id>releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
<!-- 配置tomcat的用户名和密码 -->
<server>
<id>tomcatRole</id>
<username>admin</username>
<password>admin</password>
</server>
</servers>
<mirrors>
<!-- 配置nexus仓库镜像-->
<mirror>
<id>nexus</id> </