| <project name="dev-oophm" default="build" basedir="."> |
| <property name="gwt.root" location="../.." /> |
| <property name="project.tail" value="dev/oophm" /> |
| <import file="${gwt.root}/common.ant.xml" /> |
| |
| <property.ensure name="gwt.core.root" location="../core" /> |
| <property.ensure name="gwt.core.build" location="${project.build}/../core" /> |
| |
| <fileset id="default.tests" dir="${javac.junit.out}"> |
| <include name="**/com/google/**/*Test.class" /> |
| </fileset> |
| |
| <target name="compile.tests" depends="build" description="Compiles the test code for this project"> |
| <mkdir dir="${javac.junit.out}" /> |
| <gwt.javac srcdir="test" destdir="${javac.junit.out}"> |
| <classpath> |
| <pathelement location="${javac.out}" /> |
| <pathelement location="${gwt.core.build}/bin" /> |
| <pathelement location="${gwt.core.build}/bin-tests" /> |
| <pathelement location="${alldeps.jar}" /> |
| <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> |
| </classpath> |
| </gwt.javac> |
| </target> |
| |
| <target name="compile" description="Compile all java files"> |
| <mkdir dir="${javac.out}" /> |
| <gwt.javac> |
| <src path="overlay" /> |
| <classpath> |
| <pathelement location="${gwt.tools.lib}/sun/swingworker/swing-worker-1.1.jar" /> |
| <pathelement location="${gwt.core.build}/bin" /> |
| <pathelement location="${gwt.tools.lib}/htmlunit/htmlunit-2.5.jar" /> |
| <pathelement location="${gwt.tools.lib}/htmlunit/htmlunit-core-js-2.5.jar" /> |
| </classpath> |
| </gwt.javac> |
| </target> |
| |
| <target name="build" depends="compile" description="Build and package this project"> |
| <mkdir dir="${gwt.build.lib}" /> |
| <gwt.jar> |
| <fileset dir="src" excludes="**/package.html"/> |
| <fileset dir="overlay" excludes="**/package.html"/> |
| <fileset dir="${javac.out}" /> |
| <zipfileset src="${gwt.tools.lib}/sun/swingworker/swing-worker-1.1.jar" /> |
| <manifest> |
| <attribute name="Main-Class" value="com.google.gwt.dev.GWTMain" /> |
| </manifest> |
| </gwt.jar> |
| </target> |
| |
| <target name="clean" description="Cleans this project's intermediate and output files"> |
| <delete dir="${project.build}" failonerror="false" /> |
| <delete file="${project.lib}" failonerror="false" /> |
| </target> |
| |
| <target name="test" depends="build, compile.tests" description="Run unit tests for this project."> |
| <!-- TODO: refactor gwt.junit so it can be reused here --> |
| <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 ${junit.out}/reports for ${test.cases}" /> |
| <mkdir dir="${junit.out}/reports" /> |
| |
| <echo message="${javac.out} ${javac.junit.out}" /> |
| <junit dir="${junit.out}" fork="yes" printsummary="yes" haltonfailure="true"> |
| <classpath> |
| <pathelement location="test" /> |
| <pathelement location="${javac.junit.out}" /> |
| <pathelement location="${javac.out}" /> |
| <pathelement location="${gwt.core.build}/bin" /> |
| <pathelement location="${gwt.core.build}/bin-tests" /> |
| <pathelement location="${alldeps.jar}" /> |
| <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> |
| <!-- Pull in gwt-dev and gwt-user sources for .gwt.xml files --> |
| <pathelement location="${gwt.root}/user/src/" /> |
| <pathelement location="${gwt.root}/user/super/" /> |
| <pathelement location="${gwt.root}/dev/core/super" /> |
| </classpath> |
| |
| <formatter type="plain" /> |
| <formatter type="xml" /> |
| |
| <batchtest todir="${junit.out}/reports"> |
| <fileset refid="default.tests" /> |
| </batchtest> |
| </junit> |
| </target> |
| |
| </project> |