聞喘Ant+JUnit+Cobertura栖糞?旗鷹顕固徭強霞編
扮寂:2011-02-05
<?xml version=''1.0'' encoding="UTF-8" ?>
<project name="Server" default="coverage" basedir=".">
<!-- where the project source code is found -->
<property name="src.dir" value="./src/" />
<!-- where compiled class files should be left -->
<property name="classes.dir" value="./bin/" />
<!-- The path to cobertura.jar -->
<property name="cobertura.dir" value="./cobertura-1.9/" />
<!-- All reports go into this directory -->
<property name="reports.dir" value="reports" />
<!-- Instrumented classes are deposited into this directory -->
<property name="instrumented.dir" value="instrumented" />
<!-- Unit test reports from JUnit are deposited into this directory -->
<property name="reports.xml.dir" value="${reports.dir}/junit-xml" />
<property name="reports.html.dir" value="${reports.dir}/junit-html" />
<!-- Coverage reports are deposited into these directories -->
<property name="coverage.xml.dir" value="${reports.dir}/cobertura-xml" />
<property name="coverage.html.dir" value="${reports.dir}/cobertura-html" />
<path id="classpath">
<fileset dir="./lib/" includes="**/*.jar" />
</path>
<path id="cobertura.classpath">
<fileset dir="${cobertura.dir}">
<include name="cobertura.jar" />
<include name="lib/**/*.jar" />
</fileset>
</path>
<taskdef classpathref="cobertura.classpath" resource="tasks.properties"/>
<target name="init" depends="clean">
<mkdir dir="${classes.dir}" />
<mkdir dir="${instrumented.dir}" />
<mkdir dir="${reports.xml.dir}" />
<mkdir dir="${reports.html.dir}" />
<mkdir dir="${coverage.xml.dir}" />
<mkdir dir="${coverage.html.dir}" />
</target>
<target name="compile" depends="init" description="compile classes">
<javac destdir="${classes.dir}" srcdir="${src.dir}" debug="yes"><!--壓宸戦 debug="yes"-->
<classpath>
<path refid="classpath" />
</classpath>
</javac>
</target>
<target name="jar" depends="compile" description="build release jar">
<jar destf
|