added encoding paramater to Producer.produce(). use it for featuresRSS so it can...
[mir.git] / build.xml
index f72143b..c6a64cc 100755 (executable)
--- a/build.xml
+++ b/build.xml
@@ -2,7 +2,7 @@
 
 
 <!-- What this file is all about
 
 
 <!-- What this file is all about
-     
+
      You can use this version of build.xml to use directly with ant
      i.e. without the build.sh script. Simply call ant and let it all
      happen.
      You can use this version of build.xml to use directly with ant
      i.e. without the build.sh script. Simply call ant and let it all
      happen.
@@ -49,7 +49,7 @@
 
        java.home          The location of your Java SDK.
 
 
        java.home          The location of your Java SDK.
 
-       java.localhome     Where your local java classes and jar files 
+       java.localhome     Where your local java classes and jar files
                        are located.
 
        tomcat.home        The location of the tomcat root directory.
                        are located.
 
        tomcat.home        The location of the tomcat root directory.
 
   <property name="app.name"       value="Mir"/>
   <property name="deploy.home"    value="../${app.name}"/>
 
   <property name="app.name"       value="Mir"/>
   <property name="deploy.home"    value="../${app.name}"/>
-  <property name="java.home"             value="/usr/lib/j2sdk1.3/"/>
-  <property name="java.localhome" value="/usr/share/java/"/>
-  <property name="tomcat.home"    value="/usr/share/tomcat/"/>
+
+  <!-- If you want to use the very good jikes compiler, uncomment this -->
+  <!-- <property name="build.compiler"   value="jikes"/>-->
 
 
 <!-- No customization required after this line -->
 
 
 
 <!-- No customization required after this line -->
 
+  <property environment="env"/>
   <property name="dist.home"      value="${deploy.home}"/>
   <property name="deploy.webinf"  value="${deploy.home}/WEB-INF"/>
   <property name="deploy.classes" value="${deploy.webinf}/classes"/>
   <property name="dist.src"       value="${app.name}.jar"/>
   <property name="dist.war"       value="${app.name}.war"/>
   <property name="javadoc.home"   value="${deploy.home}/javadoc"/>
   <property name="dist.home"      value="${deploy.home}"/>
   <property name="deploy.webinf"  value="${deploy.home}/WEB-INF"/>
   <property name="deploy.classes" value="${deploy.webinf}/classes"/>
   <property name="dist.src"       value="${app.name}.jar"/>
   <property name="dist.war"       value="${app.name}.war"/>
   <property name="javadoc.home"   value="${deploy.home}/javadoc"/>
+  <property name="tomcat.home"    value="${env.TOMCAT_HOME}"/>
+
 
 
   <!-- Construct the classpath -->
 
 
   <!-- Construct the classpath -->
     <fileset dir="lib">
       <include name="*.jar"/>
     </fileset>
     <fileset dir="lib">
       <include name="*.jar"/>
     </fileset>
-    <fileset dir="${java.home}/lib">
-      <include name="tools.jar"/>
-      <include name="rt.jar"/>
-    </fileset>
-    <fileset dir="${java.localhome}">
-      <include name="*.jar"/>
-    </fileset>
     <pathelement path="${tomcat.home}/lib/tomcat.jar"/>
     <pathelement path="${tomcat.home}/lib/tomcat.jar"/>
+  <!-- for libs shared between tomcat and webapps (tomcat 3.3.x) -->
+       <fileset dir="${tomcat.home}">
+               <include name="lib/common/*.jar" />
+       </fileset>
+  <!-- for libs shared between webapps (tomcat 3.3.x) -->
+       <fileset dir="${tomcat.home}">
+               <include name="lib/apps/*.jar" />
+       </fileset>
+  <!-- for libs shared between tomcat and webapps (tomcat 4.0.x) -->
+       <fileset dir="${tomcat.home}">
+               <include name="common/lib/*.jar" />
+       </fileset>
+  <!-- for libs shared between webapps (tomcat 4.0.x) -->
+       <fileset dir="${tomcat.home}">
+               <include name="lib/*.jar" />
+       </fileset>
   </path>
 
 
   </path>
 
 
         <exclude name="xerces.jar"/>
       </fileset>
     </copy>
         <exclude name="xerces.jar"/>
       </fileset>
     </copy>
-    <copy todir="${deploy.home}/WEB-INF/classes">
-      <fileset dir="bundles"/>
-    </copy>
     <mkdir  dir="${javadoc.home}"/>
     <mkdir  dir="${deploy.home}/log"/>
 
     <mkdir  dir="${javadoc.home}"/>
     <mkdir  dir="${deploy.home}/log"/>
 
     <delete dir="${deploy.home}"/>
   </target>
 
     <delete dir="${deploy.home}"/>
   </target>
 
-
+  <!-- drop out if $TOMCAT_HOME is not set>-->
+  <target name="testtomcat" unless="tomcat.present">
+    <fail message="the $$TOMCAT_HOME environment variable is not set or is set to the wrong path. Please set it first. giving up!"/>
+  </target>
 
 <!-- The "compile" target is used to compile (or recompile) the Java classes
      that make up this web application.  The recommended source code directory
 
 <!-- The "compile" target is used to compile (or recompile) the Java classes
      that make up this web application.  The recommended source code directory
 -->
 
   <target name="compile" depends="prepare">
 -->
 
   <target name="compile" depends="prepare">
-       <antcall target="clean"/>
+    <!-- check to see if $TOMCAT_HOME was set to something useful.. -->
+    <available file="${tomcat.home}/conf" property="tomcat.present"/>
+    <antcall target="testtomcat"/>
+
+    <!--<antcall target="clean"/>-->
+    <dependset>
+      <srcfileset
+        dir="source"
+        includes="**/*.java"/>
+      <srcfileset
+        dir="lib"
+        includes="*.jar"/>
+      <targetfileset
+        dir="${deploy.classes}"
+        includes="**/*.class"/>
+    </dependset>
     <javac srcdir="source" destdir="${deploy.classes}"
            debug="on" optimize="off" deprecation="on">
       <classpath refid="project.class.path"/>
     <javac srcdir="source" destdir="${deploy.classes}"
            debug="on" optimize="off" deprecation="on">
       <classpath refid="project.class.path"/>
-       </javac>
+    </javac>
     <copy   todir="${deploy.classes}">
       <fileset dir="source" includes="**/*.properties"/>
     </copy>
     <copy   todir="${deploy.home}">
       <fileset dir="source" includes="**/content-types.properties"/>
     <copy   todir="${deploy.classes}">
       <fileset dir="source" includes="**/*.properties"/>
     </copy>
     <copy   todir="${deploy.home}">
       <fileset dir="source" includes="**/content-types.properties"/>
+      <fileset dir="source" includes="**/server.xml"/>
     </copy>
     </copy>
-       <exec executable="./perms.sh"/>
+    <copy   todir="${deploy.classes}/bundles">
+      <fileset dir="bundles" includes="**/*.properties"/>
+    </copy>
+  </target>
 
 
-<!--   <echo>
-               Now you should call perms.sh(-dist) in order to set
-               the permissions of your installed files to a meaningful
-               value. 
-               Have fun with Mir!
-       </echo>
--->
+
+
+  <target name="perms">
+       <exec executable="./perms.sh"/>
   </target>
 
 
   </target>