Index: main/trunk/greenstone3/build.xml
===================================================================
--- main/trunk/greenstone3/build.xml	(revision 32153)
+++ main/trunk/greenstone3/build.xml	(revision 32310)
@@ -84,5 +84,5 @@
   <if>
     <bool><not><available file="build.properties"/></not></bool>
-    <copy file="build.properties.in" tofile="build.properties"/>
+    <copy file="build.properties.svn" tofile="build.properties"/>
   </if>
 
@@ -715,5 +715,5 @@
   <!-- ==================== Primary and Global Targets ============================= -->
 
-  <target name="prepare" depends="accept-properties,init,copy-dot-in-files,prepare-core,prepare-packages,prepare-common-src,prepare-collection-building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections, prepare-flax"
+  <target name="prepare" depends="accept-properties,init,copy-dot-svn-files,prepare-core,prepare-packages,prepare-common-src,prepare-collection-building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections, prepare-flax"
     description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional subversion checkouts and downloads, so you need to be online to run this.">
 
@@ -954,5 +954,5 @@
 
     <!--Now write out the url with oaiserver suffix as the baseURL property in OAIConfig.xml-->
-    <available file="${basedir}/resources/oai/OAIConfig.xml" property="oaiconfig.present"/>
+    <available file="${basedir}/resources/oai/OAIConfig.xml.in" property="oaiconfig.present"/>
     <antcall target="init-oaiconfig">
       <param name="url" value="${url}"/>
@@ -962,5 +962,5 @@
   <target name="init-oaiconfig" if="oaiconfig.present">
     <echo>Writing out baseURL ${url}oaiserver to ${web.writableclasses}/OAIConfig.xml</echo>
-    <copy file="${basedir}/resources/oai/OAIConfig.xml" tofile="${web.writableclasses}/OAIConfig.xml"/>
+    <copy file="${basedir}/resources/oai/OAIConfig.xml.in" tofile="${web.writableclasses}/OAIConfig.xml"/>
     <rsr verbosity="1" file="${web.writableclasses}/OAIConfig.xml" pattern="&lt;baseURL&gt;.*&lt;/baseURL&gt;" replacement="&lt;baseURL&gt;${url}oaiserver&lt;/baseURL&gt;" />   
   </target>
@@ -1083,41 +1083,42 @@
     <mysetproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
   </target>
-  
-  <target name="copy-dot-in-files" depends="init" 
-	  description="Copies all resources .in files to version without the .in suffix" >
-    <if><bool><available file="${basedir}/resources/tomcat/greenstone3.xml"/></bool>
-      <copy file="${basedir}/resources/tomcat/greenstone3.xml" tofile="${basedir}/resources/tomcat/greenstone3.xml.backup"  overwrite="true"/>
+
+  <target name="copy-dot-svn-files" depends="init" 
+	  description="Copies all resources .svn files to .in versions - which are used during cionfigure to generate the runtime versions." >
+    <if><bool><available file="${basedir}/resources/tomcat/greenstone3.xml.in"/></bool>
+      <copy file="${basedir}/resources/tomcat/greenstone3.xml.in" tofile="${basedir}/resources/tomcat/greenstone3.xml.in.backup"  overwrite="true"/>
     </if>
    
-    <copy file="${basedir}/resources/tomcat/greenstone3.xml.in" tofile="${basedir}/resources/tomcat/greenstone3.xml"  overwrite="true"/>
-    <if><bool><available file="${basedir}/resources/tomcat/server_tomcat5.xml"/></bool>
-      <copy file="${basedir}/resources/tomcat/server_tomcat5.xml" tofile="${basedir}/resources/tomcat/server_tomcat5.xml.backup"  overwrite="true"/>
-    </if>
-    <copy file="${basedir}/resources/tomcat/server_tomcat5.xml.in" tofile="${basedir}/resources/tomcat/server_tomcat5.xml"  overwrite="true"/>
-    <if><bool><available file="${basedir}/resources/tomcat/server_tomcat7.xml"/></bool>
-      <copy file="${basedir}/resources/tomcat/server_tomcat7.xml" tofile="${basedir}/resources/tomcat/server_tomcat7.xml.backup"  overwrite="true"/>
-    </if>
-    <copy file="${basedir}/resources/tomcat/server_tomcat7.xml.in" tofile="${basedir}/resources/tomcat/server_tomcat7.xml" overwrite="true"/>
-    <if><bool><available file="${basedir}/resources/tomcat/web.xml"/></bool>
-      <copy file="${basedir}/resources/tomcat/web.xml" tofile="${basedir}/resources/tomcat/web.xml.backup"  overwrite="true"/>
-    </if>
-    <copy file="${basedir}/resources/tomcat/web.xml.in" tofile="${basedir}/resources/tomcat/web.xml"  overwrite="true"/>
-    <if><bool><available file="${basedir}/resources/oai/OAIConfig.xml"/></bool>
-    <copy file="${basedir}/resources/oai/OAIConfig.xml" tofile="${basedir}/resources/oai/OAIConfig.xml.backup"  overwrite="true"/>
-    </if>
-    <copy file="${basedir}/resources/oai/OAIConfig.xml.in" tofile="${basedir}/resources/oai/OAIConfig.xml"  overwrite="true"/>
-    <if><bool><available file="${basedir}/resources/cgi/gsdl3site.cfg"/></bool>
-      <copy file="${basedir}/resources/cgi/gsdl3site.cfg" tofile="${basedir}/resources/cgi/gsdl3site.cfg.backup" overwrite="true"/>
-    </if>
-    <copy file="${basedir}/resources/cgi/gsdl3site.cfg.in" tofile="${basedir}/resources/cgi/gsdl3site.cfg" overwrite="true"/>
-    <if><bool><available file="${basedir}/resources/web/global.properties"/></bool>
-    <copy file="${basedir}/resources/web/global.properties" tofile="${basedir}/resources/web/global.properties.backup" overwrite="true"/>
-    </if>
-    <copy file="${basedir}/resources/web/global.properties.in" tofile="${basedir}/resources/web/global.properties" overwrite="true"/>
-    <if><bool><available file="${basedir}/resources/web/log4j.properties"/></bool>
-    <copy file="${basedir}/resources/web/log4j.properties" tofile="${basedir}/resources/web/log4j.properties.backup" overwrite="true"/>
-    </if>
-    <copy file="${basedir}/resources/web/log4j.properties.in" tofile="${basedir}/resources/web/log4j.properties" overwrite="true"/>
-  </target>
+    <copy file="${basedir}/resources/tomcat/greenstone3.xml.svn" tofile="${basedir}/resources/tomcat/greenstone3.xml.in"  overwrite="true"/>
+    <if><bool><available file="${basedir}/resources/tomcat/server_tomcat5.xml.in"/></bool>
+      <copy file="${basedir}/resources/tomcat/server_tomcat5.xml.in" tofile="${basedir}/resources/tomcat/server_tomcat5.xml.in.backup"  overwrite="true"/>
+    </if>
+    <copy file="${basedir}/resources/tomcat/server_tomcat5.xml.svn" tofile="${basedir}/resources/tomcat/server_tomcat5.xml.in"  overwrite="true"/>
+    <if><bool><available file="${basedir}/resources/tomcat/server_tomcat7.xml.in"/></bool>
+      <copy file="${basedir}/resources/tomcat/server_tomcat7.xml.in" tofile="${basedir}/resources/tomcat/server_tomcat7.xml.in.backup"  overwrite="true"/>
+    </if>
+    <copy file="${basedir}/resources/tomcat/server_tomcat7.xml.svn" tofile="${basedir}/resources/tomcat/server_tomcat7.xml.in" overwrite="true"/>
+    <if><bool><available file="${basedir}/resources/tomcat/web.xml.in"/></bool>
+      <copy file="${basedir}/resources/tomcat/web.xml.in" tofile="${basedir}/resources/tomcat/web.xml.in.backup"  overwrite="true"/>
+    </if>
+    <copy file="${basedir}/resources/tomcat/web.xml.svn" tofile="${basedir}/resources/tomcat/web.xml.in"  overwrite="true"/>
+    <if><bool><available file="${basedir}/resources/oai/OAIConfig.xml.in"/></bool>
+    <copy file="${basedir}/resources/oai/OAIConfig.xml.in" tofile="${basedir}/resources/oai/OAIConfig.xml.in.backup"  overwrite="true"/>
+    </if>
+    <copy file="${basedir}/resources/oai/OAIConfig.xml.svn" tofile="${basedir}/resources/oai/OAIConfig.xml.in"  overwrite="true"/>
+    <if><bool><available file="${basedir}/resources/cgi/gsdl3site.cfg.in"/></bool>
+      <copy file="${basedir}/resources/cgi/gsdl3site.cfg.in" tofile="${basedir}/resources/cgi/gsdl3site.cfg.in.backup" overwrite="true"/>
+    </if>
+    <copy file="${basedir}/resources/cgi/gsdl3site.cfg.svn" tofile="${basedir}/resources/cgi/gsdl3site.cfg.in" overwrite="true"/>
+    <if><bool><available file="${basedir}/resources/web/global.properties.in"/></bool>
+    <copy file="${basedir}/resources/web/global.properties.in" tofile="${basedir}/resources/web/global.properties.in.backup" overwrite="true"/>
+    </if>
+    <copy file="${basedir}/resources/web/global.properties.svn" tofile="${basedir}/resources/web/global.properties.in" overwrite="true"/>
+    <if><bool><available file="${basedir}/resources/web/log4j.properties.in"/></bool>
+    <copy file="${basedir}/resources/web/log4j.properties.in" tofile="${basedir}/resources/web/log4j.properties.in.backup" overwrite="true"/>
+    </if>
+    <copy file="${basedir}/resources/web/log4j.properties.svn" tofile="${basedir}/resources/web/log4j.properties.in" overwrite="true"/>
+  </target>
+    
   <!-- ========== Web app Targets ================================ -->
   
@@ -1353,7 +1354,7 @@
     <filter token="perlpath" value="${escaped.perl.path}"/>
     <filter token="disable.collection.building" value="${disable.collection.building}"/>
-    <copy file="${basedir}/resources/cgi/gsdl3site.cfg" tofile="${web.writablehome}/WEB-INF/cgi/gsdl3site.cfg" filtering="true" overwrite="true"/>
-    <copy file="${basedir}/resources/web/global.properties" tofile="${web.writableclasses}/global.properties" filtering="true" overwrite="true"/>
-    <copy file="${basedir}/resources/web/log4j.properties" tofile="${web.writableclasses}/log4j.properties" filtering="true" overwrite="true"/>
+    <copy file="${basedir}/resources/cgi/gsdl3site.cfg.in" tofile="${web.writablehome}/WEB-INF/cgi/gsdl3site.cfg" filtering="true" overwrite="true"/>
+    <copy file="${basedir}/resources/web/global.properties.in" tofile="${web.writableclasses}/global.properties" filtering="true" overwrite="true"/>
+    <copy file="${basedir}/resources/web/log4j.properties.in" tofile="${web.writableclasses}/log4j.properties" filtering="true" overwrite="true"/>
     <if><bool><istrue value="${gsdl3home.isreadonly}"/></bool>
       <!-- uncomment the writablehome properties -->
@@ -1495,5 +1496,5 @@
   <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"
+    <copy file="${basedir}/resources/tomcat/server_tomcat${tomcat.version.major}.xml.in"
 		tofile="${packages.home}/tomcat/conf/server.xml" overwrite="true">
       <filterset>
@@ -1523,7 +1524,7 @@
     <!-- set up the greenstone3 context, it may have a custom name specified in build.properties -->
 	<if><bool><not><equals arg1="greenstone3" arg2="${greenstone.context}"></equals></not></bool>
-		<copy file="${basedir}/resources/tomcat/greenstone3.xml" tofile="${basedir}/resources/tomcat/${greenstone.context}.xml" overwrite="true"/>
+		<copy file="${basedir}/resources/tomcat/greenstone3.xml.in" tofile="${basedir}/resources/tomcat/${greenstone.context}.xml.in" overwrite="true"/>
 	</if>
-    <copy file="${basedir}/resources/tomcat/${greenstone.context}.xml" tofile="${packages.home}/tomcat/conf/Catalina/localhost/${greenstone.context}.xml" overwrite="true">
+    <copy file="${basedir}/resources/tomcat/${greenstone.context}.xml.in" tofile="${packages.home}/tomcat/conf/Catalina/localhost/${greenstone.context}.xml" overwrite="true">
       <filterset>
         <filter token="gsdl3webhome" value="${web.home}"/>
@@ -1546,5 +1547,5 @@
 	
     <!-- set up the greenstone3 web.xml file -->
-    <copy file="${basedir}/resources/tomcat/web.xml" tofile="${packages.home}/tomcat/conf/web.xml" overwrite="true">
+    <copy file="${basedir}/resources/tomcat/web.xml.in" tofile="${packages.home}/tomcat/conf/web.xml" overwrite="true">
       <filterset>
 	<filter token="perlpath" value="${perl.path}"/>
