Changeset 32697


Ignore:
Timestamp:
2018-12-16T21:48:31+13:00 (5 years ago)
Author:
davidb
Message:

Updated to work with apache-tomcat-8.x

File:
1 edited

Legend:

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

    r32674 r32697  
    295295  <!-- version properties for external packages -->
    296296  <!-- for Java versions < 1.4, we print out the message that Java is too old.
    297     For Java 1.4, we use Tomcat 5.5, for Java5 and higher, we use Tomcat 7.0-->
    298   <condition property="tomcat.version" value="apache-tomcat-5.5.25" else="apache-tomcat-7.0.57">
     297    For Java 1.4, we use Tomcat 5.5, for Java5 and higher, we use Tomcat 8.x-->
     298  <condition property="tomcat.version" value="apache-tomcat-5.5.25" else="apache-tomcat-8.5.35">
    299299    <equals arg1="1.4" arg2="${ant.java.version}"/>
    300300  </condition>
    301   <condition property="tomcat.version.major" value="5" else="7">
     301  <condition property="tomcat.version.major" value="5" else="8">
    302302    <equals arg1="1.4" arg2="${ant.java.version}"/>
    303303  </condition>
    304304  <condition property="privileged.attribute" value="privileged='true'" else="">
    305     <equals arg1="7" arg2="${tomcat.version.major}"/>
     305    <equals arg1="8" arg2="${tomcat.version.major}"/>
    306306  </condition>
    307307
     
    777777 
    778778  <!-- All elements that Tomcat 7 exposes to applications -->
    779   <path id="tomcat7">
     779  <path id="tomcat8">
    780780    <fileset dir="${catalina.home}/lib">
    781781      <include name="*.jar"/>
     
    12541254    <!--
    12551255    the next block checks if the bundled tomcat is present in the 'packages' directory,
    1256     and checks for the lethal combination of tomcat 7 and java 1.4. Test for
     1256    and checks for the lethal combination of tomcat 8 and java 1.4. Test for
    12571257    tomcat6 is based on the presence of a file inserted by greenstone into the tomcat6
    12581258    download, as there is no other surefire way to check tomcat version under java 1.4
     
    12611261      <available file="packages/tomcat"/>
    12621262    </condition>
    1263     <condition property="packages.tomcat.istomcat7" value="true" else="false">
    1264       <available file="packages/tomcat/tomcat7.txt"/>
     1263    <condition property="packages.tomcat.istomcat8" value="true" else="false">
     1264      <available file="packages/tomcat/tomcat8.txt"/>
    12651265    </condition>
    12661266    <if>
     
    12681268        <and>
    12691269          <istrue value="${packages.tomcat.ispresent}"/>
    1270           <istrue value="${packages.tomcat.istomcat7}"/>
     1270          <istrue value="${packages.tomcat.istomcat8}"/>
    12711271          <equals arg1="1.4" arg2="${ant.java.version}"/>
    12721272        </and>
     
    13031303      <copy file="${basedir}/resources/tomcat/server_tomcat7.xml.in" tofile="${basedir}/resources/tomcat/server_tomcat7.xml.in.backup"  overwrite="true"/>
    13041304    </if>
    1305     <copy file="${basedir}/resources/tomcat/server_tomcat7.xml.svn" tofile="${basedir}/resources/tomcat/server_tomcat7.xml.in" overwrite="true"/>
    1306     <if><bool><available file="${basedir}/resources/tomcat/web.xml.in"/></bool>
    1307       <copy file="${basedir}/resources/tomcat/web.xml.in" tofile="${basedir}/resources/tomcat/web.xml.in.backup"  overwrite="true"/>
    1308     </if>
    1309     <copy file="${basedir}/resources/tomcat/web.xml.svn" tofile="${basedir}/resources/tomcat/web.xml.in"  overwrite="true"/>
     1305    <copy file="${basedir}/resources/tomcat/server_tomcat8.xml.svn" tofile="${basedir}/resources/tomcat/server_tomcat8.xml.in" overwrite="true"/>
     1306    <if><bool><available file="${basedir}/resources/tomcat/server_tomcat8.xml.in"/></bool>
     1307      <copy file="${basedir}/resources/tomcat/server_tomcat8.xml.in" tofile="${basedir}/resources/tomcat/server_tomcat8.xml.in.backup"  overwrite="true"/>
     1308    </if>
     1309    <copy file="${basedir}/resources/tomcat/server_tomcat8.xml.svn" tofile="${basedir}/resources/tomcat/server_tomcat8.xml.in" overwrite="true"/>
     1310    <if><bool><available file="${basedir}/resources/tomcat/web8.xml.in"/></bool>
     1311      <copy file="${basedir}/resources/tomcat/web8.xml.in" tofile="${basedir}/resources/tomcat/web8.xml.in.backup"  overwrite="true"/>
     1312    </if>
     1313    <copy file="${basedir}/resources/tomcat/web8.xml.svn" tofile="${basedir}/resources/tomcat/web8.xml.in"  overwrite="true"/>
    13101314    <if><bool><available file="${basedir}/resources/oai/OAIConfig.xml.in"/></bool>
    13111315    <copy file="${basedir}/resources/oai/OAIConfig.xml.in" tofile="${basedir}/resources/oai/OAIConfig.xml.in.backup"  overwrite="true"/>
     
    22582262   
    22592263    <!-- set up the greenstone3 web.xml file -->
    2260     <copy file="${basedir}/resources/tomcat/web.xml.in" tofile="${packages.home}/tomcat/conf/web.xml" overwrite="true">
     2264    <copy file="${basedir}/resources/tomcat/web8.xml.in" tofile="${packages.home}/tomcat/conf/web.xml" overwrite="true">
    22612265      <filterset>
    22622266    <filter token="perlpath" value="${perl.path}"/>
     
    41204124  </target>
    41214125   
    4122   <target name="run-collection-tests">
     4126    <target name="run-collection-tests">
    41234127        <if><bool><not><available file="${basedir}/ext/testing" type="dir"/></not></bool>
    41244128            <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>
Note: See TracChangeset for help on using the changeset viewer.