summaryrefslogtreecommitdiffstats
path: root/fop/jacoco.xml
diff options
context:
space:
mode:
authorGlenn Adams <gadams@apache.org>2016-03-06 06:14:41 +0000
committerGlenn Adams <gadams@apache.org>2016-03-06 06:14:41 +0000
commit57949ba0cfffa2dd5933a103c6ad867de9f1e7a0 (patch)
treecd1d8100a9135449635251820f39f272151005ac /fop/jacoco.xml
parentc8cde713f54ca731f4a7f3bfaef8af9e8a1b9262 (diff)
downloadxmlgraphics-fop-57949ba0cfffa2dd5933a103c6ad867de9f1e7a0.tar.gz
xmlgraphics-fop-57949ba0cfffa2dd5933a103c6ad867de9f1e7a0.zip
Configure maven build.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/maven@1733788 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'fop/jacoco.xml')
-rw-r--r--fop/jacoco.xml38
1 files changed, 38 insertions, 0 deletions
diff --git a/fop/jacoco.xml b/fop/jacoco.xml
new file mode 100644
index 000000000..43e5f394b
--- /dev/null
+++ b/fop/jacoco.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<project xmlns:jacoco="antlib:org.jacoco.ant" name="JaCoCo" default="coverage-report">
+ <import file="build.xml"/>
+ <property name="jacoco.report.dir" value="${build.dir}/report_jacoco"/>
+ <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
+ <classpath location="${jacocoant.jar}"/>
+ </taskdef>
+ <target name="test-coverage" depends="junit-compile">
+ <jacoco:coverage destfile="${jacoco.report.dir}/jacoco.exec">
+ <junit dir="${basedir}" haltonfailure="yes" fork="on" forkmode="once">
+ <sysproperty key="jawa.awt.headless" value="true"/>
+ <classpath>
+ <path refid="standard-junit-classpath"/>
+ </classpath>
+ <batchtest>
+ <fileset dir="${build.unit.tests.dir}" includes="**/*TestCase.class"/>
+ </batchtest>
+ </junit>
+ </jacoco:coverage>
+ </target>
+ <target name="coverage-report" depends="test-coverage"
+ description="Runs JaCoCo for a code coverage report">
+ <jacoco:report>
+ <executiondata>
+ <file file="${jacoco.report.dir}/jacoco.exec"/>
+ </executiondata>
+ <structure name="Apache FOP">
+ <classfiles>
+ <fileset dir="${build.classes.dir}"/>
+ </classfiles>
+ <sourcefiles>
+ <fileset dir="${src.java.dir}"/>
+ </sourcefiles>
+ </structure>
+ <html destdir="${jacoco.report.dir}"/>
+ </jacoco:report>
+ </target>
+</project>