honour user CLASSPATH environment variable
[mir.git] / build.xml
index e56f8d4..e341018 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
     -->
@@ -40,6 +43,7 @@
   <property environment="env"/>
 
   <property name="tomcat.home"    value="${env.TOMCAT_HOME}"/>
+  <property name="user.classpath" value="${env.CLASSPATH}"/>
 
 <!--
   <property name="compile.optimize" value="off" />
 
   <!-- Construct the classpath -->
   <path id="project.classpath">
-    <fileset dir="lib">
+       
+       <!-- for libs installed by user or OS distribuitor -->
+       <fileset dir="${user.classpath}">
+         <include name="*.jar" />
+    </fileset>
+
+       <fileset dir="lib">
       <include name="*.jar"/>
     </fileset>
     <fileset dir="etc/extralib">
     </antcall>
 
     <tar tarfile="${distribution.home}/mir-${version}.tar.gz" compression="gzip">
-      <tarfileset dir="${build}/binarydist" includes="**/*" />
+      <tarfileset dir="${build}/dist" includes="**/*" />
     </tar>
   </target>
 
   </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>
   
           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>