<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Copyright (c) 2009, 2011 Mountainminds GmbH & Co. KG and Contributors | |
All rights reserved. This program and the accompanying materials | |
are made available under the terms of the Eclipse Public License v1.0 | |
which accompanies this distribution, and is available at | |
http://www.eclipse.org/legal/epl-v10.html | |
Contributors: | |
Marc R. Hoffmann - initial API and implementation | |
$Id: $ | |
--> | |
<project name="org.jacoco.doc.buildhook" xmlns:jacoco="antlib:org.jacoco.ant"> | |
<property name="do.customverify" value="true"/> | |
<property name="do.customdoc" value="true"/> | |
<target name="customverify"> | |
<!-- Test Report --> | |
<mkdir dir="${result.dist.test.dir}"/> | |
<junitreport todir="${result.dist.test.dir}"> | |
<fileset dir="${result.tmp.dir}" includes="*/test/*.xml"/> | |
<report format="noframes" styledir="${source.bundle.dir}/junitstyle" todir="${result.dist.test.dir}"> | |
<param name="qualified.bundle.version" expression="${qualified.bundle.version}"/> | |
<param name="jacoco.home.url" expression="${jacoco.home.url}"/> | |
<param name="copyright.years" expression="${copyright.years}"/> | |
</report> | |
</junitreport> | |
<move file="${result.dist.test.dir}/junit-noframes.html" | |
tofile="${result.dist.test.dir}/index.html"/> | |
<!-- Coverage Report --> | |
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml"> | |
<classpath> | |
<file file="${result.dist.lib.dir}/jacocoant.jar"/> | |
</classpath> | |
</taskdef> | |
<mkdir dir="${result.dist.coverage.dir}"/> | |
<jacoco:report> | |
<executiondata> | |
<fileset dir="${result.tmp.dir}" includes="*/test/jacoco.exec"/> | |
</executiondata> | |
<structure name="JaCoCo"> | |
<group name="org.jacoco.agent"> | |
<classfiles> | |
<!-- Process class files only, ignore jacocoagent.jar --> | |
<fileset dir="${toString:bundle-org.jacoco.agent}" includes="**/*.class"/> | |
</classfiles> | |
<sourcefiles> | |
<fileset dir="${source.org.jacoco.agent.dir}/src"/> | |
</sourcefiles> | |
</group> | |
<group name="org.jacoco.agent.rt"> | |
<classfiles> | |
<path refid="bundle-org.jacoco.agent.rt"/> | |
</classfiles> | |
<sourcefiles> | |
<fileset dir="${source.org.jacoco.agent.rt.dir}/src"/> | |
</sourcefiles> | |
</group> | |
<group name="org.jacoco.ant"> | |
<classfiles> | |
<path refid="bundle-org.jacoco.ant"/> | |
</classfiles> | |
<sourcefiles> | |
<fileset dir="${source.org.jacoco.ant.dir}/src"/> | |
</sourcefiles> | |
</group> | |
<group name="org.jacoco.core"> | |
<classfiles> | |
<path refid="bundle-org.jacoco.core"/> | |
</classfiles> | |
<sourcefiles> | |
<fileset dir="${source.org.jacoco.core.dir}/src"/> | |
</sourcefiles> | |
</group> | |
<group name="org.jacoco.report"> | |
<classfiles> | |
<path refid="bundle-org.jacoco.report"/> | |
</classfiles> | |
<sourcefiles> | |
<fileset dir="${source.org.jacoco.report.dir}/src"/> | |
</sourcefiles> | |
</group> | |
</structure> | |
<html destdir="${result.dist.coverage.dir}" | |
footer="Code Coverage Report for JaCoCo ${qualified.bundle.version}" | |
locale="en"/> | |
<csv destfile="${result.dist.coverage.dir}/coverage.csv"/> | |
<xml destfile="${result.dist.coverage.dir}/coverage.xml"/> | |
</jacoco:report> | |
<copy todir="${result.dist.coverage.dir}"> | |
<fileset dir="${source.org.jacoco.report.dir}/src/org/jacoco/report/xml" includes="report.dtd"/> | |
</copy> | |
</target> | |
<target name="customdoc"> | |
<javadoc destdir="${result.dist.dir}/doc/api" | |
windowtitle="JaCoCo ${qualified.bundle.version}" | |
overview="${source.bundle.dir}/javadoc/overview.html" | |
stylesheetfile="${source.bundle.dir}/javadoc/stylesheet.css"> | |
<classpath> | |
<path refid="bundle-org.objectweb.asm"/> | |
</classpath> | |
<link href="http://download.oracle.com/javase/1.5.0/docs/api" offline="true" packagelistloc="${source.bundle.dir}/javadoc/java"/> | |
<link href="http://asm.ow2.org/asm32/javadoc/user" offline="true" packagelistloc="${source.bundle.dir}/javadoc/asm"/> | |
<bottom> | |
<div class="footer"> | |
<span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span> | |
Copyright © ${copyright.years} Mountainminds GmbH & Co. KG and Contributors | |
</div> | |
</bottom> | |
<packageset dir="${source.org.jacoco.agent.dir}/src" excludes="**/internal/**"/> | |
<group title="Bundle org.jacoco.core" packages="org.jacoco.core*"/> | |
<packageset dir="${source.org.jacoco.core.dir}/src" excludes="**/internal/**"/> | |
<group title="Bundle org.jacoco.agent" packages="org.jacoco.agent*"/> | |
<packageset dir="${source.org.jacoco.report.dir}/src" excludes="**/internal/**"/> | |
<group title="Bundle org.jacoco.report" packages="org.jacoco.report*"/> | |
</javadoc> | |
<copy todir="${result.dist.dir}"> | |
<fileset dir="${source.bundle.dir}/docroot" includes="**/*" excludes="**/*.html"/> | |
</copy> | |
<copy todir="${result.dist.dir}/doc"> | |
<fileset dir="${source.org.jacoco.report.dir}/src/org/jacoco/report/xml" includes="report.dtd"/> | |
</copy> | |
<copy todir="${result.dist.dir}/doc/examples/java"> | |
<fileset dir="${source.org.jacoco.examples.dir}/src/org/jacoco/examples" includes="*.java"/> | |
</copy> | |
<copy todir="${result.dist.dir}/doc/examples/ant"> | |
<fileset dir="${source.org.jacoco.examples.dir}/ant" includes="build.xml,**/*.java"/> | |
</copy> | |
<copy todir="${result.dist.dir}"> | |
<fileset dir="${source.bundle.dir}/docroot" includes="**/*.html"/> | |
<filterset> | |
<filter token="build.date" value="${build.date}"/> | |
<filter token="qualified.bundle.version" value="${qualified.bundle.version}"/> | |
<filter token="jacoco.home.url" value="${jacoco.home.url}"/> | |
<filter token="copyright.years" value="${copyright.years}"/> | |
</filterset> | |
</copy> | |
</target> | |
</project> |