| <project name="benchmark-viewer" default="build" basedir="."> | 
 |  | 
 |         <!-- | 
 |           TODO(tobyr)  | 
 |  | 
 |           Once we have more than a single tool, this build should be re-examined | 
 |           to see if several of the targets should be lifted into common.ant.xml. | 
 |           The simple targets, like tests*, clean, and checkstyle are good | 
 |           candidates, while the other targets depend heavily on the actual | 
 |           makeup of the future tools. | 
 |         --> | 
 |  | 
 |         <property name="gwt.root" location="../.." /> | 
 |   <property name="project.tail" value="tools/benchmark-viewer" /> | 
 |   <import file="${gwt.root}/common.ant.xml" /> | 
 |  | 
 |         <property name="tools.build" value="${gwt.build.out}/${project.tail}" /> | 
 |         <property name="tools.module" value="com.google.gwt.benchmarks.viewer.ReportViewer" /> | 
 |         <property name="tools.module.path" value="com/google/gwt/benchmarks/viewer/public" /> | 
 |  | 
 |   <!-- | 
 |     Default hosted mode test cases | 
 |   --> | 
 |   <fileset id="default.hosted.tests" dir="${javac.junit.out}"> | 
 |     <include name="**/*Test.class" /> | 
 |   </fileset> | 
 |  | 
 |   <!-- | 
 |     Default web mode test cases | 
 |   --> | 
 |   <fileset id="default.web.tests" dir="${javac.junit.out}"> | 
 |     <include name="**/*Test.class" /> | 
 |   </fileset> | 
 |  | 
 |   <!-- Platform shouldn't matter here, just picking one --> | 
 |   <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev-linux.jar" /> | 
 |   <property.ensure name="gwt.user.jar" location="${gwt.build.lib}/gwt-user.jar" /> | 
 |  | 
 |   <target name="compile" description="Compile all class files"> | 
 |     <mkdir dir="${javac.out}" /> | 
 |     <gwt.javac> | 
 |       <classpath> | 
 |         <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.4.jar" /> | 
 |         <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> | 
 |         <pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" /> | 
 |         <pathelement location="${gwt.tools.lib}/jfreechart/jcommon-1.0.6.jar" /> | 
 |         <pathelement location="${gwt.dev.jar}" /> | 
 |         <pathelement location="${gwt.user.jar}" /> | 
 |       </classpath> | 
 |     </gwt.javac> | 
 |   </target> | 
 |  | 
 |   <target name="compile.tests" 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.tools.lib}/junit/junit-3.8.1.jar" /> | 
 |         <pathelement location="${gwt.dev.staging.jar}" /> | 
 |       </classpath> | 
 |     </gwt.javac> | 
 |   </target> | 
 |  | 
 |   <target name="build" depends="compile, gwtc" description="Build and package this project"> | 
 |     <mkdir dir="${gwt.build.lib}" /> | 
 |                 <copy todir="${tools.build}/www-new/${tools.module.path}" flatten="true" > | 
 |                   <fileset dir="${tools.build}/www/${tools.module}" /> | 
 |                 </copy> | 
 |                      | 
 |     <gwt.jar> | 
 |       <fileset dir="src" excludes="**/package.html" /> | 
 |       <fileset dir="${javac.out}" /> | 
 |                         <fileset dir="${tools.build}/www-new" /> | 
 |                         <zipfileset src="${gwt.tools.lib}/jfreechart/itext-1.4.6.jar"/> | 
 |                         <zipfileset src="${gwt.tools.lib}/jfreechart/jcommon-1.0.6.jar"/> | 
 |                         <zipfileset src="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar"/> | 
 |     </gwt.jar> | 
 |   </target> | 
 |  | 
 |   <target name="checkstyle" description="Static analysis of source"> | 
 |     <gwt.checkstyle> | 
 |       <fileset dir="src"/> | 
 |     </gwt.checkstyle> | 
 |   </target> | 
 |  | 
 |   <target name="gwtc" description="Compile to JavaScript"> | 
 |       <mkdir dir="${tools.build}/www" /> | 
 |     <outofdate> | 
 |       <sourcefiles> | 
 |         <fileset dir="src" /> | 
 |         <fileset file="${gwt.user.jar}" /> | 
 |         <fileset file="${gwt.dev.jar}" /> | 
 |       </sourcefiles> | 
 |       <targetfiles> | 
 |         <fileset dir="${tools.build}/www" /> | 
 |       </targetfiles> | 
 |       <sequential> | 
 |         <java dir="${tools.build}" classname="com.google.gwt.dev.GWTCompiler" classpath="src:${gwt.user.jar}:${gwt.dev.jar}" fork="yes" failonerror="true"> | 
 |           <jvmarg value="-Xmx256M"/> | 
 |           <arg value="-out" /> | 
 |           <arg file="${tools.build}/www" /> | 
 |           <arg value="${tools.module}" /> | 
 |         </java> | 
 |       </sequential> | 
 |     </outofdate> | 
 |   </target> | 
 |  | 
 |   <target name="remoteweb-test" description="Run a remoteweb test at the given host and path"> | 
 |     <echo message="Performing remote browser testing at rmi://${gwt.remote.browser}" /> | 
 |     <gwt.junit test.args="-out www -web -remoteweb rmi://${gwt.remote.browser}" test.out="${junit.out}/${gwt.remote.browser}" test.cases="default.web.tests" /> | 
 |   </target> | 
 |  | 
 |   <target name="test" depends="compile, compile.tests" description="Run hosted-mode, web-mode and remoteweb tests for this project."> | 
 |     <property.ensure name="distro.built" location="${gwt.dev.staging.jar}" message="GWT must be built before performing any tests.  This can be fixed by running ant in the ${gwt.root} directory." /> | 
 |  | 
 |     <!-- | 
 |       Run hosted and web mode tests for the platform on which this build | 
 |       is executing | 
 |     --> | 
 |     <parallel threadcount="1"> | 
 |       <gwt.junit test.out="${junit.out}/${build.host.platform}-hosted-mode" test.cases="default.hosted.tests" /> | 
 |  | 
 |       <gwt.junit test.args="-out www -web" test.out="${junit.out}/${build.host.platform}-web-mode" test.cases="default.web.tests" /> | 
 |  | 
 |       <!-- | 
 |         Run remote browser testing for the comma delimited list of remote browsers | 
 |       --> | 
 |       <foreach list="${gwt.remote.browsers}" delimiter="," parallel="true" maxThreads="1" target="remoteweb-test" param="gwt.remote.browser" /> | 
 |     </parallel> | 
 |   </target> | 
 |  | 
 |   <target name="clean" description="Cleans this project's intermediate and output files"> | 
 |     <delete dir="${project.build}" /> | 
 |     <delete file="${project.lib}" /> | 
 |   </target> | 
 | </project> | 
 |  |