Changeset 28904


Ignore:
Timestamp:
2014-03-17T11:55:00+13:00 (10 years ago)
Author:
kjdon
Message:

added a target copy-dot-in-files. Configuration files that may be edited by the user, and that need some regex search and replace done at startup time now are insvn as a .in file. On ant prepare, these are copied to a version without the .in, in the same folder as original. User can edit these new versions here, then on ant start, they get copied to their correct place in web, with replacements done on them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r28643 r28904  
    636636  <!-- ==================== Primary and Global Targets ============================= -->
    637637
    638   <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-common-src,prepare-collection-building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections, prepare-flax"
     638  <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"
    639639    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.">
    640640
     
    928928  </target>
    929929 
     930  <target name="copy-dot-in-files" depends="init"
     931      description="Copies all resources .in files to version without the .in suffix" >
     932    <if><bool><available file="${basedir}/resources/tomcat/greenstone3.xml"/></bool>
     933      <copy file="${basedir}/resources/tomcat/greenstone3.xml" tofile="${basedir}/resources/tomcat/greenstone3.xml.backup"  overwrite="true"/>
     934    </if>
     935   
     936    <copy file="${basedir}/resources/tomcat/greenstone3.xml.in" tofile="${basedir}/resources/tomcat/greenstone3.xml"  overwrite="true"/>
     937    <if><bool><available file="${basedir}/resources/tomcat/server_tomcat5.xml"/></bool>
     938      <copy file="${basedir}/resources/tomcat/server_tomcat5.xml" tofile="${basedir}/resources/tomcat/server_tomcat5.xml.backup"  overwrite="true"/>
     939    </if>
     940    <copy file="${basedir}/resources/tomcat/server_tomcat5.xml.in" tofile="${basedir}/resources/tomcat/server_tomcat5.xml"  overwrite="true"/>
     941    <if><bool><available file="${basedir}/resources/tomcat/server_tomcat7.xml"/></bool>
     942      <copy file="${basedir}/resources/tomcat/server_tomcat7.xml" tofile="${basedir}/resources/tomcat/server_tomcat7.xml.backup"  overwrite="true"/>
     943    </if>
     944    <copy file="${basedir}/resources/tomcat/server_tomcat7.xml.in" tofile="${basedir}/resources/tomcat/server_tomcat7.xml" overwrite="true"/>
     945    <if><bool><available file="${basedir}/resources/tomcat/web.xml"/></bool>
     946      <copy file="${basedir}/resources/tomcat/web.xml" tofile="${basedir}/resources/tomcat/web.xml.backup"  overwrite="true"/>
     947    </if>
     948    <copy file="${basedir}/resources/tomcat/web.xml.in" tofile="${basedir}/resources/tomcat/web.xml"  overwrite="true"/>
     949    <if><bool><available file="${basedir}/resources/oai/OAIConfig.xml"/></bool>
     950    <copy file="${basedir}/resources/oai/OAIConfig.xml" tofile="${basedir}/resources/oai/OAIConfig.xml.backup"  overwrite="true"/>
     951    </if>
     952    <copy file="${basedir}/resources/oai/OAIConfig.xml.in" tofile="${basedir}/resources/oai/OAIConfig.xml"  overwrite="true"/>
     953
     954  </target>
    930955  <!-- ========== Web app Targets ================================ -->
    931956 
Note: See TracChangeset for help on using the changeset viewer.