blob: 3c523e42bb5883aa52f5b152bb928f020fef5bf6 [file] [log] [blame]
<project name="codeserver" default="build" basedir=".">
<property name="gwt.root" location="../.." />
<property name="project.tail" value="dev/codeserver" />
<import file="${gwt.root}/common.ant.xml" />
<property.ensure name="" location="${}/gwt-dev.jar" />
<!-- location of preprocessed source -->
<property name="src" value="${}/src" />
Nasty hack to fix the source code for the open source build.
Constraint: the code in the "java/" directory is how we want it inside Google.
But outside Google, Jetty is not repackaged, so we need to fix the import statements.
(The right way to do this is probably to repackage Jetty.)
<target name="preprocess">
<delete dir="${src}"/>
<mkdir dir="${src}"/>
<copy todir="${src}">
<fileset dir="java">
<include name="**/*.java"/>
<replace dir="${src}" token=""
<target name="compile" depends="preprocess">
<mkdir dir="${javac.out}" />
<gwt.javac srcdir="${src}">
<pathelement location="${}" />
<target name="build" depends="compile" description="builds gwt-codeserver.jar">
<fileset dir="${src}" />
<fileset dir="${javac.out}"/>
<fileset dir="java">
<include name="**/*.html"/>
<include name="**/*.ico"/>
<include name="**/*.js"/>
<!-- why doesn't this work?
<attribute name="Class-Path" value="gwt-dev.jar gwt.user.jar" />
<attribute name="Main-Class" value="" />
<!-- no-op for now -->
<target name="verify"/>
<target name="demo" depends="build" description="starts the code server with a sample app">
<property.ensure name="gwt.user.jar" location="${}/gwt-user.jar" />
<property.ensure name="sample-src" location="${gwt.root}/samples/hello/src" />
<java fork="true" failonerror="true" classname="">
<pathelement location="${project.lib}"/>
<pathelement location="${}"/>
<pathelement location="${gwt.user.jar}"/>
<arg value="-src"/>
<arg value="${sample-src}"/>
<arg value=""/>