<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Copyright (c) 2009 Mountainminds GmbH & Co. KG and others | |
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.build.all" default="rebuild" basedir="."> | |
<description> | |
This is the main build file for the JaCoCo build. | |
</description> | |
<import file="target.xml"/> | |
<property name="workspace.dir" location=".."/> | |
<property name="result.dir" location="./result"/> | |
<property name="result.dist.dir" location="${result.dir}/dist"/> | |
<property name="result.dist.lib.dir" location="${result.dist.dir}/lib"/> | |
<property name="result.dist.doc.dir" location="${result.dist.dir}/doc"/> | |
<property name="result.dist.test.dir" location="${result.dist.dir}/test"/> | |
<property name="result.dist.coverage.dir" location="${result.dist.dir}/coverage"/> | |
<property name="result.tmp.dir" location="${result.dir}/tmp"/> | |
<property name="result.tmp.coverage.file" location="${result.tmp.dir}/jacoco.exec"/> | |
<property name="jacoco.home.url" value="http://www.eclemma.org/jacoco"/> | |
<tstamp> | |
<format property="build.qualifier" pattern="yyyyMMddHHmmss" timezone="GMT+0"/> | |
</tstamp> | |
<macrodef name="runbundlebuild"> | |
<attribute name="bundleid"/> | |
<attribute name="target"/> | |
<sequential> | |
<echo level="info">Building @{bundleid} (@{target})</echo> | |
<ant antfile="buildbundle.xml" target="@{target}" inheritall="true" inheritrefs="true"> | |
<property name="source.bundle.dir" location="${workspace.dir}/@{bundleid}"/> | |
<property name="result.tmp.bundle.dir" location="${result.tmp.dir}/@{bundleid}"/> | |
<property name="result.dist.doc.bundle.dir" location="${result.dist.doc.dir}/@{bundleid}"/> | |
<property name="jacoco.home.url" value="${jacoco.home.url}"/> | |
</ant> | |
<path id="bundle-@{bundleid}" location="${result.tmp.dir}/@{bundleid}/classes"/> | |
<property name="source.@{bundleid}.dir" location="${workspace.dir}/@{bundleid}"/> | |
</sequential> | |
</macrodef> | |
<macrodef name="runallbundlebuilds"> | |
<attribute name="target"/> | |
<sequential> | |
<!-- Build tools --> | |
<runbundlebuild bundleid="org.jacoco.build" target="@{target}"/> | |
<!-- Implementation --> | |
<runbundlebuild bundleid="org.jacoco.core" target="@{target}"/> | |
<runbundlebuild bundleid="org.jacoco.agent.rt" target="@{target}"/> | |
<runbundlebuild bundleid="org.jacoco.agent" target="@{target}"/> | |
<runbundlebuild bundleid="org.jacoco.report" target="@{target}"/> | |
<runbundlebuild bundleid="org.jacoco.ant" target="@{target}"/> | |
<!-- Tests --> | |
<runbundlebuild bundleid="org.jacoco.core.test" target="@{target}"/> | |
<runbundlebuild bundleid="org.jacoco.agent.rt.test" target="@{target}"/> | |
<runbundlebuild bundleid="org.jacoco.report.test" target="@{target}"/> | |
<runbundlebuild bundleid="org.jacoco.ant.test" target="@{target}"/> | |
<!-- Documentation --> | |
<runbundlebuild bundleid="org.jacoco.doc" target="@{target}"/> | |
</sequential> | |
</macrodef> | |
<target name="clean"> | |
<delete dir="${result.dir}" quiet="false" failonerror="true"/> | |
</target> | |
<target name="compile"> | |
<runallbundlebuilds target="compile"/> | |
</target> | |
<target name="package"> | |
<runallbundlebuilds target="package"/> | |
</target> | |
<target name="verify"> | |
<runallbundlebuilds target="verify"/> | |
</target> | |
<target name="doc"> | |
<runallbundlebuilds target="doc"/> | |
</target> | |
<target name="build"> | |
<runallbundlebuilds target="build"/> | |
</target> | |
<target name="rebuild" depends="clean,build"/> | |
<target name="deliver" depends="rebuild"> | |
<property prefix="core.manifest." file="${result.tmp.dir}/org.jacoco.core/MANIFEST.MF"/> | |
<property name="result.zip.file" location="${result.dir}/jacoco-${core.manifest.Bundle-Version}.zip"/> | |
<zip destfile="${result.zip.file}" level="9"> | |
<fileset dir="${result.dist.dir}" includes="**/*"/> | |
</zip> | |
<checksum file="${result.zip.file}" format="MD5SUM"/> | |
</target> | |
</project> |