Various changes, mostly related to Clover coverage reports.

This commit is contained in:
Ben Alex 2004-03-28 11:28:00 +00:00
parent 57fd086f09
commit 91432bc78b
2 changed files with 57 additions and 26 deletions

View File

@ -1,9 +1,25 @@
<?xml version="1.0"?>
<!--
* Copyright 2004 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
* $Id$
-->
<!--
Build file for the Acegi Security System for Spring.
$Id$
-->
<project name="acegi-security-core" default="usage" basedir=".">
@ -11,6 +27,9 @@
<property file="build.properties"/>
<property file="project.properties"/>
<taskdef resource="clovertasks"/>
<typedef resource="clovertypes"/>
<path id="qa-portalpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
@ -23,6 +42,7 @@
</fileset>
</path>
<target name="usage">
<echo message=""/>
<echo message="${name} build file"/>
@ -39,6 +59,7 @@
<echo message="To build or test, your lib directory needs to be populated"/>
</target>
<target name="clean" description="Clean all output dirs (dist, javadocs, classes, test-classes, etc.)">
<delete dir="${dist.dir}"/>
@ -49,6 +70,7 @@
<delete dir="${target.otherclasses.dir}"/>
<delete dir="${target.release.dir}"/>
<delete dir="${target.clover.dir}"/>
<delete dir="${target.clover.html.dir}"/>
<delete dir="${target.testclasses.dir}"/>
</target>
@ -103,6 +125,7 @@
<ant inheritall="no" antfile="build.xml" dir="integration-test" target="format"/>
</target>
<target name="initdist" description="Initialize the distribution directory">
<mkdir dir="${dist.dir}"/>
</target>
@ -133,7 +156,7 @@
<zipfileset dir="${src.dir}/net/sf/acegisecurity/taglibs"
prefix="META-INF" includes="*.tld" />
<manifest>
<attribute name="Acegi-Security-Taglib-version" value="${acegi-security-version}"/>
<attribute name="Acegi-Security-System-version" value="${acegi-security-version}"/>
<attribute name="Sealed" value="true"/>
</manifest>
</jar>
@ -220,6 +243,7 @@
</target>
<target name="srczip" depends="initdist" description="Create source ZIP (containing all Java sources)">
<delete file="${dist.dir}/${acegi-security-src.zip}"/>
@ -234,6 +258,7 @@
<target name="alljars" depends="fulljar,srczip" description="Create all JAR files"/>
<target name="javadoc" description="Generate Javadocs.">
<mkdir dir="${javadocs.dir}"/>
@ -249,7 +274,8 @@
</javadoc>
</target>
<target name="release" depends="clean,alljars,format,tests,javadoc,refdoc" description="Generate release zip file">
<target name="release" depends="clean,alljars,tests,javadoc,refdoc" description="Generate release zip file">
<ant inheritall="no" antfile="build.xml" dir="samples/contacts" target="release"/>
<ant inheritall="no" antfile="build.xml" dir="samples/attributes" target="release"/>
@ -297,6 +323,7 @@
</target>
<!--
Compile test cases
-->
@ -352,19 +379,29 @@
</target>
<target name="clover.build" description="Compile main source tree java files WITH CLOVER into class files">
<target name="clover.setup" description="Setup Clover">
<mkdir dir="${clover.dbdir}"/>
<mkdir dir="${clover.tmpdir}"/>
<!-- switch on Clover by specifying it as the compiler to use -->
<property name="build.compiler" value="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
<antcall target="build"/>
<!-- switch on Clover -->
<clover-setup initstring="${clover.dbdir}/${clover.dbfile}"
tmpdir="${clover.tmpdir}" enabled="true">
<files>
<exclude name="**/*Exception.java"/>
<exclude name="**/*Tests.java"/>
<exclude name="**/DenyVoter.java"/>
<exclude name="**/DenyAgainVoter.java"/>
<exclude name="**/*TargetObject.java"/>
<exclude name="**/Mock*.java"/>
</files>
</clover-setup>
</target>
<target name="clover.tests" depends="clover.build,buildtests,tests" description="Run Clover tests"/>
<target name="clover.tests" depends="clover.setup,build,buildtests,tests" description="Run Clover tests"/>
<!--
Run test suite under Clover coverage analysis, and bring up
@ -374,10 +411,7 @@
<echo>Launching coverage viewer</echo>
<java classname="com.cortexeb.tools.clover.reporters.jfc.Viewer" fork="yes">
<arg value="${clover.initstring}"/>
<classpath refid="qa-portalpath"/>
</java>
<clover-view/>
</target>
@ -388,10 +422,11 @@
-->
<target name="clover.html" depends="clover.tests" description="Generate Clover HTML coverage reports from an existing Clover database">
<java classname="com.cortexeb.tools.clover.reporters.html.HtmlReporter" fork="yes">
<arg line="-o '${target.clover.html.dir}' -i '${clover.initstring}' -t 'Acegi Security System for Spring'"/>
<classpath refid="qa-portalpath"/>
</java>
<clover-report>
<current outfile="${target.clover.html.dir}" title="Acegi Security System for Spring" summary="true">
<format type="html"/>
</current>
</clover-report>
</target>

View File

@ -50,7 +50,7 @@ test.dir=${basedir}/test
test.includes=**/*TestSuite.class **/*Tests.class
# Wildcards to exclude among JUnit tests
test.excludes=**/Abstract*
test.excludes=
# Directory where JUnit test reports are written
target.junit.reports.dir=${target.dir}/test-reports
@ -76,16 +76,12 @@ target.otherclasses.dir=${target.dir}/other-classes
jalopy.xml=jalopy.xml
# Clover properties
clover.dbdir=${target.dir}/clover
target.clover.dir=${target.dir}/clover
clover.dbdir=${target.clover.dir}/db
clover.dbfile=acegi_security_coverage.db
clover.initstring=${clover.dbdir}/${clover.dbfile}
clover.tmpdir=${target.clover.dir}/tmp
target.clover.html.dir=${target.dir}/clover-reports
# Global property to exclude selected classes from Clover instrumentation.
# Typically we'll use this to exclude experimental packages from coverage
# analysis, or classes that are intended to support development.
clover.excludes=**/*Exception.java:**/*Tests.java
# ------------------------------------------------------------------------
# docbook reference documentation
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -