http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/7d8609e7/antbuild/build.xml
----------------------------------------------------------------------
diff --git a/antbuild/build.xml b/antbuild/build.xml
new file mode 100644
index 0000000..893654a
--- /dev/null
+++ b/antbuild/build.xml
@@ -0,0 +1,1153 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ * Author: [email protected] (Dhanji R. Prasanna)
+ *         [email protected] (Alex North)
+ -->
+<project name="waveinabox" default="dist">
+  <description>Wave in a Box</description>
+
+  <property file="build.properties"/>
+
+  <!-- Import classpath definitions. -->
+  <import file="${build.classpath.path}"/>
+
+  <!-- Import macros -->
+  <import file="${build.macros.path}"/>
+
+  <property name="gwt.args" value=""/>
+
+  <!-- Standard time properties and a timestamp pattern -->
+  <tstamp>
+    <format property="DSTAMP_INT" pattern="-yyyy-MM-dd"/>
+  </tstamp>
+  <tstamp>
+    <format property="LOG_STAMP" pattern="yyyy-MM-dd_HH-mm-ss"/>
+  </tstamp>
+  <property name="release.robot.name" 
value="wave-robot-client${DSTAMP_INT}.zip"/>
+  <property name="release.robot.python.name" 
value="wave-robot-python-client${DSTAMP_INT}.zip"/>
+  <property name="build.log.filename" value="build_${LOG_STAMP}.log"/>
+
+  <!--=====
+      Initialization
+      =====-->
+
+  <target name="clean" description="Cleans up the build artifacts and 
temporary directories">
+    <delete dir="${build.dir}"/>
+    <delete dir="${dist.dir}"/>
+    <delete dir="${doc.dir}"/>
+    <delete dir="${gen.dir}"/>
+    <delete dir="${test.out.dir}"/>
+    <delete dir="war/waveharness"/>
+    <delete dir="war/webclient"/>
+  </target>
+
+  <target name="clean-lib" description="Cleans up the third party libraries">
+    <delete dir="${lib.test}"/>
+    <delete dir="${lib.codegen}"/>
+    <delete dir="${lib.runtime}"/>
+    <delete dir="${lib.release}"/>
+    <delete dir="${lib.solr}"/>
+  </target>
+
+  <target name="init-logging" description="Enable logging to file">
+    <mkdir dir="${build.log.dir}"/>
+    <record name="${build.log.dir}/${build.log.filename}"
+        loglevel="verbose" append="false"/>
+    <echo message="Logging to ${build.log.dir}/${build.log.filename}"/>
+  </target>
+
+  <target name="init" depends="init-logging">
+    <mkdir dir="${build.proto.dir}"/>
+    <mkdir dir="${build.messages.dir}"/>
+    <mkdir dir="${build.src.dir}"/>
+    <mkdir dir="${build.test.dir}"/>
+    <mkdir dir="${coverage.dir}"/>
+    <mkdir dir="${dist.dir}"/>
+    <mkdir dir="${staging.dir}"/>
+    <mkdir dir="${dep}"/>
+    <mkdir dir="${test.out.dir}"/>
+    <mkdir dir="${lib.test}"/>
+    <mkdir dir="${lib.codegen}"/>
+    <mkdir dir="${lib.runtime}"/>
+    <mkdir dir="${lib.release}"/>
+    <mkdir dir="${lib.solr}"/>
+    <mkdir dir="${gen.dir}/gxp"/>
+    <mkdir dir="${gen.dir}/messages"/>
+  </target>
+
+  <!-- === IDE helper targets === -->
+
+  <!-- TODO(danilatos): Make this work on Windows as well. For now,
+       windows users can just copy the .project_template file manually. -->
+  <target name="eclipse" description="Generates an eclipse .project file">
+    <exec executable="tools/eclipse.sh"/>
+  </target>
+
+  <!--=====
+      Builds
+      ======-->
+
+  <!-- ===
+      Protocol buffer targets.
+      Compiles generated proto sources. See build-proto.xml for generating
+      proto sources from .proto files.
+  === -->
+  <target name="compile-proto-dep">
+    <uptodate targetfile="${dep}/compile-proto" property="skip.compile-proto">
+      <srcfiles dir="${lib.dir}"/>
+      <srcfiles dir="${src.proto.dir}" includes="**/*.java"/>
+    </uptodate>
+  </target>
+
+  <target name="compile-proto" depends="init, compile-proto-dep"
+      unless="skip.compile-proto" description="Compiles protocol buffers">
+    <buildproto destdir="${build.proto.dir}">
+      <src path="${src.proto.dir}"/>
+      <classpath>
+        <path refid="libpath"/>
+      </classpath>
+    </buildproto>
+    <touch file="${dep}/compile-proto"/>
+  </target>
+
+  <!-- === GXP targets === -->
+  <target name="gen-gxp-dep">
+    <uptodate targetfile="${dep}/gen-gxp" property="skip.gen-gxp">
+      <srcfiles dir="${src.dir}" 
includes="org/waveprotocol/box/server/gxp/*.gxp"/>
+    </uptodate>
+  </target>
+
+  <!-- Generates the Java files from templates -->
+  <target name="gen-gxp" description="Generates GXP files"
+      depends="init, define-gxpc, gen-gxp-dep" unless="skip.gen-gxp">
+    <gxpc srcdir="${src.dir}" srcpaths="${src.dir}" destdir="${gen.dir}/gxp"
+        target="org.waveprotocol.box.server.gxp" />
+    <touch file="${dep}/gen-gxp"/>
+  </target>
+
+  <target name="compile-gxp-dep">
+    <uptodate targetfile="${dep}/compile-gxp" property="skip.compile-gxp">
+      <srcfiles dir="${gen.dir}/gxp"/>
+    </uptodate>
+  </target>
+
+  <target name="compile-gxp" depends="init, gen-gxp, compile-gxp-dep"
+      unless="skip.compile-gxp" description="Compiles GXP classes">
+    <buildjava destdir="${build.src.dir}">
+      <src path="${gen.dir}/gxp" />
+      <classpath>
+        <path refid="libpath"/>
+      </classpath>
+    </buildjava>
+    <touch file="${dep}/compile-gxp"/>
+  </target>
+
+  <!-- === PST targets === -->
+  <target name="dist-pst-dep">
+    <uptodate targetfile="${dep}/dist-pst" property="skip.dist-pst">
+      <srcfiles dir="${lib.dir}"/>
+      <srcfiles dir="${src.dir}" includes="org/waveprotocol/pst/**/*.java"/>
+    </uptodate>
+  </target>
+
+  <target name="dist-pst" depends="init, dist-pst-dep, compile-proto"
+      unless="skip.dist-pst" description="Builds the PST tool">
+    <delete dir="${build.dir}/pst"/>
+    <mkdir dir="${build.dir}/pst"/>
+    <javac srcdir="${src.dir}" destdir="${build.dir}/pst" 
includes="org/waveprotocol/pst/**/*">
+      <classpath>
+        <path refid="libpath"/>
+        <path location="${build.proto.dir}/"/>
+      </classpath>
+    </javac>
+    <copy todir="${build.dir}/pst">
+      <fileset dir="${src.dir}">
+        <include name="org/waveprotocol/pst/**/*.st"/>
+        <include name="org/waveprotocol/pst/**/properties"/>
+      </fileset>
+    </copy>
+    <jar destfile="${dist.dir}/pst.jar" basedir="${build.dir}/pst"/>
+    <touch file="${dep}/dist-pst"/>
+  </target>
+
+  <target name="gen-messages-dep">
+    <uptodate targetfile="${dep}/gen-messages" property="skip.gen-messages">
+      <srcfiles dir="${src.dir}" includes="org/waveprotocol/pst/**/*.st"/>
+      <srcfiles dir="${lib.dir}"/>
+      <srcfiles dir="${dist.dir}" includes="pst.jar"/>
+      <srcfiles dir="${build.proto.dir}"/>
+    </uptodate>
+  </target>
+
+  <target name="gen-messages" depends="dist-pst, compile-proto, 
gen-messages-dep"
+      unless="skip.gen-messages"
+      description="Generates the DTO message source">
+    <delete dir="${gen.dir}/messages"/>
+    <mkdir dir="${gen.dir}/messages"/>
+    <pstmessage 
proto="${build.proto.dir}/org/waveprotocol/box/common/comms/WaveClientRpc.class"/>
+    <pstmessage 
proto="${build.proto.dir}/org/waveprotocol/box/search/SearchProto.class"/>
+    <pstmessage 
proto="${build.proto.dir}/org/waveprotocol/box/profile/ProfilesProto.class"/>
+    <pstmessage 
proto="${build.proto.dir}/org/waveprotocol/box/server/rpc/Rpc.class"/>
+    <pstmessage 
proto="${build.proto.dir}/org/waveprotocol/box/attachment/AttachmentProto.class"/>
+    <pstmessage 
proto="${build.proto.dir}/org/waveprotocol/wave/federation/Proto.class"/>
+    <pstmessage 
proto="${build.proto.dir}/org/waveprotocol/wave/concurrencycontrol/ClientServer.class"/>
+    <pstmessage 
proto="${build.proto.dir}/org/waveprotocol/wave/diff/Diff.class"/>
+    <touch file="${dep}/gen-messages"/>
+  </target>
+
+  <target name="compile-messages-dep">
+    <uptodate targetfile="${dep}/compile-messages" 
property="skip.compile-messages">
+      <srcfiles dir="${gen.dir}/messages"/>
+      <srcfiles dir="${src.dir}" 
includes="org/waveprotocol/wave/communication/**"/>
+    </uptodate>
+  </target>
+
+  <target name="compile-messages" depends="gen-messages, compile-messages-dep"
+      unless="skip.compile-messages" description="Compiles the DTO messages">
+    <!--
+      The generated DTOs depend on code in wave/communication.  At this stage 
of
+      the build process, that code is still in source form, so it is exposed to
+      javac via sourcepath not classpath.  Since javac is too aggressive, and
+      gobbles up those files and compiles them too, a subsequent step has to
+      go and delete those overzealously compiled files, because they will be
+      compiled again later.
+    -->
+    <javac srcdir="${gen.dir}/messages"
+           destdir="${build.messages.dir}"
+           sourcepath="${src.dir}">
+      <classpath>
+        <path refid="libpath"/>
+        <pathelement location="${build.proto.dir}"/>
+      </classpath>
+    </javac>
+    <delete dir="${build.messages.dir}/org/waveprotocol/wave/communication"/>
+    <touch file="${dep}/compile-messages"/>
+  </target>
+
+  <!-- === Java targets === -->
+  <target name="compile-dep">
+    <uptodate targetfile="${dep}/compile" property="skip.compile">
+      <srcfiles dir="${lib.dir}"/>
+      <srcfiles dir="${src.dir}" includes="**"/>
+      <srcfiles dir="${gen.dir}" includes="**"/>
+    </uptodate>
+  </target>
+
+  <target name="compile" depends="compile-proto, compile-gxp, 
compile-messages, compile-dep"
+      unless="skip.compile" description="Compiles all source">
+    <subant target="compile" inheritall="true">
+      <property name="build.common.path" location="build-common.xml"/>
+      <fileset dir="${src.dir}" includes="*/**/build.xml"/>
+    </subant>
+
+    <!-- copy non binary resources in src tree to output classpath. Why? -->
+    <copy todir="${build.src.dir}">
+      <fileset dir="${src.dir}">
+        <include name="**/*.js"/>
+        <include name="**/*.xml"/>
+        <include name="**/*.html"/>
+        <include name="**/*.properties"/>
+        <include name="**/*.proto"/>
+        <include name="**/*.conf"/>
+      </fileset>
+    </copy>
+
+    <touch file="${dep}/compile"/>
+  </target>
+
+  <target name="compile-tests" depends="get-third-party,compile"
+      description="Compiles all unit tests">
+            <!-- Pull in the Emma tasks -->
+    <taskdef resource="emma_ant.properties" classpathref="test.libpath"/>
+    <buildjava destdir="${build.test.dir}">
+      <src path="${test.dir}" />
+      <classpath>
+        <path refid="libpath"/>
+        <path refid="test.libpath"/>
+        <pathelement location="${build.src.dir}"/>
+        <pathelement location="${build.proto.dir}"/>
+      </classpath>
+    </buildjava>
+
+    <!-- copy non binary resources in src tree to output classpath -->
+    <copy todir="${build.test.dir}">
+      <fileset dir="${test.dir}">
+        <include name="**/*.xml"/>
+        <include name="**/*.html"/>
+        <include name="**/*.properties"/>
+      </fileset>
+    </copy>
+  </target>
+
+  <!--=====
+      Tests
+      ======-->
+
+  <target name="test" depends="compile-tests" description=
+    "Runs all the unit tests in the project excluding external persistence">
+    <!-- EMMA disabled due to incompatibility with EventSerializer -->
+    <!-- Tests are run in a single new VM, when forkmode is set to once -->
+    <runtests forkmode="once" coverage="true">
+      <fileset dir="${test.dir}">
+        <include name="**/*Test.java"/>
+        <exclude name="**/*GwtTest.java"/>
+        <exclude name="**/*LargeTest.java"/>
+        <!-- Exclude all persistence tests -->
+        <exclude name="**/server/persistence/**"/>
+      </fileset>
+      <!-- Include the persistence tests that aren't run elsewhere -->
+      <fileset dir="${test.dir}">
+        <include name="**/server/persistence/memory/*Test.java"/>
+        <include name="**/server/persistence/file/*Test.java"/>
+      </fileset>
+    </runtests>
+  </target>
+
+  <target name="test-large" depends="compile-tests" description="Runs large 
tests (slow)">
+    <runtests forkmode="perTest" coverage="true">
+      <fileset dir="${test.dir}">
+        <include name="**/*LargeTest.java"/>
+      </fileset>
+    </runtests>
+  </target>
+
+  <target name="test-gwt" depends="compile-tests" description="Runs GWT tests 
(slow)">
+    <!-- Fork per test due to GWT test failure in shared JVM -->
+    <!-- EMMA disabled due to GWT incompatibility -->
+    <runtests forkmode="perTest" coverage="false">
+      <fileset dir="${test.dir}">
+        <include name="**/*GwtTest.java"/>
+      </fileset>
+    </runtests>
+  </target>
+
+  <target name="test-mongodb" depends="compile-tests" description="Runs the 
MongoDb tests">
+    <runtests forkmode="once" coverage="true">
+      <fileset dir="${test.dir}">
+        <!-- Include the mongoDb tests -->
+        <include name="**/server/persistence/mongodb/**/*Test.java"/>
+      </fileset>
+    </runtests>
+  </target>
+
+  <target name="test-all" depends="compile-tests, test, test-gwt, test-large, 
test-mongodb"
+      description="Run all tests, including GWT"/>
+
+  <!--=====
+      GWT
+      ======-->
+
+  <target name="compile-gwt-dep">
+    <uptodate targetfile="${dep}/compile-gwt" property="skip.compile-gwt">
+      <srcfiles dir="${lib.dir}"/>
+      <srcfiles dir="${src.dir}"/>
+      <srcfiles dir="${gen.dir}/messages"/>
+    </uptodate>
+  </target>
+
+  <target name="compile-gwt" depends="compile, compile-gwt-dep"
+      description="GWT compile to production JavaScript" 
unless="skip.compile-gwt">
+    <java failonerror="true" fork="true" 
classname="com.google.gwt.dev.Compiler">
+      <classpath>
+        <pathelement location="${src.dir}"/>
+        <pathelement location="${gen.dir}/messages"/>
+        <path refid="libpath"/>
+        <path refid="test.libpath"/>
+      </classpath>
+      <jvmarg value="-Xmx1024M"/>
+      <!-- Small Javascript size. -->
+      <arg line="-style OBFUSCATED"/>
+      <!-- Do not include class and package names in compiled JS. -->
+      <arg line="-XdisableClassMetadata"/>
+      <arg line="-XdisableCastChecking"/>
+      <arg line="-localWorkers 4"/>
+      <arg line="${gwt.args}"/>
+      <arg value="org.waveprotocol.box.webclient.WebClientProd"/>
+    </java>
+    <!-- Only one GWT compile output is valid at any one time. -->
+    <delete file="${dep}/compile-gwt-dev"/>
+    <touch file="${dep}/compile-gwt"/>
+  </target>
+
+  <target name="compile-gwt-dev-dep">
+    <uptodate targetfile="${dep}/compile-gwt-dev" 
property="skip.compile-gwt-dev">
+      <srcfiles dir="${lib.dir}"/>
+      <srcfiles dir="${src.dir}"/>
+      <srcfiles dir="${gen.dir}/messages"/>
+    </uptodate>
+  </target>
+
+  <target name="compile-gwt-demo" depends="compile, compile-gwt-dev-dep"
+       description="GWT compile to a 'demo' production JavaScript with remote 
logging enabled."
+       unless="skip.compile-gwt-dev">
+     <java failonerror="true" fork="true" 
classname="com.google.gwt.dev.Compiler">
+       <classpath>
+         <pathelement location="${src.dir}"/>
+         <pathelement location="${gen.dir}/messages"/>
+         <path refid="libpath"/>
+         <path refid="test.libpath"/>
+       </classpath>
+       <jvmarg value="-Xmx1024M"/>
+       <!-- Human-readable JS. -->
+       <arg line="-style PRETTY"/>
+       <!-- Assertions on. -->
+       <arg line="-ea"/>
+       <arg line="${gwt.args}"/>
+       <arg value="org.waveprotocol.box.webclient.WebClientDemo"/>
+     </java>
+     <!-- Only one GWT compile output is valid at any one time. -->
+     <delete file="${dep}/compile-gwt"/>
+     <touch file="${dep}/compile-gwt-dev"/>
+   </target>
+
+  <target name="compile-gwt-dev" depends="compile, compile-gwt-dev-dep"
+      description="GWT compile of a restricted set of permutations suitable 
for development."
+      unless="skip.compile-gwt-dev">
+    <java failonerror="true" fork="true" 
classname="com.google.gwt.dev.Compiler">
+      <classpath>
+        <pathelement location="${src.dir}"/>
+        <pathelement location="${gen.dir}/messages"/>
+        <path refid="libpath"/>
+        <path refid="test.libpath"/>
+      </classpath>
+      <jvmarg value="-Xmx1024M"/>
+      <!-- Human-readable JS. -->
+      <arg line="-style PRETTY"/>
+      <!-- Less optimal JS, but faster compile. -->
+      <arg line="-draftCompile"/>
+      <!-- Assertions on. -->
+      <arg line="-ea"/>
+      <arg line="${gwt.args}"/>
+      <arg value="org.waveprotocol.box.webclient.WebClientDev"/>
+    </java>
+    <!-- Only one GWT compile output is valid at any one time. -->
+    <delete file="${dep}/compile-gwt"/>
+    <touch file="${dep}/compile-gwt-dev"/>
+  </target>
+
+  <!--=====
+      Hosted and Superdev
+      ======-->
+
+  <target name="hosted-gwt" depends="compile"
+      description="Runs the hosted mode server, for debugging the GWT client 
in a JVM.">
+    <java failonerror="true" fork="true" 
classname="com.google.gwt.dev.DevMode">
+      <classpath>
+        <pathelement location="${src.dir}"/>
+        <pathelement location="${build.src.dir}"/>
+        <pathelement location="${gen.dir}/messages"/>
+        <path refid="libpath"/>
+      </classpath>
+      <jvmarg value="-Xmx1024M"/>
+      <jvmarg value="-ea"/>
+      <jvmarg 
value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8001"/>
+      <arg value="-noserver" />
+      <arg line="-bindAddress 127.0.0.1" />
+      <arg line="${gwt.args}"/>
+      <arg line="-startupUrl http://localhost:9898"/>
+      <arg line="-logLevel DEBUG"/>
+      <arg value="org.waveprotocol.box.webclient.WebClientDev"/>
+    </java>
+  </target>
+
+  <target name="superdev-gwt" depends="compile"
+      description="Runs the superdev mode, for debugging the GWT client in a 
browser.">
+    <java failonerror="true" fork="true" 
classname="com.google.gwt.dev.codeserver.CodeServer">
+      <classpath>
+        <pathelement location="${lib.codegen}/gwt-dev-2.6.1.jar" />
+        <pathelement location="${lib.codegen}/gwt-codeserver-2.6.1.jar" />
+        <pathelement location="${src.dir}"/>
+        <pathelement location="${gen.dir}/messages"/>
+        <path refid="libpath"/>
+      </classpath>
+      <arg line="${gwt.args}"/>
+      <arg line="-src src"/>
+      <arg value="org.waveprotocol.box.webclient.WebClientDev"/>
+    </java>
+  </target>
+
+  <target name="editor-hosted" depends="compile" description="Runs the editor 
harness through the GWT hosted mode server, for debugging in a JVM.">
+    <java failonerror="true" fork="true" 
classname="com.google.gwt.dev.DevMode">
+      <classpath>
+        <pathelement location="${src.dir}"/>
+        <path refid="libpath"/>
+      </classpath>
+      <jvmarg value="-Xmx512M"/>
+      <jvmarg 
value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8001"/>
+      <arg line="${gwt.args}"/>
+      <arg line="-war war"/>
+      <arg line="-startupUrl 
org.waveprotocol.wave.client.editor.harness.EditorTest/EditorTest.html"/>
+      <arg value="org.waveprotocol.wave.client.editor.harness.EditorTest"/>
+    </java>
+  </target>
+
+  <target name="editor-superdev" depends="compile" description="Runs the 
editor harness through the GWT superdev mode server, for debugging in a 
browser.">
+    <java failonerror="true" fork="true" 
classname="com.google.gwt.dev.codeserver.CodeServer">
+      <classpath>
+        <pathelement location="${lib.codegen}/gwt-dev-2.6.1.jar" />
+        <pathelement location="${lib.codegen}/gwt-codeserver-2.6.1.jar" />
+        <pathelement location="${src.dir}"/>
+        <path refid="libpath"/>
+      </classpath>
+      <arg line="${gwt.args}"/>
+      <arg line="-src src"/>
+      <arg value="org.waveprotocol.wave.client.editor.harness.EditorTest"/>
+    </java>
+  </target>
+
+  <target name="waveharness-hosted" depends="compile" description="Runs the 
wave panel harness through the GWT hosted mode server, for debugging in a JVM.">
+    <java failonerror="true" fork="true" 
classname="com.google.gwt.dev.DevMode">
+      <classpath>
+        <pathelement location="${src.dir}"/>
+        <path refid="libpath"/>
+      </classpath>
+      <jvmarg value="-Xmx512M"/>
+      <jvmarg 
value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8001"/>
+      <arg line="${gwt.args}"/>
+      <arg line="-war war"/>
+      <arg line="-startupUrl waveharness/UndercurrentHarness.html"/>
+      <arg value="org.waveprotocol.wave.client.testing.UndercurrentHarness"/>
+    </java>
+  </target>
+
+  <target name="waveharness-superdev" depends="compile" description="Runs the 
wave panel harness through the GWT superdev mode server, for debugging in a 
browser.">
+    <java failonerror="true" fork="true" 
classname="com.google.gwt.dev.codeserver.CodeServer">
+      <classpath>
+        <pathelement location="${lib.codegen}/gwt-dev-2.6.1.jar" />
+        <pathelement location="${lib.codegen}/gwt-codeserver-2.6.1.jar" />
+        <pathelement location="${src.dir}"/>
+        <path refid="libpath"/>
+      </classpath>
+      <arg line="${gwt.args}"/>
+      <arg line="-src src"/>
+      <arg value="org.waveprotocol.wave.client.testing.UndercurrentHarness"/>
+    </java>
+  </target>
+
+  <!--=====
+      Server
+      ======-->
+
+  <target name="run-server" depends="compile"
+      description="Runs Wave in a Box server">
+    <java failonerror="true" fork="true" 
classname="org.waveprotocol.box.server.ServerMain">
+      <classpath>
+        <path refid="libpath"/>
+        <path location="${build.src.dir}"/>
+        <path location="${build.proto.dir}"/>
+        <path location="${build.messages.dir}"/>
+      </classpath>
+      <jvmarg value="-Dorg.eclipse.jetty.LEVEL=DEBUG"/>
+      <jvmarg value="-Djava.security.auth.login.config=jaas.config"/>
+    </java>
+  </target>
+
+  <target name="debug-server" depends="compile"
+      description="Runs Wave in a Box server with debugging">
+    <java failonerror="true" fork="true" 
classname="org.waveprotocol.box.server.ServerMain">
+      <classpath>
+        <path refid="libpath"/>
+        <path location="${build.src.dir}"/>
+        <path location="${build.proto.dir}"/>
+        <path location="${build.messages.dir}"/>
+      </classpath>
+      <jvmarg value="-Dorg.eclipse.jetty.LEVEL=DEBUG"/>
+      <jvmarg value="-Djava.security.auth.login.config=jaas.config"/>
+      <jvmarg value="-Dwave.server.config=server.config"/>
+      <jvmarg 
value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=10898"/>
+    </java>
+  </target>
+
+  <!--=====
+      Distribution
+      ======-->
+
+  <target name="stage-dep">
+    <uptodate targetfile="${dep}/stage" property="skip.stage">
+      <srcfiles dir="${lib.runtime}" includes="*.jar"/>
+      <srcfiles dir="${lib.codegen}" includes="gwt/gwt-user-*.jar"/>
+      <srcfiles dir="${build.src.dir}"/>
+    </uptodate>
+  </target>
+
+  <target name="stage" depends="compile, stage-dep"
+      description="Copy classes and runtime dependencies to the staging 
directory" unless="skip.stage">
+    <!-- Unzip and copy all the runtime deps into a staging dir -->
+    <unzip dest="${staging.dir}">
+      <fileset dir="${lib.runtime}">
+        <include name="*.jar"/>
+      </fileset>
+    </unzip>
+    <unzip dest="${staging.dir}">
+      <fileset dir="${lib.codegen}">
+         <include name="gwt-*.jar"/>
+      </fileset>
+      <patternset>
+        <exclude name="javax/servlet/**/*"/>
+        <exclude name="org/eclipse/**/*"/>
+      </patternset>
+    </unzip>
+    <copy todir="${staging.dir}" preservelastmodified="true">
+      <fileset dir="${build.src.dir}"/>
+      <fileset dir="${build.proto.dir}"/>
+      <fileset dir="${build.messages.dir}"/>
+    </copy>
+    <touch file="${dep}/stage"/>
+  </target>
+
+  <target name="dist" depends="test, compile-gwt, dist-server, 
dist-export-import"
+      description="Compiles, tests and creates the binary executable.">
+  </target>
+
+  <target name="dist-proto" depends="compile-proto" description="Builds the 
proto jar">
+    <jar destfile="${dist.dir}/proto.jar" basedir="${build.proto.dir}"/>
+    <jar destfile="${dist.dir}/proto-src.jar" basedir="${src.proto.dir}"/>
+    <jar destfile="${dist.dir}/proto-msg.jar" basedir="${gen.dir}/messages"/>
+  </target>
+
+  <target name="dist-libraries" depends="compile, dist-proto, dist-pst" 
description="Builds the distribution libraries">
+    <subant target="dist" inheritall="true">
+      <fileset dir="${src.dir}" includes="*/**/build.xml"/>
+    </subant>
+  </target>
+
+  <target name="dist-robot-client-api" depends="compile">
+       <jar destfile="${robotclient.jar.out}">
+      <fileset dir="${staging.dir}">
+       <include name="com/google/wave/api/*" />
+       <include name="com/google/wave/api/event/**/*" />
+       <include name="com/google/wave/api/impl/**/*" />
+       <include name="com/google/wave/api/oauth/**/*" />
+       <include name="com/google/wave/api/v2/**/*" />
+      </fileset>
+      <manifest>
+        <attribute name="Specification-Vendor" value="The Apache Software 
Foundation"/>
+        <attribute name="Specification-Title" value="Apache Wave Robot Client 
API"/>
+        <attribute name="Specification-Version" value="${waveinabox.version}"/>
+        <attribute name="Implementation-Vendor" value="The Apache Software 
Foundation"/>
+        <attribute name="Implementation-Title" value="Apache Wave Robot Client 
API"/>
+        <attribute name="Implementation-Version" 
value="${waveinabox.version}"/>
+        <attribute name="Built-By" value="${user.name}"/>
+      </manifest>
+      <metainf dir="." includes="LICENSE, NOTICE" />
+    </jar>
+  </target>
+
+  <!-- dist-api is broken due to non-runnable dependencies in the waveserver 
directory.  TODO: fix. -->
+  <target name="dist-api" depends="stage" description="Assembles the Wave in a 
Box API">
+    <jar destfile="${api.jar.out}">
+      <fileset dir="${staging.dir}">
+        <include name="org/waveprotocol/**/*" />
+        <!-- Only exclude runnable targets -->
+        <exclude name="org/waveprotocol/box/consoleclient/**/*" />
+        <exclude name="org/waveprotocol/box/server/waveserver/**/*" />
+      </fileset>
+      <manifest>
+        <attribute name="Specification-Vendor" value="The Apache Software 
Foundation"/>
+        <attribute name="Specification-Title" value="Apache Wave Reference 
Impl API"/>
+        <attribute name="Specification-Version" value="${waveinabox.version}"/>
+        <attribute name="Implementation-Vendor" value="The Apache Software 
Foundation"/>
+        <attribute name="Implementation-Title" value="Apache Wave Reference 
Impl API"/>
+        <attribute name="Implementation-Version" 
value="${waveinabox.version}"/>
+        <attribute name="Built-By" value="${user.name}"/>
+      </manifest>
+      <metainf dir="." includes="LICENSE, NOTICE" />
+    </jar>
+  </target>
+
+  <!-- A healthy mix of hyphens and underscores never hurt anyone.  Sigh. -->
+  <target name="dist-server-dep">
+    <!-- Note: this check is still very slow (~30secs) -->
+    <uptodate targetfile="${dep}/dist-server" property="skip.dist-server">
+      <srcfiles dir="${staging.dir}"/>
+    </uptodate>
+  </target>
+
+  <target name="dist-server" depends="stage, dist-server-dep" 
description="Assembles the Wave in a Box server" unless="skip.dist-server">
+    <jar destfile="${server.jar.out}">
+      <fileset dir="${staging.dir}">
+        <include name="META-INF/services/*" />
+        <include name="com/mongodb/**/*" />
+        <include name="org/slf4j/**/*" />
+           <include name="org/atmosphere/**/*" />
+        <include name="com/google/common/**/*" />
+        <include name="com/google/gson/**/*" />
+        <include name="com/google/gxp/**/*" />
+        <include name="com/google/gwt/core/server/**/*" />
+        <include name="com/google/gwt/core/shared/**/*" />
+        <include name="com/google/gwt/logging/**/*" />
+        <include name="com/google/gwt/user/server/**/*" />
+        <include name="com/google/gwt/user/client/rpc/**/*" />
+        <include name="com/google/inject/**/*" />
+        <include name="com/google/protobuf/**/*" />
+        <include name="com/google/wave/**/*" />
+        <include name="com/typesafe/**/*" />
+        <include name="gnu/inet/**/*" />
+        <include name="javax/inject/**/*" />
+        <include name="javax/servlet/**/*" />
+        <include name="javax/xml/**/*" />
+        <include name="net/oauth/**/*" />
+        <include name="org/aopalliance/**/*" />
+        <include name="org/apache/commons/cli/**/*" />
+        <include name="org/apache/commons/codec/**/*" />
+        <include name="org/apache/commons/collections/**/*" />
+        <include name="org/apache/commons/configuration/**/*" />
+        <include name="org/apache/commons/fileupload/**/*" />
+        <include name="org/apache/commons/httpclient/**/*" />
+        <include name="org/apache/commons/lang/**/*" />
+        <include name="org/apache/commons/logging/**/*" />
+        <include name="org/apache/lucene/**/*" />
+        <include name="org/apache/commons/io/**/*" />
+        <include name="org/apache/xerces/**/*" />
+        <include name="org/bson/**/*" />
+        <include name="org/dom4j/**/*" />
+        <include name="org/eclipse/**/*" />
+        <include name="org/jdom/**/*" />
+        <include name="org/jivesoftware/**/*" />
+        <include name="org/joda/time/**/*" />
+        <include name="org/json/**/*" />
+        <include name="org/waveprotocol/**/*" />
+        <include name="org/xmlpull/**/*" />
+        <include name="org/xmpp/**/*" />
+        <include name="cc/kune/initials/**/*" />
+        <exclude name="org/waveprotocol/box/webclient/**/*"/>
+        <exclude name="org/waveprotocol/box/consoleclient/**/*"/>
+        <exclude name="org/waveprotocol/box/expimp/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/*"/>
+        <exclude name="org/waveprotocol/wave/client/account/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/autohide/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/clipboard/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/common/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/concurrencycontrol/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/debug/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/doodad/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/paging/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/render/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/scheduler/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/scroll/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/state/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/testing/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/uibuilder/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/uibuilder/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/util/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/wave/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/wavepanel/**/*"/>
+        <exclude name="org/waveprotocol/wave/client/widget/**/*"/>
+        <exclude name="com/google/api/client/**/*"/>
+      </fileset>
+      <manifest>
+        <!-- Application entry point -->
+        <attribute name="Main-Class"
+          value="org.waveprotocol.box.server.ServerMain"/>
+        <attribute name="Specification-Vendor" value="The Apache Software 
Foundation"/>
+        <attribute name="Specification-Title" value="Apache Wave Server"/>
+        <attribute name="Specification-Version" value="${waveinabox.version}"/>
+        <attribute name="Implementation-Vendor" value="The Apache Software 
Foundation"/>
+        <attribute name="Implementation-Title" value="Apache Wave Server"/>
+        <attribute name="Implementation-Version" 
value="${waveinabox.version}"/>
+        <attribute name="Built-By" value="${user.name}"/>
+      </manifest>
+      <metainf dir="." includes="LICENSE, NOTICE" />
+    </jar>
+    <touch file="${dep}/dist-server"/>
+  </target>
+
+  <target name="dist-export-import-dep">
+    <uptodate targetfile="${dep}/dist-export-import" 
property="skip.dist-export-import">
+      <srcfiles dir="${staging.dir}"/>
+    </uptodate>
+  </target>
+
+  <target name="dist-export-import" depends="stage, dist-export-import-dep" 
description="Assembles the Wave Export/Import utilities" 
unless="skip.dist-export-import">
+    <jar destfile="${export-import.jar.out}">
+      <fileset dir="${staging.dir}">
+       <include name="org/waveprotocol/box/server/common/**/*"/>
+        <include name="org/waveprotocol/box/expimp/**/*"/>
+        <include name="org/waveprotocol/box/server/persistence/**/*"/>
+        <include name="org/waveprotocol/box/server/rpc/**/*"/>
+        <include name="org/waveprotocol/wave/**/*"/>
+        <include name="org/waveprotocol/protobuf/**/*"/>
+        <include name="org/waveprotocol/box/attachment/**/*"/>
+        <include name="org/waveprotocol/box/common/comms/**/*"/>
+        <include name="org/apache/http/**/*"/>
+        <include name="org/apache/commons/**/*"/>
+        <include name="com/google/wave/api/**/*"/>
+        <include name="com/google/common/**/*"/>
+        <include name="com/google/gson/**/*"/>
+        <include name="com/google/protobuf/**/*"/>
+        <include name="org/json/**/*"/>
+        <include name="net/oauth/**/*"/>
+      </fileset>
+      <manifest>
+        <attribute name="Specification-Vendor" value="The Apache Software 
Foundation"/>
+        <attribute name="Specification-Title" value="Apache Wave Export/Import 
Utilities"/>
+        <attribute name="Specification-Version" value="${waveinabox.version}"/>
+        <attribute name="Implementation-Vendor" value="The Apache Software 
Foundation"/>
+        <attribute name="Implementation-Title" value="Apache Wave 
Export/Import Utilities"/>
+        <attribute name="Implementation-Version" 
value="${waveinabox.version}"/>
+        <attribute name="Built-By" value="${user.name}"/>
+      </manifest>
+      <metainf dir="." includes="LICENSE, NOTICE" />
+    </jar>
+    <touch file="${dep}/dist-export-import"/>
+  </target>
+
+  <!-- This rule should be run whenever the build configuration (i.e. build 
files, libraries) is changed -->
+  <target name="dist-test" depends="dist, test" description="Runs all the unit 
tests in the project against the jar files">
+    <taskdef name="junit" 
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
+      <classpath refid="test.libpath"/>
+    </taskdef>
+
+    <junit fork="yes" showoutput="no" haltonerror="yes">
+      <classpath>
+        <path refid="libpath"/>
+        <path refid="test.libpath"/>
+        <pathelement location="${server.jar.out}"/>
+        <pathelement location="${build.test.dir}"/>
+      </classpath>
+      <batchtest>
+        <fileset dir="${test.dir}">
+          <include name="**/*Test.java"/>
+        </fileset>
+      </batchtest>
+      <formatter type="xml"/>
+    </junit>
+  </target>
+
+  <!--=====
+      Release creation
+      ======-->
+
+  <target name="release" depends="release-bin,release-src" 
description="Creates unsigned release">
+  </target>
+
+  <target name="release-src" description="Creates unsigned tar+zip for server 
source release">
+    <delete file="${dist.dir}/${release.src.path}.tar.bz2" />
+    <delete file="${dist.dir}/${release.src.path}.zip" />
+    <copy file="LICENSE.src" tofile="LICENSE" />
+    <copy file="NOTICE.src" tofile="NOTICE" />
+    <tar destfile="${dist.dir}/${release.src.path}.tar" longfile="gnu">
+      <!-- Include everything except built stuff in tree -->
+      <tarfileset dir="." prefix="${release.src.path}">
+        <exclude name="build/" />
+        <exclude name="dist/" />
+        <exclude name="_*/" />
+        <exclude name="bin/" />
+        <exclude name="gen/" />
+        <exclude name="test_out/" />
+        <exclude name="third_party/" />
+        <exclude name="war/webclient/" />
+        <exclude name="gwt-unitCache/" />
+        <exclude name="LICENSE.*" />
+        <exclude name="NOTICE.*" />
+      </tarfileset>
+      <!-- Setup permissions -->
+      <tarfileset dir="." prefix="${release.src.path}" filemode="755">
+        <include name="check-certificates.sh" />
+        <include name="make_cert.sh" />
+        <include name="run-server.sh" />
+        <include name="run-export.sh" />
+        <include name="run-import.sh" />
+      </tarfileset>
+    </tar>
+    <bzip2 destfile="${dist.dir}/${release.src.path}.tar.bz2" 
src="${dist.dir}/${release.src.path}.tar" />
+    <zip destfile="${dist.dir}/${release.src.path}.zip">
+      <tarfileset src="${dist.dir}/${release.src.path}.tar" />
+    </zip>
+    <delete file="${dist.dir}/${release.src.path}.tar" />
+    <delete file="LICENSE" />
+    <delete file="NOTICE" />
+  </target>
+
+  <target name="release-bin" depends="compile-gwt, dist-server, 
dist-export-import" description="Creates unsigned tar+zip for server binary 
release">
+    <delete file="${dist.dir}/${release.bin.path}.tar.bz2"/>
+    <delete file="${dist.dir}/${release.bin.path}.zip"/>
+    <antcall target="gen-server-config"/> 
+    <copy file="LICENSE.bin" tofile="LICENSE" />
+    <copy file="NOTICE.bin" tofile="NOTICE" />
+    <tar destfile="${dist.dir}/${release.bin.path}.tar" longfile="gnu">
+      <!-- Actual jars -->
+      <tarfileset dir="${dist.dir}" includes="*.jar" 
prefix="${release.bin.path}/dist" />
+      <tarfileset dir="${basedir}" prefix="${release.bin.path}">
+        <!-- Documentation + Licensing -->
+        <include name="CHANGES" />
+        <include name="DISCLAIMER" />
+        <include name="KEYS" />
+        <include name="LICENSE" />
+        <include name="NOTICE" />
+        <include name="README" />
+        <include name="README.export-import" />
+        <include name="RELEASE-NOTES" />
+        <include name="THANKS" />
+        <!-- Helper scripts -->
+        <include name="process-script-args.sh" />
+        <!-- Configuration -->
+        <include name="build.properties" />
+        <include name="jaas.config" />
+        <include name="jsongadgets.json" />
+        <include name="server.config.example" />
+        <include name="server.config" />
+        <include name="server-config.xml" />
+        <include name="server.federation.config" />
+        <include name="server.federation.config.example" />
+        <include name="wiab-logging.conf" />
+      </tarfileset>
+      <!-- Helper scripts -->
+      <tarfileset dir="${basedir}" prefix="${release.bin.path}" filemode="755">
+        <include name="check-certificates.sh" />
+        <include name="make_cert.sh" />
+        <include name="run-server.sh" />
+        <include name="run-server.bat" />
+        <include name="run-export.sh" />
+        <include name="run-import.sh" />
+        <include name="run-solr.sh" />
+        <include name="run-solr.bat" />
+      </tarfileset>
+      <!-- WAR static content -->
+      <tarfileset dir="." includes="war/" prefix="${release.bin.path}" />
+      <tarfileset dir="." includes="thumbnail_patterns/" 
prefix="${release.bin.path}" />
+      <tarfileset dir="." includes="platforms/" prefix="${release.bin.path}" />
+    </tar>
+    <bzip2 destfile="${dist.dir}/${release.bin.path}.tar.bz2" 
src="${dist.dir}/${release.bin.path}.tar" />
+    <zip destfile="${dist.dir}/${release.bin.path}.zip">
+      <tarfileset src="${dist.dir}/${release.bin.path}.tar" />
+    </zip>
+    <delete file="${dist.dir}/${release.bin.path}.tar"/>
+    <delete file="LICENSE" />
+    <delete file="NOTICE" />
+  </target>
+
+  <target name="gen-server-config">
+    <ant antfile="server-config.xml" />
+  </target>
+
+  <!-- TODO: re-use these when the api code is useful again -->
+  <target name="release-robot-client-api" depends="dist-libraries" 
description="Creates a zip for the java robot client release">
+    <delete file="${dist.dir}/${release.robot.name}"/>
+    <zip destfile="${dist.dir}/${release.robot.name}">
+      <zipfileset dir="${dist.dir}" includes="model.jar"/>
+      <zipfileset dir="${dist.dir}" 
includes="wave-api-${waveinabox.version}.jar"/>
+      <zipfileset dir="${lib.dir}/runtime/commons_codec" includes="*.jar"/>
+      <zipfileset dir="${lib.dir}/runtime/gson" includes="*.jar"/>
+      <zipfileset dir="${lib.dir}/runtime/jdo" includes="*.jar"/>
+      <zipfileset dir="${lib.dir}/runtime/oauth" includes="*.jar"/>
+      <zipfileset dir="${basedir}" includes="COPYING"/>
+    </zip>
+  </target>
+
+  <target name="release-robot-client-python-api" description="Creates a zip 
for the python robot client release">
+    <delete file="${dist.dir}/${release.robot.python.name}"/>
+    <zip destfile="${dist.dir}/${release.robot.python.name}">
+      <zipfileset dir="${src.dir}/python/api" includes="**/*.py"/>
+      <zipfileset dir="${basedir}" includes="COPYING"/>
+    </zip>
+  </target>
+
+  <!--=====
+      Other
+      ======-->
+
+  <!-- TODO: move notices/licenses as required? -->
+  <!-- TODO: checksums? Most of these could be intercepted during download! -->
+  <target name="get-third-party" depends="init, get-third-party-codegen, 
get-third-party-runtime, get-third-party-test" description="Download all third 
party dependencies">
+  </target>
+
+  <target name="get-third-party-codegen" description="Download code generating 
third party dependencies">
+    <get dest="${lib.codegen}" usetimestamp="true" skipexisting="true">
+      <url url="http://www.antlr3.org/download/antlr-3.2.jar"; />
+      <url 
url="http://central.maven.org/maven2/com/google/gwt/gwt-dev/2.6.1/gwt-dev-2.6.1.jar";
 />
+      <url 
url="http://central.maven.org/maven2/com/google/gwt/gwt-user/2.6.1/gwt-user-2.6.1.jar";
 />
+      <url 
url="http://central.maven.org/maven2/com/google/gwt/gwt-codeserver/2.6.1/gwt-codeserver-2.6.1.jar";
 />
+      <url 
url="http://repo1.maven.org/maven2/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar";
 />
+      <url 
url="http://repo1.maven.org/maven2/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final-sources.jar";
 />
+      <url 
url="https://archive.apache.org/dist/velocity/engine/1.6.3/velocity-1.6.3.jar"; 
/>
+      <url 
url="https://archive.apache.org/dist/velocity/engine/1.6.3/velocity-1.6.3-dep.jar";
 />
+    </get>
+  </target>
+
+  <target name="get-jetty-dep" description="Download run time third party 
dependencies">
+       <get dest="${lib.runtime}" usetimestamp="true" skipexisting="true">
+         <url 
url="https://olex-secure.openlogic.com/content/openlogic/jetty/9.1.1/jetty-distribution-9.1.1.v20140108.zip";
 />
+       </get>
+       <unzip src="${lib.runtime}/jetty-distribution-9.1.1.v20140108.zip" 
dest="${lib.runtime}">
+         <patternset>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/jetty-client-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/jetty-annotations-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/jetty-continuation-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/jetty-http-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/jetty-io-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/jetty-proxy-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/jetty-security-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/jetty-server-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/jetty-servlet-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/jetty-servlets-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/jetty-util-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/jetty-webapp-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/jetty-xml-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/servlet-api-3.1.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/websocket/websocket-api-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/websocket/websocket-client-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/websocket/websocket-common-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/websocket/websocket-server-9.1.1.v20140108.jar"/>
+        <include 
name="jetty-distribution-9.1.1.v20140108/lib/websocket/websocket-servlet-9.1.1.v20140108.jar"/>
+      </patternset>
+         <mapper type="flatten"/>
+    </unzip>
+  </target>
+
+  <target name="get-atmosphere-dep" description="Download atmosphere framework 
runtime, java and javascript dependencies">
+    <get dest="${lib.runtime}" usetimestamp="true" skipexisting="true">
+      <url 
url="https://oss.sonatype.org/service/local/repositories/releases/content/org/atmosphere/atmosphere-runtime/2.1.0/atmosphere-runtime-2.1.0.jar";
 />
+      <url 
url="https://oss.sonatype.org/service/local/repositories/releases/content/org/atmosphere/atmosphere-guice/0.8.3/atmosphere-guice-0.8.3.jar";
 />
+      <url 
url="https://oss.sonatype.org/service/local/repositories/releases/content/eu/infomas/annotation-detector/3.0.0/annotation-detector-3.0.0.jar";
 />
+      <url 
url="https://oss.sonatype.org/service/local/repositories/releases/content/org/slf4j/slf4j-simple/1.6.1/slf4j-simple-1.6.1.jar";
 />
+      <url 
url="https://oss.sonatype.org/service/local/repositories/releases/content/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar";
 />
+      <url 
url="https://oss.sonatype.org/service/local/repositories/releases/content/org/atmosphere/client/javascript/2.1.5/javascript-2.1.5.war";
  />
+    </get>
+    <!-- Add Atmosphere Framework javascript client to the server classpath  
-->
+    <unzip src="${lib.runtime}/javascript-2.1.5.war" 
dest="${lib.runtime}/javascript-2.1.5" >
+     <patternset>
+         <include name="javascript/atmosphere-min.js"/>
+         <include name="javascript/atmosphere.js"/>
+     </patternset>
+    </unzip>
+    <copy file="${lib.runtime}/javascript-2.1.5/javascript/atmosphere.js" 
todir="${src.dir}/org/waveprotocol/box/server/rpc/atmosphere" />
+    <copy file="${lib.runtime}/javascript-2.1.5/javascript/atmosphere-min.js" 
todir="${src.dir}/org/waveprotocol/box/server/rpc/atmosphere" />
+  </target>
+
+  <target name="get-third-party-runtime" depends="get-jetty-dep, 
get-atmosphere-dep" description="Download run time third party dependencies">
+    <get dest="${lib.runtime}" usetimestamp="true" skipexisting="true">
+      <url 
url="http://central.maven.org/maven2/aopalliance/aopalliance/1.0/aopalliance-1.0.jar";
 />
+      <url 
url="http://central.maven.org/maven2/org/bouncycastle/bcprov-jdk16/1.45/bcprov-jdk16-1.45.jar";
 />
+      <url 
url="http://central.maven.org/maven2/commons-fileupload/commons-fileupload/1.2.2/commons-fileupload-1.2.2.jar";
 />
+      <url 
url="https://archive.apache.org/dist/commons/fileupload/source/commons-fileupload-1.2.2-src.zip";
 />
+      <url 
url="http://central.maven.org/maven2/commons-cli/commons-cli/1.2/commons-cli-1.2.jar";
 />
+      <url 
url="http://central.maven.org/maven2/commons-codec/commons-codec/1.4/commons-codec-1.4.jar";
 />
+      <url 
url="https://archive.apache.org/dist/commons/codec/source/commons-codec-1.4-src.zip";
 />
+      <url 
url="http://central.maven.org/maven2/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar";
 />
+      <url 
url="http://central.maven.org/maven2/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar";
 />
+      <url 
url="http://central.maven.org/maven2/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar";
 />
+      <url 
url="https://archive.apache.org/dist/httpcomponents/commons-httpclient/source/commons-httpclient-3.1-src.zip";
 />
+      <url 
url="http://central.maven.org/maven2/commons-lang/commons-lang/2.5/commons-lang-2.5.jar";
 />
+      <url 
url="http://central.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-api.jar";
 />
+      <url 
url="http://central.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar";
 />
+      <url 
url="http://central.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar"; />
+      <url 
url="http://central.maven.org/maven2/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar";
 />
+      <url 
url="http://central.maven.org/maven2/com/google/guava/guava/15.0/guava-15.0.jar";
 />
+      <url 
url="http://central.maven.org/maven2/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar"/>
+      <url 
url="http://central.maven.org/maven2/com/google/inject/extensions/guice-assistedinject/3.0/guice-assistedinject-3.0.jar";
 />
+      <url 
url="http://central.maven.org/maven2/com/google/inject/extensions/guice-servlet/3.0/guice-servlet-3.0.jar";
 />
+      <url 
url="http://central.maven.org/maven2/com/google/inject/guice/3.0/guice-3.0.jar"; 
/>
+      <url 
url="http://central.maven.org/maven2/javax/inject/javax.inject/1/javax.inject-1.jar";
 />
+      <url 
url="http://central.maven.org/maven2/com/google/gxp/google-gxp/0.2.4-beta/google-gxp-0.2.4-beta.jar";
 />
+      <url 
url="http://people.apache.org/repo/m1-ibiblio-rsync-repository/javax.jdo/jars/jdo2-api-2.2.jar";
 />
+      <url 
url="http://central.maven.org/maven2/org/jdom/jdom/1.1.3/jdom-1.1.3.jar"; />
+      <url 
url="http://central.maven.org/maven2/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar";
 />
+      <url 
url="http://central.maven.org/maven2/jline/jline/0.9.94/jline-0.9.94.jar"; />
+      <url 
url="http://central.maven.org/maven2/joda-time/joda-time/1.6/joda-time-1.6.jar"; 
/>
+      <url 
url="http://central.maven.org/maven2/org/apache/lucene/lucene-core/3.5.0/lucene-core-3.5.0.jar";
 />
+      <url 
url="http://repo1.maven.org/maven2/org/mongodb/mongo-java-driver/2.11.2/mongo-java-driver-2.11.2.jar";
 />
+      <url 
url="https://oauth.googlecode.com/svn/code/maven/net/oauth/core/oauth-provider/20100527/oauth-provider-20100527-sources.jar";
 />
+      <url 
url="https://oauth.googlecode.com/svn/code/maven/net/oauth/core/oauth/20100527/oauth-20100527.jar";
 />
+      <url 
url="https://oauth.googlecode.com/svn/code/maven/net/oauth/core/oauth-provider/20100527/oauth-provider-20100527.jar";
 />
+      <url 
url="https://oauth.googlecode.com/svn/code/maven/net/oauth/core/oauth-consumer/20100527/oauth-consumer-20100527.jar";
 />
+      <url 
url="http://central.maven.org/maven2/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar";
 />
+      <url 
url="https://protobuf-java-format.googlecode.com/files/protobuf-format-java-1.1.jar";
 />
+      <url 
url="http://central.maven.org/maven2/org/igniterealtime/tinder/1.2.1/tinder-1.2.1.jar";
 />
+      <url 
url="http://central.maven.org/maven2/xpp3/xpp3/1.1.4c/xpp3-1.1.4c.jar"; />
+      <url 
url="http://central.maven.org/maven2/xpp3/xpp3_xpath/1.1.4c/xpp3_xpath-1.1.4c.jar";
 />
+      <url 
url="http://repo1.maven.org/maven2/org/gnu/inet/libidn/1.15/libidn-1.15.jar"; />
+      <url 
url="http://archiva.comunes.org/repository/comunes-snapshots/cc/kune/gwt-initials-avatars-shared/1.0-SNAPSHOT/gwt-initials-avatars-shared-1.0-20140324.102812-16.jar";
 />
+      <url 
url="http://archiva.comunes.org/repository/comunes-snapshots/cc/kune/gwt-initials-avatars-shared/1.0-SNAPSHOT/gwt-initials-avatars-shared-1.0-20140324.102812-16-sources.jar";
 />
+      <url 
url="http://archiva.comunes.org/repository/comunes-snapshots/cc/kune/gwt-initials-avatars-server/1.0-SNAPSHOT/gwt-initials-avatars-server-1.0-20140324.102825-10.jar";
 />
+      <url 
url="http://central.maven.org/maven2/com/typesafe/config/1.2.1/config-1.2.1.jar";
 />
+    </get>
+    <get dest="${lib.runtime}/whack_1_0_0.zip" usetimestamp="true" 
skipexisting="true">
+      <url 
url="http://www.igniterealtime.org/downloadServlet?filename=whack/whack_1_0_0.zip";
 />
+    </get>
+    <unzip src="${lib.runtime}/whack_1_0_0.zip" dest="${lib.runtime}">
+      <patternset>
+        <include name="whack_1_0_0/whack.jar" />
+      </patternset>
+      <mapper type="flatten"/>
+    </unzip>
+  </target>
+
+  <target name="get-third-party-test" description="Download testing third 
party dependencies">
+    <get dest="${lib.test}" usetimestamp="true" skipexisting="true">
+      <url 
url="http://central.maven.org/maven2/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar";
 />
+      <url url="http://download.forge.objectweb.org/asm/asm-3.2.jar"; />
+      <url url="http://central.maven.org/maven2/cglib/cglib/2.2/cglib-2.2.jar"; 
/>
+      <url 
url="http://central.maven.org/maven2/emma/emma/2.0.5312/emma-2.0.5312.jar"; />
+      <url 
url="http://central.maven.org/maven2/emma/emma_ant/2.1.5320/emma_ant-2.1.5320.jar";
 />
+      <url url="https://hamcrest.googlecode.com/files/hamcrest-all-1.2.jar"; />
+      <url 
url="http://central.maven.org/maven2/org/jmock/jmock-junit3/2.6.0/jmock-junit3-2.6.0.jar";
 />
+      <url 
url="http://central.maven.org/maven2/org/jmock/jmock/2.6.0/jmock-2.6.0.jar"; />
+      <url 
url="http://central.maven.org/maven2/junit/junit/4.10/junit-4.10.jar"; />
+      <url 
url="http://central.maven.org/maven2/org/mockito/mockito-all/1.9.5/mockito-all-1.9.5.jar";
 />
+    </get>
+  </target>
+
+  <target name="get-third-party-release-dep" depends="init" 
description="Download release tool third party dependencies">
+    <get dest="${lib.release}" usetimestamp="true" skipexisting="true">
+      <url 
url="http://apache.spd.co.il/creadur/apache-rat-0.10/apache-rat-0.10-bin.zip"; />
+    </get>
+    <unzip src="${lib.release}/apache-rat-0.10-bin.zip" dest="${lib.release}">
+      <patternset>
+        <include name="apache-rat-0.10/apache-rat-0.10.jar"/>
+      </patternset>
+      <mapper type="flatten"/>
+    </unzip>
+  </target>
+
+  <target name="get-third-party-solr-dep" depends="init" description="Download 
Solr third party dependencies.">
+    <get dest="${lib.solr}" usetimestamp="true" skipexisting="true">
+      <url url="http://apache.spd.co.il/lucene/solr/4.9.1/solr-4.9.1.zip"; />
+    </get>
+    <unzip src="${lib.solr}/solr-4.9.1.zip" dest="${lib.solr}">
+      <patternset>
+        <include name="solr-4.9.1/example/"/>
+      </patternset>
+    </unzip>
+  </target>
+
+  <target name="audit-licenses" depends="get-third-party-release-dep" 
description="Run the Apache Rat - release audit tool.">
+    <taskdef resource="org/apache/rat/anttasks/antlib.xml">
+        <classpath>
+          <pathelement location="${lib.release}/apache-rat-0.10.jar"/>
+        </classpath>
+    </taskdef>
+    <report>
+      <fileset dir="src"/>
+     </report>
+  </target>
+
+  <target name="doc" depends="stage" description="Builds the Java 
documentation for the mode, protocol, and Wave in a Box">
+    <javadoc sourcepath="${src.dir}" destdir="${docs.dir}" linksource="yes" 
author="yes" protected="yes"
+        windowtitle="${ant.project.name} Documentation">
+      <classpath>
+        <pathelement location="${staging.dir}" />
+        <path refid="libpath"/>
+        <path location="${build.proto.dir}"/>
+      </classpath>
+      <doctitle>${ant.project.name}</doctitle>
+      <footer>&lt;a href="http://www.waveprotocol.org/"&gt;Wave 
Project&lt;a/&gt;</footer>
+    </javadoc>
+  </target>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/7d8609e7/build-classpath.xml
----------------------------------------------------------------------
diff --git a/build-classpath.xml b/build-classpath.xml
deleted file mode 100644
index 9a76dd4..0000000
--- a/build-classpath.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- * Author: [email protected] (Alex North)
- -->
-<project name="classpath">
-  <!-- Classpath of external dependencies -->
-  <path id="libpath">
-    <fileset dir="${lib.runtime}">
-      <include name="*.jar"/>
-    </fileset>
-    <fileset dir="${lib.codegen}">
-      <include name="*.jar"/>
-    </fileset>
-    <fileset dir="${lib.test}">
-      <include name="*.jar"/>
-    </fileset>
-    <!-- PST -->
-    <fileset dir="${dist.dir}">
-      <include name="pst.jar"/>
-    </fileset>
-  </path>
-
-  <!-- Classpath for testing only -->
-  <path id="test.libpath">
-    <fileset dir="${lib.test}">
-      <include name="*.jar"/>
-    </fileset>
-  </path>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/7d8609e7/build-common.xml
----------------------------------------------------------------------
diff --git a/build-common.xml b/build-common.xml
deleted file mode 100644
index 3035d43..0000000
--- a/build-common.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- * Author: [email protected] (Alex North)
- -->
-<project>
-  <import file="${build.classpath.path}"/>
-
-  <!-- 
-  Compiles the sources referenced by the "srcs" patternset.
-
-  The model for these rules is that buildjava's source path includes the
-  entire universe of all source, but small fragements of it are compiled
-  one by one as specificed by a subproject's 'srcs' pattern.
-  -->
-  <target name="compile">
-    <echo message="Compiling ${libname}"/>
-    <buildjava destdir="${build.src.dir}" srcpattern="srcs">
-      <src path="${src.dir}"/>
-      <classpath>
-        <path refid="libpath"/>
-        <path location="${build.proto.dir}"/>
-        <path location="${build.messages.dir}"/>
-      </classpath>
-    </buildjava>
-  </target>
-
-  <!-- 
-  Compiles the tests referenced by the "srcs" patternset.
-  -->
-  <target name="compile-tests">
-    <buildjava srcdir="${test.dir}" destdir="${build.test.dir}" 
srcpattern="srcs">
-      <classpath>
-        <path refid="libpath"/>
-        <path location="${build.src.dir}"/>
-        <path location="${build.proto.dir}"/>
-        <path location="${build.messages.dir}"/>
-      </classpath>
-    </buildjava>
-  </target>
-
-  <!--
-  Packages compiled and source files into jars
-  -->
-  <target name="dist" depends="compile">
-    <distlib srcpattern="srcs" libname="${libname}"/>
-  </target>
-
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/7d8609e7/build-libraries-proto.xml
----------------------------------------------------------------------
diff --git a/build-libraries-proto.xml b/build-libraries-proto.xml
deleted file mode 100644
index fbbb96d..0000000
--- a/build-libraries-proto.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- * Author: [email protected] (Soren Lassen)
- -->
-<project name="Federation Protocol Buffers Code Generation" default="compile">
-  <description>Generation of Protocol Buffers</description>
-
-  <property file="build.properties"/>
-  <property file="build-proto.properties"/>
-  <property name="protoc" location="${protoc_dist}/src/protoc"/>
-
-<!-- ================================= 
-        target: compile              
-       ================================= -->
-  <target name="compile" description="Generates the proto_src source files">
-    <exec executable="${protoc}">
-      <arg value="--proto_path=${src.dir}/"/>
-      <arg value="--proto_path=${protoc_dist}/src/"/>
-      <arg value="--java_out=proto_src"/>
-      <arg 
value="${src.dir}/org/waveprotocol/wave/federation/federation.protodevel"/>
-    </exec>
-
-    <exec executable="${protoc}">
-      <arg value="--proto_path=${src.dir}/"/>
-      <arg value="--proto_path=${protoc_dist}/src/"/>
-      <arg value="--java_out=proto_src"/>
-      <arg 
value="${src.dir}/org/waveprotocol/wave/federation/federation_error.protodevel"/>
-    </exec>
-  </target>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/7d8609e7/build-macros.xml
----------------------------------------------------------------------
diff --git a/build-macros.xml b/build-macros.xml
deleted file mode 100644
index dcab9ac..0000000
--- a/build-macros.xml
+++ /dev/null
@@ -1,199 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- * Author: [email protected] (Alex North)
- -->
-<project name="macros">
-  <!-- Macro which compiles a set of PST message templates -->
-  <macrodef name="pstmessage">
-    <attribute name="proto" description="Protocol buffer class file"/>
-    <sequential>
-      <runpst proto="@{proto}"
-        templates='"${src.dir}/org/waveprotocol/pst/templates/api/api.st"
-                   
"${src.dir}/org/waveprotocol/pst/templates/builder/builder.st"
-                   "${src.dir}/org/waveprotocol/pst/templates/pojo/pojo.st"
-                   "${src.dir}/org/waveprotocol/pst/templates/jso/jso.st"
-                   "${src.dir}/org/waveprotocol/pst/templates/util/util.st"
-                   "${src.dir}/org/waveprotocol/pst/templates/gson/gson.st"
-                   "${src.dir}/org/waveprotocol/pst/templates/proto/proto.st"'
-        outputdir="${gen.dir}/messages"/>
-    </sequential>
-  </macrodef>
-
-  <!-- Macro which runs the PST compiler.
-       Don't use this directly, use pstmessage. -->
-  <macrodef name="runpst">
-    <attribute name="proto" description="Protocol buffer class file"/>
-    <attribute name="templates" description="Template files"/>
-    <attribute name="outputdir" description="Output directory"/>
-    <sequential>
-      <java failonerror="true" fork="true" 
classname="org.waveprotocol.pst.PstMain">
-        <classpath>
-          <path refid="libpath"/>
-          <path location="${dist.dir}/pst.jar"/>
-          <path location="${build.proto.dir}"/>
-          <fileset dir="${lib.codegen}">
-            <include name="*/*.jar"/>
-          </fileset>
-        </classpath>
-        <arg line="-s pst"/>
-        <arg value="-d"/><arg value="@{outputdir}"/>
-        <arg value="-f"/><arg value="@{proto}"/>
-        <arg line="@{templates}"/>
-      </java>
-    </sequential>
-  </macrodef>
-
-  <!-- Macro which builds a collection of sources -->
-  <macrodef name="buildjava">
-    <attribute name="srcpattern" description="Pattern id describing files to 
build"
-        default="default-src-pattern"/>
-    <!--attribute name="srcdir" description="Source root directory"/-->
-    <attribute name="destdir" description="Build root directory"/>
-    <element name="javac-elements" description="Extra elements to pass to 
javac" implicit="true"/>
-    <sequential>
-      <patternset id="default-src-pattern">
-        <include name="**/*.java"/>
-      </patternset>
-      <javac destdir="@{destdir}" debug="true">
-        <exclude name="org/waveprotocol/pst/**"/>
-        <patternset refid="@{srcpattern}"/>
-        <compilerarg value="-Xlint:all"/>
-        <compilerarg value="-Xlint:-serial"/>
-        <!-- Deprecation warnings are generated for .class files for some
-             compilers, e.g. org.hamcrest.Matcher -> org.hamcrest.BaseMatcher. 
-->
-        <compilerarg value="-Xlint:-deprecation"/>
-        <compilerarg value="-Werror"/>
-        <javac-elements/>
-      </javac>
-    </sequential>
-  </macrodef>
-
-  <!-- TODO(akaplanov): remove this and use buildjava after protobuf issue
-       https://code.google.com/p/protobuf/issues/detail?id=323 will be fixed 
-->
-  <macrodef name="buildproto">
-    <attribute name="srcpattern" description="Pattern id describing files to 
build"
-        default="default-src-pattern"/>
-    <!--attribute name="srcdir" description="Source root directory"/-->
-    <attribute name="destdir" description="Build root directory"/>
-    <element name="javac-elements" description="Extra elements to pass to 
javac" implicit="true"/>
-    <sequential>
-      <patternset id="default-src-pattern">
-        <include name="**/*.java"/>
-      </patternset>
-      <javac destdir="@{destdir}" debug="true">
-        <exclude name="org/waveprotocol/pst/**"/>
-        <patternset refid="@{srcpattern}"/>
-        <compilerarg value="-Xlint:none"/>
-        <javac-elements/>
-      </javac>
-    </sequential>
-  </macrodef>
-  
-  <!-- Macro which packages class and source files into jars -->
-  <macrodef name="distlib">
-    <attribute name="srcpattern" description="Pattern id describing files to 
package"/>
-    <attribute name="libname" description="Name prefix for the jars"/>
-    <sequential>
-      <jar destfile="${dist.dir}/@{libname}.jar" basedir="${build.src.dir}">
-        <patternset refid="@{srcpattern}"/>
-      </jar>
-      <jar destfile="${dist.dir}/@{libname}-src.jar" basedir="${src.dir}">
-        <patternset refid="@{srcpattern}"/>
-        <patternset>
-          <exclude name="**/build.xml"/>
-        </patternset>
-      </jar>
-    </sequential>
-  </macrodef>
-
-  <!-- Macro which runs unit tests with JUnit -->
-  <macrodef name="runtests">
-    <attribute name="forkmode" description="How to fork the JVM for each 
test/batch"/>
-    <attribute name="coverage" description="Whether to calculate coverage with 
EMMA"/>
-    <element name="tests" description="Fileset describing tests to run" 
implicit="true"/>
-    <sequential>
-      <delete dir="${test.out.dir}"/>
-      <mkdir dir="${test.out.dir}"/>
-
-      <!-- Add instrumentation code -->
-      <emma enabled="@{coverage}">
-        <instr instrpath="${build.src.dir}" destdir="${coverage.dir}"
-          metadatafile="${coverage.dir}/metadata.emma" mode="copy"/>
-      </emma>
-
-      <junit fork="yes" forkmode="@{forkmode}" printsummary="yes"
-          showoutput="no" haltonfailure="no" failureProperty="test.failed">
-        <jvmarg value="-Xmx512M"/>
-       <jvmarg value="-XX:-UseSplitVerifier"/>
-        <jvmarg value="-ea"/>
-        <!-- Emma arguments -->
-        <jvmarg value="-Demma.coverage.out.file=${coverage.dir}/coverage.emma" 
/>
-        <jvmarg value="-Demma.coverage.out.merge=true" />
-
-        <!-- This classpath includes src folders for the gwt.xml files -->
-        <classpath>
-          <path location="${coverage.dir}"/>
-          <path location="${build.proto.dir}"/>
-          <path location="${build.messages.dir}"/>
-          <path location="${build.src.dir}"/>
-          <path location="${build.test.dir}"/>
-          <path location="${src.dir}"/>
-          <path location="${test.dir}"/>
-          <path refid="libpath"/>
-          <path refid="test.libpath"/>
-        </classpath>
-
-        <!-- Set formatter so that the output is saved in xml files -->
-        <formatter type="xml"/>
-
-        <batchtest todir="${test.out.dir}">
-          <tests/>
-        </batchtest>
-      </junit>
-
-      <!-- Parses the xml files previously saved into readable HTML -->
-      <junitreport todir="${test.out.dir}">
-        <fileset dir="${test.out.dir}">
-          <include name="TEST*.xml"/> 
-        </fileset>
-        <report format="frames" todir="${test.out.dir}"/>
-      </junitreport>
-
-      <!-- Generates the Emma Report -->
-      <emma enabled="@{coverage}">
-        <report sourcepath="${src.dir}" depth="method">
-          <fileset dir="${coverage.dir}" >
-            <include name="*.emma" />
-          </fileset>
-          <html outfile="${coverage.dir}/coverage.html" />
-        </report>
-      </emma>
-
-      <echo>Test results: file://${test.out.dir}/index.html</echo>
-      <echo>Coverage results: file://${coverage.dir}/coverage.html</echo>
-      <fail message="Tests failed. Check log and/or reports: 
${test.out.dir}/index.html" if="test.failed"/>
-    </sequential>
-  </macrodef>
-
-  <target name="define-gxpc" depends="get-third-party-runtime">
-    <!-- Task which compiles GXP templates -->
-    <taskdef name="gxpc" classname="com.google.gxp.compiler.ant.GxpcTask"
-      classpath="${lib.runtime}/google-gxp-0.2.4-beta.jar" />
-  </target>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/7d8609e7/build-proto.properties.example
----------------------------------------------------------------------
diff --git a/build-proto.properties.example b/build-proto.properties.example
deleted file mode 100644
index 1adfd63..0000000
--- a/build-proto.properties.example
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# Copy this file to build-proto.properties and set the parameter below
-
-# Path to the unpacked and compiled protoc distribution
-protoc_dist=set_this_to_your_local_protoc_distribution

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/7d8609e7/build-proto.xml
----------------------------------------------------------------------
diff --git a/build-proto.xml b/build-proto.xml
deleted file mode 100644
index 501bb0a..0000000
--- a/build-proto.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- * Author: [email protected] (Soren Lassen)
- -->
-<project name="waveinabox_proto" default="all">
-  <description>Generation of Protocol Buffers</description>
-
-  <property file="build.properties" />
-  <property file="build-proto.properties" />
-  <property name="protoc" location="${protoc_dist}/src/protoc" />
-
-  <!-- Macros. -->
-  <macrodef name="protoc" description="Runs the protobuf compiler">
-    <attribute name="proto" description="The protobuf source"/>
-    <sequential>
-      <exec executable="${protoc}">
-        <arg value="--proto_path=${src.dir}" />
-        <arg value="--proto_path=${protoc_dist}/src" />
-        <arg value="--java_out=proto_src" />
-        <arg value="@{proto}" />
-      </exec>
-    </sequential>
-  </macrodef>
-
-  <!-- Targets. -->
-  <target name="init">
-    <mkdir dir="proto_src" />
-  </target>
-
-  <target name="all" depends="compile" description="Compiles Java
-      and Javascript classes from protocol buffers" />
-
-  <target name="compile" depends="init" description="Compiles Java files from 
protocol buffers">
-    <protoc 
proto="${src.dir}/org/waveprotocol/box/common/comms/waveclient-rpc.proto" />
-    <protoc proto="${src.dir}/org/waveprotocol/box/profile/profiles.proto"/>
-    <protoc proto="${src.dir}/org/waveprotocol/box/search/search.proto"/>
-    <protoc 
proto="${src.dir}/org/waveprotocol/box/server/persistence/protos/account-store.proto"
 />
-    <protoc 
proto="${src.dir}/org/waveprotocol/box/server/persistence/protos/delta-store.proto"
 />
-    <protoc proto="${src.dir}/org/waveprotocol/box/server/rpc/rpc.proto" />
-    <protoc 
proto="${src.dir}/org/waveprotocol/box/attachment/attachment.proto" />
-    <protoc 
proto="${src.dir}/org/waveprotocol/wave/concurrencycontrol/clientserver.proto" 
/>
-    <protoc proto="${src.dir}/org/waveprotocol/wave/diff/diff.proto" />
-    <protoc 
proto="${src.dir}/org/waveprotocol/wave/federation/federation.protodevel"/>
-    <protoc 
proto="${src.dir}/org/waveprotocol/wave/federation/federation_error.protodevel" 
/>
-    <protoc proto="${src.dir}/org/waveprotocol/protobuf/extensions.proto" />
-  </target>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/7d8609e7/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..d068467
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,60 @@
+buildscript {
+    dependencies {
+        classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.0'
+    }
+}
+
+plugins {
+    id "org.nosphere.apache.rat" version "0.1.3"
+}
+
+allprojects {
+    apply plugin: 'eclipse';
+    apply plugin: 'idea';
+    group = 'Apache-Wave'
+    version = '0.4'
+}
+
+// Repositories
+repositories {
+    mavenCentral()
+}
+
+subprojects {
+    apply plugin: 'java';
+    //apply plugin: 'scala';
+    //apply plugin: 'checkstyle'
+    sourceCompatibility = 1.7
+    targetCompatibility = 1.7
+
+    compileJava{
+        options.incremental = true
+    }
+
+    test.ignoreFailures = true
+}
+
+project(':wave'){
+    dependencies {
+        compile project(':pst')
+    }
+}
+
+project(':pst'){
+    dependencies {
+        compile project(':wave-proto')
+    }
+}
+
+// Apache Rat Plugin
+rat {
+    // Input directory, defaults to '.'
+    inputDir = '.'
+    // XML and HTML reports directory, defaults to project.buildDir + 
'/reports/rat'
+    reportDir = project.file('reports/rat')
+    // List of exclude directives, defaults to ['**/.gradle/**']
+    excludes = ['**/build/**', 'reports/**', '.gradle/', '.idea/', 
'**/*.gradle',
+                '**/*.iml', '**/generated/**']
+    // Fail the build on rat errors, defaults to true
+    failOnError = false
+}

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/7d8609e7/build.properties
----------------------------------------------------------------------
diff --git a/build.properties b/build.properties
deleted file mode 100644
index 86aad10..0000000
--- a/build.properties
+++ /dev/null
@@ -1,80 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# Current versions
-waveinabox.version=0.6.0
-
-# Names
-name=wave-in-a-box
-release.binname=apache-wave-bin
-release.srcname=apache-wave-src
-
-#Release file paths
-release.bin.path=${release.binname}-${waveinabox.version}
-release.src.path=${release.srcname}-${waveinabox.version}
-
-# Build file paths
-build.classpath.path=${basedir}/build-classpath.xml
-build.common.path=${basedir}/build-common.xml
-build.macros.path=${basedir}/build-macros.xml
-build.sysclasspath=ignore
-
-# Source code dirs
-src.dir=${basedir}/src
-src.proto.dir=${basedir}/proto_src
-test.dir=${basedir}/test
-
-# Generated code (GXP and PST DTOs).
-gen.dir=${basedir}/gen
-
-# These libs are needed at runtime
-lib.dir=${basedir}/third_party
-
-# Libs meant for test and runtime respectively
-lib.test=${lib.dir}/test
-lib.runtime=${lib.dir}/runtime
-lib.codegen=${lib.dir}/codegen
-lib.release=${lib.dir}/release
-lib.solr=${lib.dir}/solr
-
-# Intermediary build directories (temporary)
-build.dir=${basedir}/build
-build.messages.dir=${build.dir}/messages
-build.proto.dir=${build.dir}/proto
-build.src.dir=${build.dir}/src
-build.test.dir=${build.dir}/test
-build.log.dir=${build.dir}/logs
-coverage.dir=${build.dir}/coverage
-staging.dir=${build.dir}/staging
-# Incremental task markers
-dep=${build.dir}/dep
-
-# These are final output directories
-dist.dir=${basedir}/dist
-dist.libraries.dir=${basedir}/dist/libraries
-test.out.dir=${basedir}/test_out
-docs.dir=${basedir}/doc
-api.jar.out=${dist.dir}/${name}-api-${waveinabox.version}.jar
-server.jar.out=${dist.dir}/${name}-server-${waveinabox.version}.jar
-consoleclient.jar.out=${dist.dir}/${name}-client-console-${waveinabox.version}.jar
-robotclient.jar.out=${dist.dir}/${name}-wave-api-${waveinabox.version}.jar
-export-import.jar.out=${dist.dir}/${name}-export-import-${waveinabox.version}.jar
-
-missing.dependencies.test=You need to execute the get-third-party target to 
download dependencies required for tests compilation, i.e. ant get-third-party.
-
-# Javac properties
-build.properties:javac.source = 1.7

Reply via email to