| <project name="dynatable2" default="build" basedir="."> |
| <property name="gwt.install" location="../../../build/lib" /> |
| <property name="outdir" location="war" /> |
| <property name="extradir" location="extra" /> |
| |
| <target name="javac" description="Compile project to WEB-INF/classes"> |
| <mkdir dir="${outdir}/WEB-INF/classes" /> |
| <javac srcdir="../../../samples/dynatable/src" |
| destdir="${outdir}/WEB-INF/classes" |
| debug="true" |
| debuglevel="lines,vars,source" |
| source="1.5" |
| target="1.5" |
| nowarn="true" |
| encoding="utf-8"> |
| <classpath> |
| <pathelement location="${gwt.install}/gwt-user.jar" /> |
| <pathelement location="${gwt.install}/gwt-dev-windows.jar" /> |
| </classpath> |
| </javac> |
| </target> |
| |
| <target name="deploy" depends="gwtc" description="Copy output to the war folder"> |
| <mkdir dir="${outdir}/WEB-INF/lib" /> |
| <copy todir="${outdir}/WEB-INF/lib" file="${gwt.install}/gwt-servlet.jar" /> |
| </target> |
| |
| <target name="gwtc" depends="javac" description="Compile to JavaScript"> |
| <java classname="com.google.gwt.dev.GWTCompiler" fork="yes" failonerror="true"> |
| <jvmarg value="-Xmx256M"/> |
| <arg value="-out" /> |
| <arg file="${outdir}" /> |
| <arg value="-extra" /> |
| <arg file="${extradir}" /> |
| <arg value="com.google.gwt.sample.dynatable.DynaTable2" /> |
| <classpath> |
| <pathelement location="../../../samples/dynatable/src" /> |
| <pathelement location="${outdir}/WEB-INF/classes" /> |
| <pathelement location="${gwt.install}/gwt-user.jar" /> |
| <pathelement location="${gwt.install}/gwt-dev-windows.jar" /> |
| </classpath> |
| </java> |
| </target> |
| |
| <target name="server" depends="deploy" description="Run the deployed app in a Jetty server"> |
| <echo message="PLEASE BROWSE TO: http://localhost:8888/DynaTable2.html"/> |
| <java classname="org.mortbay.jetty.Main" fork="yes"> |
| <arg value="8888" /> |
| <arg value="-webapp" /> |
| <arg file="${outdir}" /> |
| <classpath> |
| <pathelement location="${gwt.install}/gwt-dev-windows.jar" /> |
| </classpath> |
| </java> |
| </target> |
| |
| <target name="shell" depends="javac" description="Run the deployed app in GWT hosted mode"> |
| <java classname="com.google.gwt.dev.GWTHosted" fork="yes" failonerror="true"> |
| <jvmarg value="-Xmx256M"/> |
| <jvmarg value="-Dgwt.devjar=C:\gwt\releases\1.6\build\staging\gwt-windows-0.0.0\gwt-dev-windows.jar"/> |
| <arg value="-out" /> |
| <arg file="${outdir}" /> |
| <arg value="-extra" /> |
| <arg file="${extradir}" /> |
| <arg value="-startupUrl" /> |
| <arg value="DynaTable2.html" /> |
| <arg value="com.google.gwt.sample.dynatable.DynaTable2" /> |
| <classpath> |
| <pathelement location="../../../samples/dynatable/src" /> |
| <pathelement location="${outdir}/WEB-INF/classes" /> |
| <pathelement location="${gwt.install}/gwt-user.jar" /> |
| <pathelement location="${gwt.install}/gwt-dev-windows.jar" /> |
| </classpath> |
| </java> |
| </target> |
| |
| <target name="build" depends="javac, gwtc, deploy" description="Build this project" /> |
| |
| <target name="clean" description="Cleans this project's intermediate and output files"> |
| <delete dir="${outdir}/WEB-INF/classes" failonerror="false" /> |
| <delete dir="${outdir}/gwtc" failonerror="false" /> |
| <delete dir="${extradir}" failonerror="false" /> |
| </target> |
| </project> |