Various changes, mostly related to Clover coverage reports.
This commit is contained in:
@@ -1,9 +1,25 @@
|
|||||||
<?xml version="1.0"?>
|
<?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.
|
Build file for the Acegi Security System for Spring.
|
||||||
|
|
||||||
$Id$
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<project name="acegi-security-core" default="usage" basedir=".">
|
<project name="acegi-security-core" default="usage" basedir=".">
|
||||||
@@ -11,6 +27,9 @@
|
|||||||
<property file="build.properties"/>
|
<property file="build.properties"/>
|
||||||
<property file="project.properties"/>
|
<property file="project.properties"/>
|
||||||
|
|
||||||
|
<taskdef resource="clovertasks"/>
|
||||||
|
<typedef resource="clovertypes"/>
|
||||||
|
|
||||||
<path id="qa-portalpath">
|
<path id="qa-portalpath">
|
||||||
<fileset dir="${lib.dir}">
|
<fileset dir="${lib.dir}">
|
||||||
<include name="**/*.jar"/>
|
<include name="**/*.jar"/>
|
||||||
@@ -23,6 +42,7 @@
|
|||||||
</fileset>
|
</fileset>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
|
|
||||||
<target name="usage">
|
<target name="usage">
|
||||||
<echo message=""/>
|
<echo message=""/>
|
||||||
<echo message="${name} build file"/>
|
<echo message="${name} build file"/>
|
||||||
@@ -39,6 +59,7 @@
|
|||||||
<echo message="To build or test, your lib directory needs to be populated"/>
|
<echo message="To build or test, your lib directory needs to be populated"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="clean" description="Clean all output dirs (dist, javadocs, classes, test-classes, etc.)">
|
<target name="clean" description="Clean all output dirs (dist, javadocs, classes, test-classes, etc.)">
|
||||||
|
|
||||||
<delete dir="${dist.dir}"/>
|
<delete dir="${dist.dir}"/>
|
||||||
@@ -49,6 +70,7 @@
|
|||||||
<delete dir="${target.otherclasses.dir}"/>
|
<delete dir="${target.otherclasses.dir}"/>
|
||||||
<delete dir="${target.release.dir}"/>
|
<delete dir="${target.release.dir}"/>
|
||||||
<delete dir="${target.clover.dir}"/>
|
<delete dir="${target.clover.dir}"/>
|
||||||
|
<delete dir="${target.clover.html.dir}"/>
|
||||||
<delete dir="${target.testclasses.dir}"/>
|
<delete dir="${target.testclasses.dir}"/>
|
||||||
|
|
||||||
</target>
|
</target>
|
||||||
@@ -103,6 +125,7 @@
|
|||||||
<ant inheritall="no" antfile="build.xml" dir="integration-test" target="format"/>
|
<ant inheritall="no" antfile="build.xml" dir="integration-test" target="format"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="initdist" description="Initialize the distribution directory">
|
<target name="initdist" description="Initialize the distribution directory">
|
||||||
<mkdir dir="${dist.dir}"/>
|
<mkdir dir="${dist.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
@@ -133,7 +156,7 @@
|
|||||||
<zipfileset dir="${src.dir}/net/sf/acegisecurity/taglibs"
|
<zipfileset dir="${src.dir}/net/sf/acegisecurity/taglibs"
|
||||||
prefix="META-INF" includes="*.tld" />
|
prefix="META-INF" includes="*.tld" />
|
||||||
<manifest>
|
<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"/>
|
<attribute name="Sealed" value="true"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
@@ -220,6 +243,7 @@
|
|||||||
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="srczip" depends="initdist" description="Create source ZIP (containing all Java sources)">
|
<target name="srczip" depends="initdist" description="Create source ZIP (containing all Java sources)">
|
||||||
<delete file="${dist.dir}/${acegi-security-src.zip}"/>
|
<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="alljars" depends="fulljar,srczip" description="Create all JAR files"/>
|
||||||
|
|
||||||
|
|
||||||
<target name="javadoc" description="Generate Javadocs.">
|
<target name="javadoc" description="Generate Javadocs.">
|
||||||
<mkdir dir="${javadocs.dir}"/>
|
<mkdir dir="${javadocs.dir}"/>
|
||||||
|
|
||||||
@@ -249,7 +274,8 @@
|
|||||||
</javadoc>
|
</javadoc>
|
||||||
</target>
|
</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/contacts" target="release"/>
|
||||||
<ant inheritall="no" antfile="build.xml" dir="samples/attributes" target="release"/>
|
<ant inheritall="no" antfile="build.xml" dir="samples/attributes" target="release"/>
|
||||||
|
|
||||||
@@ -297,6 +323,7 @@
|
|||||||
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Compile test cases
|
Compile test cases
|
||||||
-->
|
-->
|
||||||
@@ -352,19 +379,29 @@
|
|||||||
|
|
||||||
</target>
|
</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.dbdir}"/>
|
||||||
|
<mkdir dir="${clover.tmpdir}"/>
|
||||||
|
|
||||||
<!-- switch on Clover by specifying it as the compiler to use -->
|
<!-- switch on Clover -->
|
||||||
<property name="build.compiler" value="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
|
<clover-setup initstring="${clover.dbdir}/${clover.dbfile}"
|
||||||
|
tmpdir="${clover.tmpdir}" enabled="true">
|
||||||
<antcall target="build"/>
|
<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>
|
||||||
|
|
||||||
|
|
||||||
<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
|
Run test suite under Clover coverage analysis, and bring up
|
||||||
@@ -374,10 +411,7 @@
|
|||||||
|
|
||||||
<echo>Launching coverage viewer</echo>
|
<echo>Launching coverage viewer</echo>
|
||||||
|
|
||||||
<java classname="com.cortexeb.tools.clover.reporters.jfc.Viewer" fork="yes">
|
<clover-view/>
|
||||||
<arg value="${clover.initstring}"/>
|
|
||||||
<classpath refid="qa-portalpath"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@@ -388,10 +422,11 @@
|
|||||||
-->
|
-->
|
||||||
<target name="clover.html" depends="clover.tests" description="Generate Clover HTML coverage reports from an existing Clover database">
|
<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">
|
<clover-report>
|
||||||
<arg line="-o '${target.clover.html.dir}' -i '${clover.initstring}' -t 'Acegi Security System for Spring'"/>
|
<current outfile="${target.clover.html.dir}" title="Acegi Security System for Spring" summary="true">
|
||||||
<classpath refid="qa-portalpath"/>
|
<format type="html"/>
|
||||||
</java>
|
</current>
|
||||||
|
</clover-report>
|
||||||
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|||||||
+4
-8
@@ -50,7 +50,7 @@ test.dir=${basedir}/test
|
|||||||
test.includes=**/*TestSuite.class **/*Tests.class
|
test.includes=**/*TestSuite.class **/*Tests.class
|
||||||
|
|
||||||
# Wildcards to exclude among JUnit tests
|
# Wildcards to exclude among JUnit tests
|
||||||
test.excludes=**/Abstract*
|
test.excludes=
|
||||||
|
|
||||||
# Directory where JUnit test reports are written
|
# Directory where JUnit test reports are written
|
||||||
target.junit.reports.dir=${target.dir}/test-reports
|
target.junit.reports.dir=${target.dir}/test-reports
|
||||||
@@ -76,16 +76,12 @@ target.otherclasses.dir=${target.dir}/other-classes
|
|||||||
jalopy.xml=jalopy.xml
|
jalopy.xml=jalopy.xml
|
||||||
|
|
||||||
# Clover properties
|
# 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.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
|
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
|
# docbook reference documentation
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
Reference in New Issue
Block a user