Index: main/trunk/greenstone3/build.xml
===================================================================
--- main/trunk/greenstone3/build.xml	(revision 32337)
+++ main/trunk/greenstone3/build.xml	(revision 32338)
@@ -128,6 +128,4 @@
        https://stackoverflow.com/questions/113224/what-is-the-largest-tcp-ip-network-port-number-allowable-for-ipv4
   -->
-  <!--<if>
-    <bool><not><isset property="internal.tomcat.port"/></not></bool>-->
     <if>
       <bool>
@@ -147,10 +145,8 @@
 	</not>
       </bool>
-      <echo>ERROR: Unable to set tomcat.port.
+      <fail>ERROR: Unable to set tomcat.port.
       In file build.properties server.protocol=${server.protocol} and requires at minimum that its
       matching tomcat.port.${server.protocol} property line be set and is assigned a valid port number.
-      (Ensure any other enabled tomcat port is valid too)</echo>
-      <!--<echo>Uncomment at least the tomcat.${server.protocol}.port line in build.properties.</echo>-->
-      <!--<property name="internal.tomcat.port" value=""/>-->      
+      (Ensure any other enabled tomcat port is valid too)</fail>
       <else>
 	<condition property="internal.tomcat.port" value="${tomcat.port.https}" else="${tomcat.port.http}">
@@ -160,5 +156,4 @@
       </else>
     </if>
-  <!--</if>-->
 
   <!-- Set autogenerated properties (properties we calculate here in build.xml)
@@ -1091,15 +1086,4 @@
     <fail if="do.abort">Build aborted by user. Please change your properties settings and re-run the target</fail>
   </target>
-  
-  <!-- Need to list this first in depends for any target that will be using internal.tomcat.port -->
-  <target name="tomcat-init">
-    <if>
-      <bool><not><isset property="internal.tomcat.port"/></not></bool>
-      <fail>ERROR: no tomcat port, so tomcat operations won't proceed.
-      tomcat.${server.protocol}.port is not set or not valid.
-      Correct this in build.properties.</fail>
-    </if>
-  </target>
-
 
   <!-- this sets up some initial properties -->
@@ -1416,5 +1400,5 @@
   </target>
 
-  <target name="configure-web" depends="tomcat-init,init,perl-for-building"
+  <target name="configure-web" depends="init,perl-for-building"
     description="Configure only the web app config files">
     <!-- we want a unix path in the global.properties file -->
@@ -1586,5 +1570,5 @@
   <target name="configure-tomcat" depends="init,configure-tomcat-local,configure-tomcat-external"/>
   
-  <target name="configure-tomcat-local" depends="tomcat-init,init,perl-for-building" if="tomcat.islocal">
+  <target name="configure-tomcat-local" depends="init,perl-for-building" if="tomcat.islocal">
     <!-- re-setup the server.xml file -->
     <copy file="${basedir}/resources/tomcat/server_tomcat${tomcat.version.major}.xml.in"
@@ -1667,5 +1651,5 @@
        on how to use this with eclipse
     -->
-  <target name="debug-start-tomcat" description="Startup Tomcat for debugger" depends="tomcat-init,init" if="tomcat.islocal">
+  <target name="debug-start-tomcat" description="Startup Tomcat for debugger" depends="init" if="tomcat.islocal">
     <property name="tomcat.classpath" refid="local.tomcat.classpath"/>
     <property name="tomcat.path" refid="local.tomcat.path"/>
@@ -1733,5 +1717,5 @@
 
   <!-- Another way: http://ptrthomas.wordpress.com/2006/03/25/how-to-start-and-stop-tomcat-from-ant/ -->
-  <target name="force-start-tomcat" description="Startup only Tomcat" depends="tomcat-init,init" if="tomcat.islocal">
+  <target name="force-start-tomcat" description="Startup only Tomcat" depends="init" if="tomcat.islocal">
 
     <property name="tomcat.classpath" refid="local.tomcat.classpath"/>
@@ -1787,5 +1771,5 @@
 
   <!--ant task http: http://www.jajakarta.org/ant/ant-1.6.1/docs/ja/manual/api/org/apache/tools/ant/taskdefs/condition/Http.html-->
-  <target name="reconfigure" description="Reconfigure the message router" depends="tomcat-init">
+  <target name="reconfigure" description="Reconfigure the message router">
     <waitfor maxwait="5" maxwaitunit="second">
       <http url="${server.protocol}://${tomcat.server}:${internal.tomcat.port}${app.path}${server.default.servlet}?a=s&amp;sa=c"/>
@@ -1794,5 +1778,5 @@
 
   <!--Command-line args to Ant: http://www.jguru.com/faq/view.jsp?EID=471794-->
-  <target name="reconfigure-collection" description="Reconfigure the collection" depends="tomcat-init">
+  <target name="reconfigure-collection" description="Reconfigure the collection">
     <waitfor maxwait="5" maxwaitunit="second">
       <http url="${server.protocol}://${tomcat.server}:${internal.tomcat.port}${app.path}${server.default.servlet}?a=s&amp;sa=c&amp;sc=${collection}"/>
@@ -1827,5 +1811,5 @@
        might still be in use for some moments. We test the URL with the http condition since it's likelier to
        fail sooner if the server has indeed been stopped. -->
-  <target name="check-tomcat-running" depends="tomcat-init">
+  <target name="check-tomcat-running">
     <condition property="tomcat.isrunning">
       <!--<http url="${server.protocol}://${tomcat.server}:${internal.tomcat.port}${app.path}"/>-->
@@ -1855,5 +1839,5 @@
        both stop and start, both of which need to do tomcat checks. Each property can be set only once during 
        an invocation with ant. So ant restart will need two properties to store each of the tomcat checks -->
-  <target name="check-tomcat-started" depends="tomcat-init">
+  <target name="check-tomcat-started">
     <condition property="tomcat.isstarted">
       <http url="${server.protocol}://${tomcat.server}:${internal.tomcat.port}"/>
@@ -2147,5 +2131,5 @@
   </target>
 
-  <target name="soap-deploy-site" depends="tomcat-init,init,get-sitename,get-siteuri,get-webservices,create-deployment-files,deploy-site"
+  <target name="soap-deploy-site" depends="init,get-sitename,get-siteuri,get-webservices,create-deployment-files,deploy-site"
     description="Deploy a SOAP web service for a local Greenstone site. Tomcat must be running for this to work."/>
     
@@ -2160,5 +2144,5 @@
   </target>
   
-  <target name="soap-undeploy-site" depends="tomcat-init,get-undeploy-service-name"
+  <target name="soap-undeploy-site" depends="get-undeploy-service-name"
     description="Undeploy a SOAP web service for a local Greenstone site. Tomcat must be running for this to work.">
     <filter token="servicesname" value="${axis.undeploy.servicename}"/>
@@ -2178,5 +2162,5 @@
   <!-- this target used to deploy the default web service SOAPServer (base.webservice.name) on the localsite server
   with the default servicename of localsite-->
-  <target name="deploy-localsite" depends="tomcat-init,init" 
+  <target name="deploy-localsite" depends="init" 
     description="Deploy the SOAP server for localsite. Will start and stop Tomcat.">
     <antcall target="force-start-tomcat"/>
@@ -3489,5 +3473,5 @@
   </target>
     
-	<target name="run-collection-tests" depends="tomcat-init">
+	<target name="run-collection-tests">
 		<if><bool><not><available file="${basedir}/ext/testing" type="dir"/></not></bool>
 			<fail>The testing extension is not available. This is required to perform the tests. It can be acquired from SVN by running the command "svn co http://svn.greenstone.org/gs3-extensions/testing/trunk/src testing" in the ext directory of your Greenstone 3 installation. </fail>
