Pulled junit taskdef into the macro to prevent non-junit builds from
failing.
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@105 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/common.ant.xml b/common.ant.xml
index 2e88fb0..b7ce837 100755
--- a/common.ant.xml
+++ b/common.ant.xml
@@ -47,26 +47,26 @@
<property name="javac.source" value="1.4" />
<property name="javac.nowarn" value="true" />
<property name="junit.out" location="${project.build}/test" />
-
- <property name="gwt.dev.staging.jar" location="${gwt.build.staging}/gwt-${build.host.platform}-${gwt.version}/gwt-dev-${build.host.platform}.jar"/>
- <property name="gwt.junit.port" value="8888"/>
-
+
+ <property name="gwt.dev.staging.jar" location="${gwt.build.staging}/gwt-${build.host.platform}-${gwt.version}/gwt-dev-${build.host.platform}.jar" />
+ <property name="gwt.junit.port" value="8888" />
+
<!--
Comma delimited list of host and path components on which to run remote browser testing.
-->
- <property name="gwt.remote.browsers" value=""/>
-
+ <property name="gwt.remote.browsers" value="" />
+
<!-- Sanity check -->
<available file="${gwt.tools}" type="dir" property="gwt.tools.exists" />
<fail unless="gwt.tools.exists" message="Cannot find '${gwt.tools}' tools directory; perhaps you should define the GWT_TOOLS environment variable" />
<!-- Pulls in tasks defined in ant-contrib, i.e. foreach -->
<taskdef resource="net/sf/antcontrib/antlib.xml">
- <classpath>
- <pathelement location="${gwt.tools.antlib}/ant-contrib-1.0b3.jar"/>
- </classpath>
+ <classpath>
+ <pathelement location="${gwt.tools.antlib}/ant-contrib-1.0b3.jar" />
+ </classpath>
</taskdef>
-
+
<!-- Global Custom Tasks -->
<presetdef name="gwt.ant">
<ant inheritall="false" target="${target}">
@@ -85,27 +85,26 @@
<presetdef name="gwt.jar">
<jar destfile="${project.lib}" update="true" duplicate="preserve" index="true" />
</presetdef>
-
- <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
- <classpath>
- <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
- <pathelement location="${gwt.tools.antlib}/ant-junit-1.6.5.jar" />
- </classpath>
- </taskdef>
-
+
<macrodef name="gwt.junit">
<attribute name="test.args" default="" />
<attribute name="test.out" default="" />
<attribute name="test.reports" default="@{test.out}/reports" />
<attribute name="test.cases" default="" />
-
- <sequential>
+ <sequential>
+ <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
+ <classpath>
+ <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
+ <pathelement location="${gwt.tools.antlib}/ant-junit-1.6.5.jar" />
+ </classpath>
+ </taskdef>
+
<echo message="Writing test results to @{test.reports} for @{test.cases}" />
- <mkdir dir="@{test.reports}"/>
+ <mkdir dir="@{test.reports}" />
- <echo message="${javac.out} ${javac.junit.out}"/>
+ <echo message="${javac.out} ${javac.junit.out}" />
<junit dir="@{test.out}" fork="yes" printsummary="yes" haltonfailure="true">
- <sysproperty key="gwt.args" value="@{test.args}"/>
+ <sysproperty key="gwt.args" value="@{test.args}" />
<sysproperty key="gwt.devjar" value="${gwt.dev.staging.jar}" />
<sysproperty key="java.awt.headless" value="true" />