<?xml version="1.0" encoding="UTF-8"?><project name="codeCheck" default="findbugs"><property file="confi.properties" /><path id="findbugs.lib"><fileset dir="${findbugs.home}/lib"><include name="findbugs-ant.jar"/></fileset></path><taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"><classpath refid="findbugs.lib" /></taskdef><taskdef name="computeBugHistory" classname="edu.umd.cs.findbugs.anttask.ComputeBugHistoryTask"><classpath refid="findbugs.lib" /></taskdef><taskdef name="setBugDatabaseInfo" classname="edu.umd.cs.findbugs.anttask.SetBugDatabaseInfoTask"><classpath refid="findbugs.lib" /></taskdef><taskdef name="mineBugHistory" classname="edu.umd.cs.findbugs.anttask.MineBugHistoryTask"><classpath refid="findbugs.lib" /></taskdef><!-- hi,look, this is procedure --> <target name="findbugs"><antcall target="analyze" /><antcall target="mine" /><antcall target="report" /></target><!-- findbugs task definition --><target name="analyze"><findbugs home="${findbugs.home}"projectName="${project.name}"output="xml:withMessages"outputFile="out.xml"reportLevel="low"effort="max"includeFilter="includerFilter.xml"           ><auxClasspath path="${project.home}/${depend.lib.dir1}/xxx.jar" /><auxClasspath path="${project.home}/${depend.lib.dir2}/xxxjar" /> <class location="${project.home}/${class1.dir}" /><class location="${project.home}/${class2.dir}" /></findbugs></target><!-- mine task --><target name="mine"><!-- Set info to the latest analysis --><setBugDatabaseInfo home="${findbugs.home}"withMessages="true"name="${project.version}"input="out.xml"output="out-rel.xml"/><!-- Checking if history file already exists (out-hist.xml) --><condition property="mining.historyfile.available"><available file="out-hist.xml"/></condition><condition property="mining.historyfile.notavailable"><not><available file="out-hist.xml"/></not></condition><!-- this target is executed if the history file do not exist (first run) --><antcall target="history-init"><param name="data.file" value="out-rel.xml" /><param name="hist.file" value="out-hist.xml" /></antcall><!-- else this one is executed --><antcall target="history"><param name="data.file"         value="out-rel.xml" /><param name="hist.file"         value="out-hist.xml" /><param name="hist.summary.file" value="out-hist.txt" /></antcall></target><!-- Initializing history file --><target name="history-init" if="mining.historyfile.notavailable"><copy file="${data.file}" tofile="${hist.file}" /></target><!-- Computing bug history --><target name="history" if="mining.historyfile.available"><!-- Merging ${data.file} into ${hist.file} --><computeBugHistory home="${findbugs.home}"withMessages="true"output="${hist.file}"><dataFile name="${hist.file}"/><dataFile name="${data.file}"/></computeBugHistory><!-- Compute history into ${hist.summary.file} --><mineBugHistory home="${findbugs.home}"formatDates="true"noTabs="true"input="${hist.file}"output="${hist.summary.file}"/></target><!-- report task --><target name="report"> <xslt in="out-rel.xml"out="rep/default.html"style="${findbugs.home}/src/xsl/default.xsl" /> <xslt in="out-rel.xml"out="rep/fancy.html"style="${findbugs.home}/src/xsl/fancy.xsl" /><xslt in="out-hist.xml"out="rep/fancy-hist.html"style="${findbugs.home}/src/xsl/fancy-hist.xsl" /><xslt in="out-rel.xml"out="rep/plain.html"style="${findbugs.home}/src/xsl/plain.xsl" /><xslt in="out-rel.xml"out="rep/sum.html"style="${findbugs.home}/src/xsl/summary.xsl" /><xslt in="out-rel.xml"out="rep/all.csv"style="xsl/s4csv.xsl" /><xslt in="out-rel.xml"out="rep/all.html"style="xsl/s4html.xsl" /><!-- Checking if history file already exists (out-hist.xml) --><condition property="generate.available"><available file="out-hist.xml"/></condition><!-- this target is executed if the history file do not exist (first run) --><antcall target="generate_email_report"></antcall></target><!-- generate report, current revision's New warnings --><target name="generate_email_report" if="generate.available"><delete file="rep/new.csv" /><copy file="out-hist.xml" tofile="out-hist-copy.xml" /><xslt in="out-hist-copy.xml"out="rep/news.csv"style="xsl/s4csv_news.xsl" /><xslt in="out-hist-copy.xml"out="rep/news.html"style="xsl/s4html_news.xsl" /><delete file="out-hist-copy.xml" /><!-- sned_email --><condition property="send.available"><available file="rep/news.html" /></condition><antcall target="send_email"></antcall></target><!-- send email --><target name="send_email" if="send.available"><!-- TODO --></target></project>

findbugs的ant脚本实践相关推荐

  1. Findbugs 用Ant脚本扫描bugs生成报告

    1.先安装好findbugs插件 2..在工程Project下创建一个文件build.xml 3.编辑build.xml的内容 <!-- 指定项目名和default--> <proj ...

  2. Ant 脚本打印系统属性变量、ant内置属性

    Ant 脚本打印系统属性变量.ant内置属性 作用 编写ant脚本的时候,经常会引用到系统属性,本脚本用于打印系统常用属性(System.getProperties)与环境变量(Environment ...

  3. (转)[Android] 利用 ant 脚本修改项目包名

    [Android] 利用 ant 脚本修改项目包名在开发android应用项目的时候,经常会有这样的需求,一个应用项目,要求 房价上半年下行 下半年或回暖 在不同的OEM下有不同的包名,不同的资源,不 ...

  4. 运行ant脚本(转载)

    http://blog.csdn.net/linwei_1029/article/details/5809801 运行ANT脚本的步骤 1.右击我的电脑-->属性-->高级-->环境 ...

  5. java ant war包_java利用Ant脚本生成war包全过程

    使用ant脚本前的准备 1.下载一个ant安装包.如:apache-ant-1.8.4-bin.zip.解压到E盘. 2.配置环境变量.新增ANT_HOME:E:\apache-ant-1.8.4:P ...

  6. TestNG配合ant脚本进行单元测试

    上面就是一个简单的SSM框架的整合,数据库来自宜立方商城的e3-mall采用一个简单的spring-mvc和spring以及mybatis的整合 单元测试代码为 TestUserByTestNG.ja ...

  7. mybaitis快速生成_Mybatis中使用mybatis-generator结合Ant脚本快速自动生成Model、Mapper等文件...

    使用过Mybatis的同学都知道,针对每一个项目中使用到的数据库表都需要建立其对应的数据库增删改查xxxMapper.xml文件.实体类xxx.java文件以及其他类用来调用进行数据库操作的xxxMa ...

  8. 如何在ant脚本中获得svn版本号

    关于这个问题现在已经有几种解决办法了.SvnAnt: http://subclipse.tigris.org/svnant.html,我在日常的build中用的便是这种方法,但我并不喜欢这种方法,因为 ...

  9. Python实用脚本实践

    Python实用脚本实践 一.文件相关 查找文件 import os path = 'xxx' files = os.listdir(path)for f in files:if f.endswith ...

最新文章

  1. 查找Windows文件来历的好方法
  2. mysql case函数吗_mySQL case函数
  3. 【边缘检测】RCN:Object Contour and Edge Detection with RefineContourNet
  4. 这50个思维方法,深刻改变了我的人生
  5. sql server 群集_SQL Server 2014 –安装群集实例–分步(1/3)
  6. artemis服务_artemis小结
  7. iOS 推送通知详解
  8. oracle和redis关联查询,redis与oracle之间如何可以实现数据同步
  9. 071120 sunny
  10. Atitit Loading 动画效果
  11. 问一个 TCP 连接可以发多少个 HTTP 请求?
  12. windows7系统下使DOS窗口最大化(全屏)
  13. CF - 472C. Design Tutorial: Make It Nondeterministic 贪心
  14. 主题目录检索是什么举例子_文献检索复习
  15. Java实现CCF/CSP 201312-2 ISBN编号(零分!!!
  16. c语言系统垃圾清理软件,c语言中加入“一键清理系统垃圾”的代码怎么实现?...
  17. Android SystemUI 快捷开关分析
  18. frameworks/base/core/res/res/values/symbols.xml:3915: error: no definition for declared symbol解决办法
  19. 关于100层楼,扔两个鸡蛋,求摔碎鸡蛋的临界层的问题
  20. js获取图片点坐标值

热门文章

  1. note8 android p,随手拍着玩 篇一:千元机和入门全画幅——Redmi note8pro vsEOSRP
  2. vue-print-nb 打印功能总结
  3. matlab小信号分析,小信号分析法重点笔记.doc
  4. 每日英语--Week 1
  5. Windows10系统重装(U盘重装系统,以及自己踩过的坑)
  6. Django入门-2:创建第一个Django项目
  7. 2022年安全员-C证考试试卷及安全员-C证模拟考试题库
  8. DM DCA部分操作
  9. layui导航栏鼠标经过青色条块怎么移到顶部?
  10. Unity游戏优化[第二版]学习记录4