blob: d243b066891e79985f113e694f20d45237ea877c [file] [log] [blame]
gwt.team.mmendez4449b342007-04-10 19:41:44 +00001<project name="benchmark-viewer" default="build" basedir=".">
gwt.team.mmendezadaa2702007-05-09 13:32:03 +00002
jat@google.comed990282009-03-11 23:11:41 +00003 <!--
4 TODO(tobyr)
gwt.team.mmendezadaa2702007-05-09 13:32:03 +00005
jat@google.comed990282009-03-11 23:11:41 +00006 Once we have more than a single tool, this build should be re-examined
7 to see if several of the targets should be lifted into common.ant.xml.
8 The simple targets, like tests*, clean, and checkstyle are good
9 candidates, while the other targets depend heavily on the actual
10 makeup of the future tools.
11 -->
gwt.team.mmendezadaa2702007-05-09 13:32:03 +000012
jat@google.comed990282009-03-11 23:11:41 +000013 <property name="gwt.root" location="../.." />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000014 <property name="project.tail" value="tools/benchmark-viewer" />
15 <import file="${gwt.root}/common.ant.xml" />
gwt.team.mmendez4449b342007-04-10 19:41:44 +000016
jat@google.comed990282009-03-11 23:11:41 +000017 <!-- Platform shouldn't matter here, just picking one -->
jat@google.com0b1619e2009-09-20 19:33:31 +000018 <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000019 <property.ensure name="gwt.user.jar" location="${gwt.build.lib}/gwt-user.jar" />
jat@google.comed990282009-03-11 23:11:41 +000020 <property.ensure name="gwt.servlet.jar" location="${gwt.build.lib}/gwt-servlet.jar" />
gwt.team.mmendez4449b342007-04-10 19:41:44 +000021
jat@google.comed990282009-03-11 23:11:41 +000022 <property name="war" location="${project.build}/war" />
23
24 <path id="project.class.path">
25 <pathelement location="war/WEB-INF/classes"/>
26 <pathelement location="${gwt.user.jar}"/>
27 <pathelement location="${gwt.dev.jar}"/>
28 <fileset dir="${war}/WEB-INF/lib" includes="**/*.jar"/>
29 </path>
30
31 <target name="wardir" description="Create the target war directory">
32 <copy todir="${war}">
33 <fileset dir="war" excludes="WEB-INF/classes/marker" />
34 </copy>
35 <mkdir dir="${war}/WEB-INF/lib" />
36 <copy todir="${war}/WEB-INF/lib" file="${gwt.servlet.jar}" />
37 <copy todir="${war}/WEB-INF/lib" file="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" />
38 <copy todir="${war}/WEB-INF/lib" file="${gwt.tools.lib}/jfreechart/jcommon-1.0.6.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000039 </target>
gwt.team.mmendez4449b342007-04-10 19:41:44 +000040
jat@google.comed990282009-03-11 23:11:41 +000041 <target name="javac" depends="wardir" description="Compile java source">
42 <mkdir dir="${war}/WEB-INF/classes"/>
43 <gwt.javac destdir="${war}/WEB-INF/classes">
44 <classpath refid="project.class.path"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000045 </gwt.javac>
jat@google.comed990282009-03-11 23:11:41 +000046 <copy todir="${war}/WEB-INF/classes">
47 <fileset dir="src" excludes="**/*.java"/>
48 </copy>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000049 </target>
gwt.team.mmendez4449b342007-04-10 19:41:44 +000050
jat@google.comed990282009-03-11 23:11:41 +000051 <target name="gwtc" depends="javac" description="GWT compile to JavaScript">
52 <outofdate>
53 <sourcefiles>
54 <fileset dir="src"/>
55 <path refid="project.class.path"/>
56 </sourcefiles>
57 <targetfiles path="${war}/reportViewer/reportViewer.nocache.js" />
58 <sequential>
59 <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
60 <classpath>
61 <pathelement location="src"/>
62 <path refid="project.class.path"/>
rchandia@google.comb88482a2011-02-11 19:12:39 +000063 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar"/>
64 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar"/>
jat@google.comed990282009-03-11 23:11:41 +000065 </classpath>
66 <jvmarg value="-Xmx256M"/>
67 <arg value="-war"/>
68 <arg value="${war}"/>
69 <arg value="com.google.gwt.benchmarks.viewer.ReportViewer"/>
70 </java>
71 </sequential>
72 </outofdate>
73 </target>
74
75 <target name="war" depends="gwtc" description="Create a war file">
76 <zip destfile="${gwt.build.lib}/gwt-benchmark-viewer.war" basedir="${war}"/>
77 </target>
78
79 <target name="build" depends="war" description="Build this project" />
80
81 <target name="clean" description="Cleans this project">
82 <delete dir="${war}" failonerror="false" />
83 <delete file="${gwt.build.lib}/gwt-benchmark-viewer.war" failonerror="false" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000084 </target>
gwt.team.mmendez4449b342007-04-10 19:41:44 +000085
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000086 <target name="checkstyle" description="Static analysis of source">
87 <gwt.checkstyle>
88 <fileset dir="src"/>
89 </gwt.checkstyle>
90 </target>
gwt.team.mmendez4449b342007-04-10 19:41:44 +000091
jat@google.comed990282009-03-11 23:11:41 +000092 <target name="test" depends="build" />
gwt.team.mmendez4449b342007-04-10 19:41:44 +000093</project>