Updates for appspot
[zxing.git] / zxingorg / build.xml
index c88c246..7aeb4ec 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
- Copyright (C) 2008 Google Inc.
+ Copyright 2008 ZXing authors
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
   <property file="secrets.properties"/>
 
   <target name="init">
-               <tstamp/>
+    <tstamp/>
     <fail message="Please build 'core' first">
       <condition>
         <not>
         </not>
       </condition>
     </fail>
+    <fail message="Please build project javadoc first">
+      <condition>
+        <not>
+          <available file="../docs/javadoc" type="dir"/>
+        </not>
+      </condition>
+    </fail>
+    <fail message="Please set 'tomcat-home' in build.properties">
+      <condition>
+        <not>
+          <available file="${tomcat-home}" type="dir"/>
+        </not>
+      </condition>
+    </fail>
   </target>
 
-       <target name="build" depends="init">
-               <mkdir dir="web/WEB-INF/classes"/>
+  <target name="build" depends="init">
+    <mkdir dir="web/WEB-INF/classes"/>
     <copy file="../core/core.jar" todir="web/WEB-INF/lib" overwrite="true"/>
     <copy file="../javase/javase.jar" todir="web/WEB-INF/lib" overwrite="true"/>
     <javac srcdir="src"
            optimize="true"
            debug="true"
            deprecation="true">
-                       <classpath>
-                               <fileset dir="web/WEB-INF/lib">
-                                       <include name="*.jar"/>
-                               </fileset>
-                               <pathelement location="${tomcat-home}/lib/servlet-api.jar"/>
-                       </classpath>
-               </javac>
+      <classpath>
+        <fileset dir="web/WEB-INF/lib">
+          <include name="*.jar"/>
+        </fileset>
+        <pathelement location="${tomcat-home}/lib/servlet-api.jar"/>
+      </classpath>
+    </javac>
     <copy file="web/WEB-INF/web.xml.template" tofile="web/WEB-INF/web.xml" overwrite="true">
       <filterset>
         <filter token="EMAIL_PASSWORD" value="${emailPassword}"/>
         <include name="*.jar"/>
       </lib>
       <classes dir="web/WEB-INF/classes"/>
+      <webinf dir="web/WEB-INF">
+        <include name="appengine-web.xml"/>
+      </webinf>
       <fileset dir="web">
         <include name="*.jspx"/>
         <include name="*.png"/>
       </fileset>
+      <fileset dir="..">
+        <include name="docs/**"/>
+      </fileset>
     </war>
   </target>
 
-       <target name="clean">
+  <target name="clean">
     <delete dir="web/WEB-INF/web.xml"/>
     <delete dir="web/WEB-INF/classes"/>
     <delete file="web/WEB-INF/lib/core.jar"/>