| <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| <!-- |
| Copyright (c) 2012 Original authors 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: |
| Original authors and others - initial API and implementation |
| --> |
| |
| <!-- |
| Top level Ant build file for NatTable |
| |
| The following properties must be present in ${user.home} directory. Alternatively they can |
| be specified on the command line (-DECLIPSE_HOME="dir"): |
| ECLIPSE_HOME: Location of eclipse install. SWT and other eclipse deps are picked up from the plugins dir |
| FINDBUGS_HOME: Location of the findbugs install. |
| |
| Also see: common.xml |
| --> |
| <project> |
| |
| <property name="build.tools.dir" value="deps/tools" /> |
| <property name="reports.dir" value="reports" /> |
| <property name="coverage.reports.dir" value="${reports.dir}/coverage" /> |
| |
| <!-- Setup emma task --> |
| <path id="emma.lib"> |
| <pathelement location="${build.tools.dir}/emma.jar" /> |
| <pathelement location="${build.tools.dir}/emma_ant.jar" /> |
| </path> |
| <taskdef resource="emma_ant.properties" classpathref="emma.lib" /> |
| |
| <!-- Setup findbugs (static analysis) task --> |
| <property name="FINDBUGS_HOME" value="${user.home}/findbugs-1.3.9" /> |
| <path id="findbugs.lib" location="${FINDBUGS_HOME}/lib/findbugs-ant.jar" /> |
| <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs.lib"/> |
| |
| <!-- |
| Macro to run targets on all subprojects. The order of the build is important. |
| Dependencies must be built first. |
| Subprojects supply their own properties (in their repective build.xml files) |
| to tweak aspects of the build |
| --> |
| <macrodef name="iterate"> |
| <attribute name="target" /> |
| <sequential> |
| <subant target="@{target}"> |
| <fileset file="org.eclipse.nebula.widgets.nattable.core/build.xml" /> |
| </subant> |
| <subant target="@{target}"> |
| <fileset file="org.eclipse.nebula.widgets.nattable.core.test/build.xml" /> |
| </subant> |
| <subant target="@{target}"> |
| <fileset file="org.eclipse.nebula.widgets.nattable.extension.glazedlists/build.xml"/> |
| </subant> |
| <subant target="@{target}"> |
| <fileset file="org.eclipse.nebula.widgets.nattable.extension.glazedlists.test/build.xml"/> |
| </subant> |
| <subant target="@{target}"> |
| <fileset file="org.eclipse.nebula.widgets.nattable.dataset/build.xml"/> |
| </subant> |
| <subant target="@{target}"> |
| <fileset file="org.eclipse.nebula.widgets.nattable.extension.builder/build.xml"/> |
| </subant> |
| <subant target="@{target}"> |
| <fileset file="org.eclipse.nebula.widgets.nattable.examples/build.xml"/> |
| </subant> |
| </sequential> |
| </macrodef> |
| |
| <target name="clean"> |
| <iterate target="clean" /> |
| <delete dir="${reports.dir}" /> |
| </target> |
| |
| <!-- Compiles and build jars --> |
| <target name="build"> |
| <iterate target="build" /> |
| </target> |
| |
| <!-- Runs unit tests. |
| Triggers report generation for JUnit and Emma |
| Triggers findbugs for static analysis |
| --> |
| <target name="test"> |
| <iterate target="test" /> |
| <antcall target="coverage.report"/> |
| </target> |
| |
| <!-- |
| Emma coverage report. Invoked at the end of the test run. |
| Note: This must be run at the top level, since it needs to aggregate test |
| coverage data. |
| --> |
| <target name="coverage.report"> |
| <mkdir dir="${coverage.reports.dir}" /> |
| <emma> |
| <report encoding="UTF-8"> |
| <sourcepath> |
| <dirset dir="${basedir}"> |
| <include name="**/src" /> |
| </dirset> |
| </sourcepath> |
| <fileset dir="${basedir}"> |
| <include name="**/*.emma" /> |
| </fileset> |
| <xml outfile="${coverage.reports.dir}/coverage.xml" depth="method" /> |
| <html outfile="${coverage.reports.dir}/coverage.html" |
| columns="name,line,method,class" |
| sort="+class, +line" |
| depth="method" /> |
| </report> |
| </emma> |
| </target> |
| |
| |
| </project> |