clover.xml

<project name="ATPCO Build System" default="clover.report"  basedir=".">
  
  <echo>*************** START ***************</echo>
 <!-- Default build timestamp -->
 <tstamp>
  <format property="buildtime" pattern="yyyy-MM-dd HH:mm:ss" />
 </tstamp>

 <!-- Load project build preference -->
 <xmlproperty file="${basedir}/${build.prop}" keeproot="off"
    semanticAttributes="true" includeSemanticAttribute="true" />

 <!-- Load project specfic preference -->
 <xmlproperty file="${project.preference}" semanticAttributes="true"
       includeSemanticAttribute="true" />

 <!-- Default values -->
 <property name="build.target" value="" />
 <property name="build.depends" value="true" />
 <property name="frameBase" value="${frameworks.dir}" />
 
 <!-- =================================
   target: clover
   ================================= -->
 <property name="clover.jar" location="${clover.home.dir}/lib/clover.jar"/>
 <taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>
 <target name="with.clover" if="${clover.run}">
  <echo message="Priming Clover" />
  <!-- this works -->
  <!-- <clover-setup /> -->
  <clover-setup>
   <!--<files>
    <exclude name="**/*Test*.java"/>
    <exclude name="**/*Mock*.java"/>
    <exclude name="**/*JUnit*.java"/>
    <exclude name="**/*Integration*.java"/>
    <exclude name="**/*Performance*.java"/>
    
   </files>
   <methodContext name="hashcode" regexp=".*public int hashCode\(\).*"/>
   <methodContext name="equals" regexp=".*public boolean equals\(.*Object obj\).*"/>
   <statementContext name="iflogger" regexp="^.*if \(logger\.is.*"/>
   <statementContext name="logger" regexp="^.*logger\..*"/>
   <statementContext name="LOGGER" regexp="^.*LOGGER\..*"/>
   -->
  </clover-setup>
 </target>
 <target name="clover.clean" depends="with.clover" >
  <clover-clean/>
 </target>
 <target name="clover.xml">
  <clover-report coverageCacheSize="2g" >
     <current numThreads="1" outfile="offline_coverage.xml" >
     <format type="xml" filter="property,iflogger,logger,LOGGER"/>
     </current>
  </clover-report>
 </target>
 <target name="clover.summary" depends="with.clover">
  <clover-pdf-report outfile="coverage.pdf"/>
 </target>
 <target name="clover.report" depends="with.clover">
    <!-- generate a historypoint for the current coverage -->
    <clover-historypoint historyDir="clover_hist" overwrite="true"/>
    <!-- generate a report with both current and historical data -->
  <clover-report coverageCacheSize="1g">
   <current numThreads="2" outfile="coverage.xml">
    <format type="xml" filter="property,iflogger,logger,LOGGER,hashcode,equals"/>
   </current>
   <current numThreads="0" outfile="clover_html" title="Data Distribution">
    <format type="html" filter="property,iflogger,logger,LOGGER,hashcode,equals"/>
   </current>
   <current numThreads="0" outfile="clover_html/OfflineCoverage.pdf" title="Data Distribution" summary="true">
    <format type="pdf" filter="property,iflogger,logger,LOGGER,hashcode,equals"/>    
   </current>
   <historical outfile="clover_html" title="Data Distribution" historyDir="clover_hist">
    <format type="html" filter="property,iflogger,logger,LOGGER,hashcode,equals"/>
   </historical>
  </clover-report>
 </target>
 

</project>

你可能感兴趣的:(clover)