Index: /other-projects/trunk/gs3-webservices-democlient/build.xml
===================================================================
--- /other-projects/trunk/gs3-webservices-democlient/build.xml	(revision 15304)
+++ /other-projects/trunk/gs3-webservices-democlient/build.xml	(revision 15305)
@@ -19,5 +19,5 @@
  <property name="fedorags3.src" value="${fedorags3.rootdir}/org" />
  <property name="build" value="${basedir}/build" />
- <property name="bin" value="${basedir}/bin" />
+ <property name="dist" value="${basedir}/dist" />
  <property name="QBRdata.rel.path" value="org/greenstone/gs3client/data" />
  <property name="dlservices.rel.path" value="org/greenstone/gs3client/dlservices" />
@@ -27,5 +27,6 @@
  <property name="download.zip.name" value="gs3_webservices_democlient" />
  <property name="log4j.propFile" value="log4j.properties" />
- <property name="zip.excludes" value="bin/**,logs/**,gs3democlient.properties,${log4j.propFile}" />
+ <property name="zip.excludes" value="dist/**,logs/**,gs3democlient.properties" />
+
   <!-- ============ project classpath: everything in the lib folder =================== -->
  <path id="project.classpath">
@@ -41,9 +42,9 @@
 	<echo>- ant compile-demo-client</echo>
 	<echo>	for compiling the democlient</echo>
-	<echo>- fedoraGS3jar</echo>
+	<echo>- ant fedoraGS3jar</echo>
 	<echo>	for generating the fedoraGS3.jar dependency file</echo>
-	<echo>- QBRdatajar</echo>
+	<echo>- ant QBRdatajar</echo>
 	<echo>	for generating the QBRdata.jar dependency file</echo>
-	<echo>- generate-download</echo>
+	<echo>- ant make-dist</echo>
 	<echo>	for generating the zip/gzip/bzip file of the project</echo>
 	<echo>- ant clean-democlient</echo>
@@ -69,6 +70,7 @@
 </target>
 
-<target name="generate-download" description="Generates the zip file of the lib and src folders and the executable ${exec.jar.name} file" depends="get-ziptype,ensure-exec-jar" if="zip.type">
-     <mkdir dir="${bin}" />
+<target name="make-dist" description="Generates the zip file of the lib and src folders and the executable ${exec.jar.name} file" depends="get-zipformat,ensure-exec-jar" if="zip.type">
+     <mkdir dir="${dist}" />
+     <echo>zip.type=${zip.type}</echo>
      <antcall target="create-${zip.type}"/>
 </target>
@@ -103,8 +105,8 @@
     <fileset dir="logs"/>
     <fileset file="${log4j.propFile}"/>
-    <fileset file="${bin}/${download.zip.name}.tar"/>
-    <fileset file="${bin}/${download.zip.name}.tar.gz"/>
-    <fileset file="${bin}/${download.zip.name}.zip"/>
-    <fileset file="${bin}/${download.zip.name}.tar.bz2"/>
+    <fileset file="${dist}/${download.zip.name}.tar"/>
+    <fileset file="${dist}/${download.zip.name}.tar.gz"/>
+    <fileset file="${dist}/${download.zip.name}.zip"/>
+    <fileset file="${dist}/${download.zip.name}.tar.bz2"/>
    </delete>
 </target>
@@ -166,36 +168,34 @@
 </target>
 
-<!-- User input for generating compressed output file for one of the chosen file types (zip, gzip, or bzip)-->
-<target name="create-gzip" if="gzip" description="User chose to create a tar.gz file of the project">
-    <tar destfile="${bin}/${download.zip.name}.tar" basedir="${basedir}" excludes="${zip.excludes}" />
-    <gzip destfile="${bin}/${download.zip.name}.tar.gz" src="${bin}/${download.zip.name}.tar" />
-    <delete file="${bin}/${download.zip.name}.tar"/>
-</target>
-
-<target name="create-bzip" if="bzip" description="User chose to create a tar.bz2 file of the project">
-    <tar destfile="${bin}/${download.zip.name}.tar" basedir="${basedir}" excludes="${zip.excludes}"/>
-    <bzip2 destfile="${bin}/${download.zip.name}.tar.bz2" src="${bin}/${download.zip.name}.tar"/>
-    <delete file="${bin}/${download.zip.name}.tar"/>
-</target>
-
-<target name="create-zip" if="zip" description="User chose to create a zip file of the project">
-    <zip destfile="${bin}/${download.zip.name}.zip" basedir="${basedir}" excludes="${zip.excludes}"/>
-</target>
-
-<target name="get-ziptype"> 
+<!-- User input for generating compressed output file for one of the chosen file types. A choice of zip, tar.gz (tar gzip), or tar.bz2 (tar bzip)-->
+<target name="create-targzip" if="zip.type" description="User chose to create a tar.gz file of the project">
+    <tar destfile="${dist}/${download.zip.name}.tar.gz" basedir="${basedir}" compression="gzip" excludes="${zip.excludes}" /> 
+</target>
+
+<target name="create-tarbzip" if="zip.type" description="User chose to create a tar.bz2 file of the project">
+    <tar destfile="${dist}/${download.zip.name}.tar.bz2" basedir="${basedir}" compression="bzip2" excludes="${zip.excludes}" /> 
+</target>
+
+<target name="create-zip" if="zip.type" description="User chose to create a zip file of the project">
+     <zip basedir="${basedir}" destfile="${dist}/${download.zip.name}.zip" 
+	excludes="${zip.excludes}" />
+</target>
+
+<target name="get-zipformat"> 
 <!--<input addproperty="zip.type" validargs="zip,gzip,bzip">--><!-- doesn't work with default value-->
-    <input addproperty="zip.type" defaultvalue="zip">What type of compressed output file do you want to generate.
-Choose from zip, gzip (for tar.gz), bzip (tar.bz2)?
+    <input addproperty="zip.format" defaultvalue="zip">What type of compressed output file do you want to generate?
+Type one of: zip, tar.gz, tar.bz2
 Press enter for default: zip /></input>
     <echo>You chose output file type: ${zip.type}</echo>
-    <condition property="gzip"> 
-      <equals arg1="gzip" arg2="${zip.type}"/>
-    </condition>
-    <condition property="zip"> 
-      <equals arg1="zip" arg2="${zip.type}"/>
-    </condition>
-    <condition property="bzip"> 
-      <equals arg1="bzip" arg2="${zip.type}"/>
-    </condition>
+    <condition property="zip.type" value="targzip"> 
+      <equals arg1="tar.gz" arg2="${zip.format}"/>
+    </condition>
+    <condition property="zip.type" value="zip"> 
+      <equals arg1="zip" arg2="${zip.format}"/>
+    </condition>
+    <condition property="zip.type" value="tarbzip">
+      <equals arg1="tar.bz2" arg2="${zip.format}"/>
+    </condition>
+    <echo>zip.type=${zip.type}</echo>
   </target>
 </project>
