Agile Team Collaboration
这章主要讲述了通过nexus和hudson来构建持续集成,团规敏捷开发。
需要下载servlet容器tomcat,nexus和hudson的war包,tomcat:安装就不细说了,
nexus:包直接扔到tomcat下启动服务就可以了。
nexus默认用户名密码:admin/admin123
第一次登陆nexus会提示建立repository,如图
然后用户目录USER_HOME/.m2/settings.xml添加:
TestRepository
My test repository
*
这样maven会通过咱们在nexus上建立的repository现在相关依赖,并缓存到本地服务器上,以便提升下次访问速度。
下面是安装hudson,hudson(continuous integration)完成持续集成的,在下载hudson的
war包,直接部署到tomcat下。
hudson需要做些配置:
Hudson needs to be configured. This can be done by selecting Manage Hudson|Configure System. Make sure you configure JDK, Maven, and SVN/CVS properties.
Next we create a Hudson job for our project. Hudson provides a job type dedicated for Maven; the job type "maven2" can be used for Maven 2 and Maven 3 projects.如图:
Create the job by entering the project and Source Code Management properties.Build triggers can be specified and so one can build settings including e-mail notifications, if required.
hudson的工作方式:
Once set up correctly, every time code is committed to SVN / CVS, the Hudson job gets triggered. The job then in-turn proceeds to trigger a Maven build. Hudson also continues to monitor the console output of the Maven build. Hudson looks for patterns in the Maven output and confirms if the build and tests are completed successfully or not.
如图:
阅读(1358) | 评论(0) | 转发(0) |