checkstyle+ant生成checkstyle报告
<?xml version="1.0" encoding="UTF-8" ?>
<project name="tibim" default="xml2html"
xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant" basedir=".">
<description>
checkstyle tibim project!
</description>
<property name="extrlib"
location="D:\jenkins\svn\web\TiBIM\webapps\web\WEB-INF\lib" />
<property name="checkstyleFile" value="./checkstyle" />
<property name="project.src" location="./src" />
<target name="clean" description="clean up">
<delete dir="${checkstyleFile}" />
</target>
<path id="compile.classpath">
<fileset dir="${extrlib}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="init" depends="clean">
<!-- Create the classes directory structure used by compile -->
<mkdir dir="${checkstyleFile}" />
</target>
<target name="checkstyle" depends="init"
description="Generates a report of code convention violations.">
<taskdef
resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
classpath="${extrlib}/checkstyle-8.0-all.jar" />
<checkstyle config="${extrlib}/code_rules.xml"
failureProperty="checkstyle.failure" failOnViolation="false">
<formatter type="xml" tofile="${checkstyleFile}/checkstyle_report.xml" />
<fileset dir="${project.src}" includes="**/*.java" />
</checkstyle>
</target>
<target name="xml2html" depends="checkstyle">
<xslt in="${checkstyleFile}/checkstyle_report.xml" out="${checkstyleFile}/checkstyle.html"
style="${extrlib}/checkstyle-frames.xsl">
<param name="output.dir" expression="${checkstyleFile}" />
</xslt>
</target>
</project>
其中checkstyle-8.0-all.jar是checkstyle依赖的jar包,可以在https://sourceforge.net/projects/checkstyle/files/checkstyle/处下载使用
code_rules.xml是公司内部的checkstyle规范文档,可以在http://checkstyle.sourceforge.net/处下载sun公司或者google的代码规范
checkstyle-frames.xsl是生成checkstyle测试报告的样式表,可以在github上,https://github.com/checkstyle/contribution下面xsl文件下找到
欢迎转载,转载请注明出处:http://www.cnblogs.com/hustar0102/p/5885115.html
checkstyle+ant生成checkstyle报告的更多相关文章
- jmeter+ant生成xml报告
1.jdk安装 2.jmter安装 3.ant安装 下载apache-ant-1.10.6-bin.zip,直接解压就可使用,和jmeter类似 ant环境变量配置 新建系统变量:ANT_HOME,变 ...
- Jmeter+Ant生成结果报告时,MinTime、MaxTime显示NaN的问题
将apache-jmeter-2.13\lib中的serializer-2.7.2.jar.xalan-2.7.2.jar复制到apache-ant-1.9.6\lib中即可: 复制前生成:
- window 下 jmeter+ant 自动生成html报告并发送邮件
一.安装ant 1.ant 下载地址:https://ant.apache.org/bindownload.cgi 2.下载完成解压到指定目录下 3.配置ant 环境变量 新建系统变量 -ANT_HO ...
- jmeter+ant+jenkins+mac 报告优化(三) 使用命令行执行jmeter方式生成多维度的图形化HTML报告
1.在构建中填写如下命令: 2.start.sh文件的内容 cd /Applications/apache-jmeter-3.0/bin/ CURTIME=`date +%Y%m%d%H%M` ./j ...
- jmeter+ant+jenkins+mac报告优化
一.在上篇博客中生成的报告有两个问题: 1.date not defined 2.Min Time和Max Time显示成了NaN 二.Jmeter+Ant报告生成原理: 在解决问题之前,让我们先弄清 ...
- jmeter5.0生成html报告 快速入门
JMeter性能测试5.0时代之-多维度的图形化HTML报告 快速入门 1.确认基本配置 在jmeter.properties或者user.properties确认如下配置项: jmeter.save ...
- 如何生成Junit报告
前言: 对Eclipse的工程写单元测试: 1. 一个工程有多个测试类,将测试类放到一个测试包下. 2. 每一个测试类写好,都单独执行run as ->JUnit Test测一下. 3. ...
- ant jmeter 优化报告
一:主要内容 报告展示,该报告利用的jmeter.results.shanhe.me.xsl里面加入了自己写的部分代码,优化了展示效果 下载安装ant 修改jmeter.properties 下载jm ...
- jmeter+ant+jenkins+mac报告优化(一):解决Min Time和Max Time显示NaN
一.在上篇博客中生成的报告有两个问题: 1.date not defined 2.Min Time和Max Time显示成了NaN 二.Jmeter+Ant报告生成原理: 1.在Jmeter的extr ...
随机推荐
- ar - 建立, 修改档案或从档案中抽取成员.
总览 ar [-]{dmpqrtx}[abcfilNoPsSuvV] [membername] [count] archive files... 描述 GNU 组织的ar 程序 用于建立, 修改档案 ...
- maven release插件将一版本发布到仓库中时Return code is: 401, ReasonPhrase:Unauthorized
需要在maven的setting.xml中配置servers.server节点,其值为nexus的对应的repository的id以及用户名及密码 <servers> <server ...
- Eclipse使用入门指南及技巧
Java是必须的 安装一个JDK就可以了,比如jdk-6u39-windows-x64.exe,安装完毕,会自行安装JRE. 如果不用IDE,这个时候用记事本也是可以写程序,然后用javac编译, ...
- Java中的JVM的内存结构
Java的虚拟机自身结构图: JVM内存结构主要包括两个子系统和两个组件.两个子系统分别是Classloader子系统和Executionengine(执行引擎)子系统:两个组件分别是Runtimed ...
- Hihocoder #1938 最大权闭合子图模板
这里的讲解很不错,适合作为入坑题: Hihocoder#1938 代码: #include<algorithm> #include<iostream> #include< ...
- 第十九节:Scrapy爬虫框架之Middleware文件详解
# -*- coding: utf-8 -*- # 在这里定义蜘蛛中间件的模型# Define here the models for your spider middleware## See doc ...
- JQuery常用的案例
1.给导航栏添加鼠标移上去的时候变换背景颜色的方法. $(function () { $(".nav li").mouseover(function () { $(this).cs ...
- css3 & background & background-image
css3 & background & background-image https://developer.mozilla.org/en-US/docs/Web/CSS/backgr ...
- vue2.0一个书城实例
gitHub克隆地址 git clone https://github.com/Webxiaoyaun/vue-book.git 点击去Github下载 ## 一个书城 ## 有增加,修改,缓存,懒加 ...
- 光纤通信(codevs 1955)
题目描述 Description 农民John 想要用光纤连通他的N (1 <= N <= 1,000)个牲口棚(编号1..N).但是,牲口棚位于一个大池塘边,他仅可以连通相邻的牲口棚.J ...