hudson

Overview  

   Although maven as a popular and powerful tool at the Java industry and it has reduced lots of resources and costs for software projects, but we need some required components in addition to  pure technologies such as management,monitoring,integrating.      luckily we got a treasure from the open source friends that it's a CI software named Hudson.    We integrated more and more components and plugins at Hudson platform usually.  but today in this case,  our subject is  how to configure the automatically reports for PMD,CPD at Hudson platform.

Requirements

  • generate reports automatically(PMD,CPD..)
  • deployed automatically
  • customize configurable

Prepared components

  1. Installed maven2  and had better with some experiences of maven building.  and  at least know the concept for M2,  else please visit  General portal for maven   .
  2. Installed Hudson components.   reference is Hudson portal .. xx.

Primary components

  • setting.xml 
  • pom.xml
  • maven plugin

    setting.xml is the global configurable descriptor for maven, lots of global variable,references,resource locations has been defined at this descriptor.   It has been stored at the specified directory under customer profile directory.   As this subject, we need do some operations at the setting.xml,   every one please follow me. :-)

    pom.xml is the primary descriptor for the maven project.  I don't want to provide a introduction with pom to my dear friends, but we are unsure that we will modify the pom.xml at the following process.

Architecture for maven reporting

     All the generated reports will be stored at the report repository,   the special location will have their own reports, so the architecture for maven reporting as below:

  

Process

 step1.  set global reporting repository

    open the $USER_PROFILE_HOME/.m2/setting.xml  at the disk and customize the reporting repository location as below:

  also you can used another transfer protocol such as: scp, ftp, https ...

step2.  set parameters at pom.xml for report generating

1.  Open and edit the pom.xml  in the project main folder which named "Master-Build"

add property in the <properties> tag.

2. Set the website property at distributionManagement in pom.xml around all projects , the pattern is "<ubs.site.url.base>/<component.name>/<project.version>/<project.name>" and snapshot as below
3. Add reporting tag after <distributionManagement> tag

 

step3. copy the reporting configuration to all sub projects

step4.  execute maven which goals are:   site:site  site:deploy

step5. check the issue

   go to the location which has been set at setp1, then we can find the reports for the current building.  the demo as below:

 
step6.  review issue

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值