I created an Ant build file to do this and launch the shell. Hopefully
someone will find this useful. Note, I use intellij for all my
development which allows me compile, deploy, launch, and test my web
applications, so I use Ant very rarely. So I'm sure an Ant pro can
make the build.xml better.
Here is my build.properties
application.dir=C:/code/simpleGwtSpring/trunk
main.gwt=org.sample.Application
main.html=Application.html
lib.dir=lib
internal.target.dir=www
java.class.dir=classes/production/simpleGwtSpring
javac.source=1.5
javac.target=1.5
gwt.dir=C:/lib/gwt-windows-1.4.10
custom.tomcat.dir=webContent/tomcat
Here is my build.xml
<?xml version="1.0"?>
<project name="simpleGWTSpring" default="launchShell">
<property file="build.properties"/>
<property name="src" value="src"/>
<fileset dir="${lib.dir}" id="developmentLibs">
<include name="spring-2.0.4.jar"/>
<include name="gwt-sl.jar"/>
</fileset>
<!--
Separate because I need to include one of these jars from the $
{gwt.dir}
directory in order to link the swt-win32-3235.dll
-->
<fileset dir="${gwt.dir}" id="gwtJars">
<include name="gwt-dev-windows.jar"/>
<include name="gwt-user.jar"/>
</fileset>
<path id="gwtCompileLibs">
<fileset refid="developmentLibs"/>
<fileset refid="gwtJars"/>
</path>
<path id="libs-for-development">
<path refid="gwtCompileLibs"/>
<pathelement path="${src}" />
<pathelement path="${java.class.dir}"/>
</path>
<target name="launchShell" depends="internalDeployment"
description="Launch the application shell against the internal
tomcat">
<java classname="com.google.gwt.dev.GWTShell" fork="true">
<classpath refid="libs-for-development"/>
<arg line="-out ${application.dir}\${internal.target.dir}
shell/${main.gwt}/${main.html}"/>
</java>
</target>
<target name="internalDeployment" depends="gwtcompile"
description="Deploy for internal tomcat">
<delete dir="tomcat"/>
<copy todir="tomcat">
<fileset dir="${custom.tomcat.dir}" excludes="*.svn"/>
</copy>
</target>
<target name="gwtcompile" depends="compile" description="Run GWT
compiler for test application">
<java classname="com.google.gwt.dev.GWTCompiler" fork="true"
spawn="false">
<arg line="-style PRETTY -out ${internal.target.dir} %* $
{main.gwt}" />
<classpath refid="libs-for-development" />
</java>
</target>
<target name="compile" depends="init" description="Compiles main
source classes">
<javac debug="on" classpathref="gwtCompileLibs" destdir="$
{java.class.dir}" srcdir="${src}"
source="${javac.source}" target="${javac.target}"/>
</target>
<target name="init" description="Creates directory structure">
<mkdir dir="${java.class.dir}"/>
</target>
</project>