|
Cobertura example source code file (build.xml)
The Cobertura build.xml source code
<?xml version="1.0" encoding="UTF-8"?>
<project name="cobertura.examples.functionaltest1" basedir="." default="help" xmlns:cobertura="antlib:net.sourceforge.cobertura.ant">
<description>
Cobertura - http://cobertura.sourceforge.net/
Copyright (C) 2003 jcoverage ltd.
Copyright (C) 2005 Mark Doliner
Copyright (C) 2006 John Lewis
Cobertura is licensed under the GNU General Public License
Cobertura comes with ABSOLUTELY NO WARRANTY
</description>
<!-- Import the Cobertura Ant Library -->
<property name="cobertura.local.library" location="../../antLibrary" />
<import file="${cobertura.local.library}/library.xml" />
<property file="build.properties" />
<path id="project.classpath">
<path path="${java.class.path}" />
<!--
The next two should only come into play when running this script directly as
opposed to being called by a functional test.
-->
<pathelement location="../../etc" />
<pathelement location="../../build/classes" />
<pathelement location="../../src" />
<fileset dir="../../lib">
<include name="*.jar" />
</fileset>
</path>
<target name="taskdef">
<taskdef resource="tasks.properties" classpathref="project.classpath" />
</target>
<target name="taskdef-antlib">
<taskdef
classpathref="project.classpath"
resource="net/sourceforge/cobertura/ant/antlib.xml"
uri="antlib:net.sourceforge.cobertura.ant" />
</target>
<target name="help">
<echo>This example is only used for testing, and is not meant
<echo>to be run from the command line. It requires certain
<echo>classes to be on the class path to work correctly.
</target>
<target name="compile">
<mkdir dir="${classes.dir}" />
<javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" classpathref="project.classpath" />
<rmic
base="${classes.dir}"
classpathref="project.classpath"
stubversion="1.2"
includes="test/first/RemoteListener.class"
debug="lines,source"
verify="true"
/>
</target>
<target name="instrument-includes-and-excludes" depends="compile,cobertura-groovy-init">
<mkdir dir="${instrumented.dir}" />
<cobertura:groovy>
<path id="test.classpath">
<path location="${instrumented.dir}" />
</path>
</target>
<target name="instrument-classpath" depends="compile,cobertura-groovy-init">
<mkdir dir="${instrumented.dir}" />
<cobertura:groovy>
<path id="test.classpath">
<path location="${instrumented.dir}" />
</path>
</target>
<target name="instrument-war" depends="compile,cobertura-groovy-init">
<property name="tmp" value="tmp" />
<property name="tmp.dir" value="${basedir}/${tmp}" />
<property name="this.test.work.dir" location="${tmp.dir}/war" />
<property name="this.test.wars" location="${tmp.dir}/wars" />
<property name="this.test.extract" location="${tmp.dir}/extract" />
<delete dir="${tmp.dir}" />
<mkdir dir="${tmp.dir}" />
<!-- Make a jar with a class from each package -->
<zip destfile="${tmp.dir}/app.jar">
<fileset dir="${classes.dir}">
<include name="test/first/A.class" />
<include name="test/second/B.class" />
<include name="test/first/RemoteListener*.class" />
</fileset>
</zip>
<!-- TODO:
Other Cobertura examples (source code examples)Here is a short list of links related to this Cobertura build.xml source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.