Index: greenstone3/trunk/build.xml
===================================================================
--- greenstone3/trunk/build.xml	(revision 15138)
+++ greenstone3/trunk/build.xml	(revision 15139)
@@ -17,8 +17,10 @@
 
 	<!-- ============ self defined tasks =================== -->
-	<taskdef name="mysetproxy" classname="org.greenstone.anttasks.MySetProxy" classpath="${basedir}/lib/java/anttasks.jar"/>
-	<taskdef name="getuserandpassword" classname="org.greenstone.anttasks.MyGetUserAndPassword" classpath="${basedir}/lib/java/anttasks.jar"/>
+	<taskdef name="mysetproxy" classname="org.greenstone.anttasks.MySetProxy" classpathref="project.classpath"/>
+	<taskdef name="getuserandpassword" classname="org.greenstone.anttasks.MyGetUserAndPassword" classpathref="project.classpath"/>
 	<taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
-	<taskdef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpath="${basedir}/lib/java/anttasks.jar"/>
+	<taskdef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
+	<taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
+	<taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/>
 
 <!-- ===================== Property Definitions =========================== -->
@@ -448,5 +450,5 @@
   <!-- if we are using java 1.5+, we need the xalan.jar file in web/WEB-INF/lib,  but if we are using java 1.4, we can't have it there -->
   <target name="configure-java-version" depends="init"
-    description="Run this target if you have changed the default version of java since installing greenstone3">
+    description="Activates or deactivates some jar libraries as needed depending on your java version">
 
 		<available property="have.xalan.jar" file="${web.lib}/xalan.jar"/>
@@ -458,42 +460,41 @@
 		</condition>
 
-		<condition property="do.deactivate.xalan.jar">
-			<and>
-				<isset property="have.xalan.jar"/>
-				<not><isset property="need.xalan.jar"/></not>
-			</and>
-		</condition>
-
-		<condition property="do.activate.xalan.jar">
-			<and>
-				<not><isset property="have.xalan.jar"/></not>
-				<isset property="need.xalan.jar"/>
-			</and>
-		</condition>
-		<!--
-		<echo>java version  : ${ant.java.version}</echo>
-		<echo>have xalan.jar: ${hava.xalan.jar}</echo>
-		<echo>need xalan.jar: ${need.xalan.jar}</echo>
-		<echo>activate?     : ${do.activate.xalan.jar}</echo>
-		<echo>deactivate?   : ${do.deactivate.xalan.jar}</echo>
-		-->
-
-    <antcall target="activate-xalan-jar"/>
-    <antcall target="deactivate-xalan-jar"/>
-
-  </target>
-  
-  <target name="activate-xalan-jar" if="do.activate.xalan.jar">
+		<!-- if they have xalan.jar but dont need it -->
+		<if>
+			<bool>
+				<and>
+					<isset property="have.xalan.jar"/>
+					<not><isset property="need.xalan.jar"/></not>
+				</and>
+			</bool>
+			<antcall target="deactivate-xalan-jar"/>
+		</if>
+
+		<!-- if they need xalan.jar but dont have it -->
+		<if>
+			<bool>
+				<and>
+					<not><isset property="have.xalan.jar"/></not>
+					<isset property="need.xalan.jar"/>
+				</and>
+			</bool>
+			<antcall target="activate-xalan-jar"/>
+		</if>
+
+  </target>
+  
+  <target name="activate-xalan-jar">
+		<echo>activating xalan.jar</echo>
     <copy file="${web.lib}/xalan.jar.tmp" tofile="${web.lib}/xalan.jar"/>
-    <antcall target="copy-xalan-for-mac" />
-  </target>
-
-  <target name="copy-xalan-for-mac" if="current.os.ismac">
-		<echo>installing xalan.jar</echo>
-		<copy file="${web.lib}/xalan.jar.tmp" tofile="${catalina.home}/common/endorsed/xalan.jar"/> 
-  </target>
-
-  <target name="deactivate-xalan-jar" if="do.deactivate.xalan.jar">
-		<echo>uninstalling xalan.jar</echo>
+		<if><bool><isset property="current.os.ismac"/></bool>
+			<copy file="${web.lib}/xalan.jar.tmp" tofile="${catalina.home}/common/endorsed/xalan.jar"/> 
+		</if>
+  </target>
+
+	<!-- to delete -->
+  <target name="copy-xalan-for-mac"></target>
+
+  <target name="deactivate-xalan-jar">
+		<echo>deactivating xalan.jar</echo>
     <delete file="${web.lib}/xalan.jar"/>
   </target>
