ITPub博客

首页 > 应用开发 > IT综合 > Maven2 用于度量和品质保证的插件

Maven2 用于度量和品质保证的插件

原创 IT综合 作者:tbase 时间:2007-06-29 16:35:05 0 删除 编辑

Maven2 用于度量和品质保证的插件
checkstyle 检查编码风格
常用的goal
checkstyle:checkstyle
备注
可以用eclipse-cs编辑检查规则http://eclipse-cs.sourceforge.net/index.shtml

surefire-report 生成单元测试报告
常用的goal

surefire-report:report

jdepend 生成包的度量报告
常用的goal

jdepend:generate

findbugs 检查潜在的缺陷
常用的goal

findbugs:findbugs

cobertura 生成测试覆盖率报告
常用的goal

cobertura:cobertura
备注
直接从官方镜像下载的版本有个bug,不能正确生成报告(参见http://jira.codehaus.org/browse/MCOBERTURA-61)可以下载补丁后的jar替换本地repository的
jdk1.4对应的补丁: http://dist.codehaus.org/mule/dependencies/maven2/cobertura/cobertura/1.8/cobertura-1.8.jar
jdk5对应的补丁:http://www.artofsolving.com/files/m2/cobertura-1.8.jar


以上是一些常用的用于品质管理的插件。默认情况下都不用配置,相当方便。如果需要手动配置的话,根据网上的文档也相当容易配置。
apache的maven plugin页面: http://maven.apache.org/plugins/
codehaus mojo 页面: http://mojo.codehaus.org

创建web项目

mvn archetype:create -DgroupId=com.junglesong.mytodo -DartifactId=mytodo -DarchetypeArtifactId=maven-archetype-webapp

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/249132/viewspace-922289/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    28
  • 访问量
    159610