1.配置Maven目录
安装maven其实很简单,就像安装绿化软件一样将其下载,然后解压缩,就可以了。 然后将%maven_home%/bin写入path文件即可。 在这里我主要是讲一下如何修改.m/repository文件的路径,即maven默认jar,source源文件库的存放目录。打开%maven_home%/conf目录下的settings.xml文件,查找到localRepository标签段,我这里修改为如下所示:
这样那些文件就不会自动下载到C:\Users\LONMID\.m2\repository,而是下载到我指定的E:\repo\repository下面.
2.SVN,Hudon,Sonar 代码质量保证和持续部署
它们的安装过程略。
所有的过程搭建成功后,运行分别svn, hudson,sonar,
svn:
svnserve -d -r f:\svn_test
hudson:
cd /d E:\hudson
java -jar hudson.war
(注意,如果你要修改hudson的端口的话,则使用
sonar:
StartSonar.bat
在地址栏中输入: http://192.168.17.24:9000
如下所示:
如下所示:
修改标注的部分即可。
然后修改你项目的顶级pom.xml文件。pom.xml,以智能路灯的顶级pom.xml为例,如下所示:
再者,运行nexus,如下命令:
Startnexus.bat
然后在控制台中输入:
http://192.168.17.24:8081/nexus/index.html , 并且输入帐号和密码:
admin/admin123
如下图所示:
然后在本地运行 :
mvn deploy
即可将所有jar包上传至私服,如果要上传source jar包的话,则需要使用如下命令:
然后就可以用网页浏览我们所创建的私服务器数据了,在地址栏中输入: http://192.168.17.24:8081/nexus/content/groups/public/
(注意:我们也可以修改nexus的默认端口,在E:\nexus\nexus-oss-webapp-1.9.2.4\conf目录下的plexus.properties)
如下所示:
参考网址: http://michael-tuan.iteye.com/blog/375686
http://hi.baidu.com/tk_ayj/blog/item/b5865bce8dbff236f9dc6124.html
安装maven其实很简单,就像安装绿化软件一样将其下载,然后解压缩,就可以了。 然后将%maven_home%/bin写入path文件即可。 在这里我主要是讲一下如何修改.m/repository文件的路径,即maven默认jar,source源文件库的存放目录。打开%maven_home%/conf目录下的settings.xml文件,查找到localRepository标签段,我这里修改为如下所示:
这样那些文件就不会自动下载到C:\Users\LONMID\.m2\repository,而是下载到我指定的E:\repo\repository下面.
2.SVN,Hudon,Sonar 代码质量保证和持续部署
它们的安装过程略。
所有的过程搭建成功后,运行分别svn, hudson,sonar,
svn:
svnserve -d -r f:\svn_test
hudson:
cd /d E:\hudson
java -jar hudson.war
(注意,如果你要修改hudson的端口的话,则使用
java -jar hudson.war --httpPort=
8088
--ajp13Port=
18009
)
sonar:
StartSonar.bat
在地址栏中输入: http://192.168.17.24:9000
如下所示:
然后在地址栏中输入: http://192.168.17.24:8080
如下所示:
点击运行,如下所示:
3.迁移nexus至新的服务器中
首先,修改 repository目录下面的setting.xml文件,
如下所示:
修改标注的部分即可。
然后修改你项目的顶级pom.xml文件。pom.xml,以智能路灯的顶级pom.xml为例,如下所示:
再者,运行nexus,如下命令:
Startnexus.bat
然后在控制台中输入:
http://192.168.17.24:8081/nexus/index.html , 并且输入帐号和密码:
admin/admin123
如下图所示:
然后在本地运行 :
mvn deploy
即可将所有jar包上传至私服,如果要上传source jar包的话,则需要使用如下命令:
然后就可以用网页浏览我们所创建的私服务器数据了,在地址栏中输入: http://192.168.17.24:8081/nexus/content/groups/public/
(注意:我们也可以修改nexus的默认端口,在E:\nexus\nexus-oss-webapp-1.9.2.4\conf目录下的plexus.properties)
如下所示:
参考网址: http://michael-tuan.iteye.com/blog/375686
http://hi.baidu.com/tk_ayj/blog/item/b5865bce8dbff236f9dc6124.html