*** empty log message ***
[mir.git] / build.xml
index 3e3f1b2..54c9628 100755 (executable)
--- a/build.xml
+++ b/build.xml
     -        form of a war file
     -   * source-distribution
     -        Sets up a distributable version of mir as a
-    -        zipped version of the source tree
+    -        gzipped tar version of the source tree
+    -   * full-distribution
+    -        Sets up a distributable version of mir in the
+    -        form of a gzipped tar file with the sources
     -   * javadoc
     -        Generates the project's javadoc
     -->
 
   <!-- The temporary files made during the build process
        will be created here: -->
-  <property name="build.home"     value="./build"/>
-  <property name="build.classes"  value="./${build.home}/classes"/>
-  <property name="build.jars"  value="./${build.home}/jars"/>
-  <property name="build.javadoc"   value="${build.home}/javadoc"/>
+  <property name="build"     value="./build"/>
+  <property name="build.classes"  value="./${build}/classes"/>
+  <property name="build.jars"  value="./${build}/jars"/>
+  <property name="build.javadoc"   value="${build}/javadoc"/>
 
   <!-- retrieve environment variables -->
   <property environment="env"/>
-<!--
-  <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="tomcat.home"    value="${env.TOMCAT_HOME}"/>
 
 <!--
@@ -58,7 +55,6 @@
 
   <target name="debug" depends="compile-debug,generate-deployment-tree"
       description="Sets up a deployment directory with debug enabled">
-
   </target>
 
   <target name="generate-deployment-tree">
@@ -99,7 +95,7 @@
   </target>
 
   <target name="clean">
-    <delete dir="${build.home}"/>
+    <delete dir="${build}"/>
   </target>
 
   <!-- Construct the classpath -->
   <target name="compile" depends="prepare-compilation" unless="up.to.date"
           description="Creates the jars needed for a mir deployment">
           
-    <javac destdir="${build.classes}" deprecation="on">
+    <javac destdir="${build.classes}" debug="true" deprecation="off" source="1.3">
       <src path="source"/>
       <src path="etc/extrasource"/>
       <classpath refid="project.classpath"/>
     </javac>
 
+    <delete file="${build.jars}/mir.jar"/>
+
     <jar
        jarfile="${build.jars}/mir.jar">
       <fileset dir="${build.classes}" includes="**/*.class" />
     <mkdir  dir="${build.javadoc}"/>
   </target>
 
-  <target name="prepare-binary-distribution">
+  <target name="prepare-distribution">
     <mkdir  dir="${distribution.home}"/>
-    <delete dir="${build.home}/binarydist"/>
-    <mkdir  dir="${build.home}/binarydist"/>
+    <delete dir="${build}/dist"/>
+    <mkdir  dir="${build}/dist"/>
   </target>
 
-  <target name="binary-distribution" depends="prepare-binary-distribution">
+  <target name="distribution" depends="prepare-distribution">
     <antcall target="generate-deployment-tree">
-      <param name="destination" value="${build.home}/binarydist"/>
+      <param name="destination" value="${build}/dist"/>
     </antcall>
 
-    <zip zipfile="${distribution.home}/binary.zip" >
-      <fileset dir="${build.home}/binarydist" includes="**/*" />
-    </zip>
+    <tar tarfile="${distribution.home}/mir-${version}.tar.gz" compression="gzip">
+      <tarfileset dir="${build}/dist" includes="**/*" />
+    </tar>
   </target>
 
   <target name="prepare-source-distribution">
   </target>
 
   <target name="source-distribution" depends="prepare-source-distribution">
-    <zip zipfile="${distribution.home}/source.zip" >
+    <!--<zip zipfile="${distribution.home}/mir-source-${version}.zip" >
       <fileset dir="."
         includes="bundles/**/*,source/**/*,etc/**/*,meta/**/*,web/**/*,templates/**/*,dbscripts/**/*,lib/**/*,doc/**/*,build.xml" />
-    </zip>
+    </zip>-->
+    <tar tarfile="${distribution.home}/mir-source-${version}.tar.gz" compression="gzip">
+      <tarfileset dir="."
+        includes="bundles/**/*,source/**/*,etc/**/*,meta/**/*,web/**/*,templates/**/*,dbscripts/**/*,lib/**/*,doc/**/*,build.xml" />
+    </tar>
+
+  </target>
+  
+<!--  
+  
+  <target name="documentation-pdf" description="generates documentation into html form">
+      <xslt in="${temp}/docs/pdf/${document}.xml"
+            out="${temp}/docs/pdf/${document}.fo"
+            style=""/>
+
+      <java classname="org.apache.fop.apps.Fop" fork="yes">
+          <classpath>
+              <fileset dir="lib">
+                  <include name="*.jar"/>
+              </fileset>
+          </classpath>
+
+          <arg value="-fo"/>
+          <arg file="${temp}/docs/pdf/${document}.fo"/>
+          <arg file="${build}/pdfdocs/${document}.pdf"/>
+      </java>
+  </target>
+-->  
+  <target name="prepare-html">
+    <mkdir dir="${build}/xslt"/>
+    <unzip dest="${build}/xslt" src="doc/lib/docbook-xsl-1.70.1.zip"/>
+    <copy todir="${build}/xslt">
+      <fileset dir="doc/style">
+        <include name="*"/>
+      </fileset>
+    </copy>
+  </target>
+  
+  <target name="documentation-html" description="generates documentation into html form" depends="prepare-html">
+    <mkdir dir="${build}/htmldocs"/>
+
+    <xslt basedir="doc/installation" includes="*.xml"
+          destdir="${build}/htmldocs"
+          style="${build}/xslt/html.xsl"/>
+  </target>
 
+  <target name="full-distribution" depends="prepare-distribution,deploy,source-distribution">
+       <copy todir="${destination}/WEB-INF">
+             <fileset file="${distribution.home}/mir-source-${version}.tar.gz"/>
+           </copy>
+    <tar tarfile="${distribution.home}/mir-${version}.tar.gz" compression="gzip">
+      <tarfileset dir="bin" includes="**/*" />
+    </tar>
   </target>
 
 </project>