Ignore:
Timestamp:
2018-09-06T22:32:58+12:00 (6 years ago)
Author:
ak19
Message:

solr should only be accessible locally (from localhost, specifically 127.0.0.1) which means over http. This conflicted with the previous design of the properties file for working with http and/or https. Now we have tomcat.port.https and localhost.port.http, both always set. In place of server.protocol that used to contain the default protocol, we now have server.protocols which can be set to a comma separated list of one or both of http and https. Drastic restructuring followed. I think I've tested all but https certification stuff.

File:
1 edited

Legend:

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

    r32427 r32429  
    5757       If not testing can either uncomment this property or set value=false.
    5858       BEWARE: iff test.mode is true (so https.testing gets set to minus-minus-staging)
    59        AND server.protocol=https, check-tomcat-running and any other targets running
    60        an ant http condition to test the default GS DL URL (which will be over https)
    61        won't work. This is because the testing certificate is not trusted by
    62        clients, in this case the ant http condition. (Clients that are browsers can
    63        be set to temporarily trust the testing certificate, but don't know how to make
    64        ant do that, maybe it needs to be done at Java level.)
     59       AND the default protocol is https (server.protocols contains https first), the
     60       check-tomcat-running target and any other targets running an ant http condition
     61       to test the default GS DL URL (which will be over https) won't work.
     62       This is because the testing certificate is not trusted by clients, in this case
     63       the ant http condition. (Clients that are browsers can be set to temporarily
     64       trust the testing certificate, but don't know how to make ant do that, maybe it
     65       needs to be done at Java level.)
    6566       Ant socket conditions to the URL will work because socket tests don't use
    6667       the protocol, just the host and port.
     
    118119  </if>
    119120
    120 
    121   <!-- If internal.tomcat.port not yet set, work it out based on server.protocol
    122        Would be great if we could just use nested variables in build.properties
    123        https://grokbase.com/t/ant/user/04698xjbp3/nested-variables-in-ant
    124        http://ant.apache.org/faq.html#propertyvalue-as-name-for-property
    125        http://ant.1045680.n5.nabble.com/Property-expansion-in-macrodef-attributes-td5476406.html
    126 
    127        https://marc.info/?l=ant-user&m=111231719328847
    128        http://ant-contrib.sourceforge.net/tasks/tasks/propertycopy.html
    129        http://www.jguru.com/faq/view.jsp?EID=1072238
    130        * propfile:
    131        https://ant.apache.org/manual/Tasks/propertyfile.html
     121  <if>
     122    <bool><not><matches string="${server.protocols}" pattern="^\s*(https?|http\s*,\s*https|https\s*,\s*http)\s*$"/></not></bool>
     123    <fail>@@@@
     124      In file build.properties: invalid value for server.protocols.
     125      It must contain http or https, or both (in order of preference) separated by commas.
     126    </fail>
     127  </if>
     128
     129  <!--
    132130       * "valid ports range from 1024–49151" is probably about user assignable ports.
    133131       But 80 is a valid port for running web servers including GS
     
    137135    <if>
    138136      <bool>
    139       <and>
    140         <isset property="tomcat.port.http"/>
    141         <not><matches string="${tomcat.port.http}" pattern="^\d{2,}\s*$"/></not>
    142       </and>     
     137    <not><matches string="${localhost.port.http}" pattern="^\d{2,}\s*$"/></not>
    143138      </bool>
    144139      <fail>...
    145     ********* ERROR: tomcat.port.http in file build.properties is set to an invalid port number.
     140    ********* ERROR: localhost.port.http in file build.properties is set to an invalid port number.
    146141    If port 80 is not possible, user assignable ports range from 1024–49151.
    147142    But don't choose any port already in use by another application.
    148     Try setting to tomcat.port.http=8383
     143    Try setting to localhost.port.http=8383
    149144      </fail>
    150145    </if>
    151146
     147    <!-- if server.protocols contains https, ensure its port number is valid -->
    152148    <if>
    153149      <bool>
    154150      <and>
    155         <isset property="tomcat.port.https"/>
     151        <matches string="${server.protocols}" pattern="https"/>
    156152        <not><matches string="${tomcat.port.https}" pattern="^\d{2,}\s*$"/></not>
    157153      </and>
    158154      </bool>
    159155      <fail>...
    160     ********* ERROR: tomcat.port.https in file build.properties is set to an invalid port number.
     156    ********* ERROR: in file build.properties, server.protocols includes https but
     157    tomcat.port.https is set to an invalid port number.
    161158    If port 443 is not possible, user assignable ports range from 1024–49151.
    162159    But don't choose any port already in use by another application.
     
    167164    <!--
    168165     Bail if https is enabled but the keystore password (keystore.pass property) is not set.
    169      However, keystore.pass has no default value and is therefore not set as a rule. So don't bail when 'ant' is run for the first time to create build.props from build.props.svn. But do bail if running ant.prepare and https enabled and password not set.
    170      (Maybe put this entire section before the first target: so we only bail after all non-targets are executed so that any other first ever initialisation is completed?)
     166     However, keystore.pass has no default value and is therefore not set as a rule.
     167     So don't bail when 'ant' is run for the first time to create build.props from build.props.svn.
     168     But do bail if running ant.prepare and https enabled and password not set.
     169     (Maybe put this entire section before the first target: so we only bail after all non-targets
     170     are executed so that any other first ever initialisation is completed?)
    171171    -->
    172172    <if>
    173173      <bool>
    174174    <and>
    175       <isset property="tomcat.port.https"/>
     175      <matches string="${server.protocols}" pattern="https"/>
    176176      <or>
    177177        <not><isset property="keystore.pass"/></not>
     
    182182      <if>
    183183    <bool><isset property="first.run"/></bool>
    184     <echo>IMPORTANT: When tomcat.port.https is set in file build.properties, as now,
    185     the keystore.pass property must be set to a non-empty value.
    186     Either comment out tomcat.port.https if you don't want support for https,
    187     or set keystore.pass.</echo>
     184    <echo>IMPORTANT: In file build.properties, when property server.protocols includes https,
     185    as now, the keystore.pass property must be set to a non-empty value.
     186    Either set server.protocols to http by itself, if you don't want support for https,
     187    or set keystore.pass if you do want https support.</echo>
    188188    <else>
    189189      <fail>...
    190       ********* ERROR: tomcat.port.https in file build.properties is set, but its required keystore.pass property is not set or is set to the empty string. Choose a password for keystore.pass and set it in build.properties before proceeding.
     190      ********* ERROR: server.protocols contains https in file build.properties, but the keystore.pass
     191      property required for obtaining/renewing the https certificate is not set or is set to the empty
     192      string. Choose a password for keystore.pass and set it in build.properties before proceeding.
    191193      </fail>
    192194    </else>
     
    194196    </if>
    195197
    196     <!-- Set the keystore file name for linux versus windows. Ultimately unused/inactive if HTTPS is not enabled and no certificate obtained. We don't have https certification on mac -->
    197     <condition property="keystore.file" value="fullchain_and_prvtkey.pfx" else="fullchain_and_prvtkey.p12">
    198         <istrue value="${current.os.iswindows}"/>
    199     </condition>   
    200    
     198    <!-- Set the keystore file name for linux versus windows. Ultimately unused/inactive if HTTPS
     199     isn't enabled and no certificate obtained. We don't yet have https certification on mac -->
     200    <condition property="keystore.file" value="fullchain_and_prvtkey.pfx" else="fullchain_and_prvtkey.p12">
     201      <istrue value="${current.os.iswindows}"/>
     202    </condition>   
     203
     204    <!-- Originally, https redirectPort when using regular http port 8383
     205     was always fixed at 8443. Now we use redirectPort=tomcat.port.https.
     206    -->
     207    <property name="https.redirect.port" value="${tomcat.port.https}"/>
     208
     209    <!-- The default protocol to be used is the FIRST in the comma separated list for server.protocols
     210    The default public tomcat port depends on the default server protocol
     211    -->
     212    <if>
     213      <bool><matches string="${server.protocols}" pattern="^https"/></bool>
     214      <property name="default.server.protocol" value="https"/>
     215      <property name="default.tomcat.port" value="${tomcat.port.https}"/>     
     216      <else>
     217    <property name="default.server.protocol" value="http"/>
     218    <property name="default.tomcat.port" value="${localhost.port.http}"/>   
     219      </else>
     220    </if>
     221   
     222
     223    <!-- For setting filter tokens.
     224     Used to set up server.xml when configuring tomcat -->
     225    <property name="comment.start" value="&lt;!--" />
     226    <property name="comment.end" value="--&gt;" />
     227
    201228    <!--
    202      1. Using the macrodef task from ant 1.6+ (https://ant.apache.org/manual/Tasks/macrodef.html)
    203      to define "propertycopy" macro that then allows us to use nested variables in build.xml
    204      (Is there any way to use nested variables in build.properties?)
    205      Defining the propertycopy macro:
    206      http://ant.apache.org/faq.html#propertyvalue-as-name-for-property
     229     If https is enabled, regardless of whether it is the default protocol,
     230     there's some more work to do:
     231     -
     232     - if https is not enabled, comment out its Connecter element in server.xml
     233    -->   
     234    <if>
     235      <bool><matches string="${server.protocols}" pattern="https"/></bool>     
     236      <property name="https.comment.out.start" value=""/>
     237      <property name="https.comment.out.end" value=""/>
     238
     239      <else>   
     240    <property name="https.comment.out.start" value="${comment.start}"/>
     241    <property name="https.comment.out.end" value="${comment.end}"/>
     242      </else>
     243    </if>
     244
     245    <!-- if server.protocols doesn't contain http, then http is only to be locally available,
     246     e.g. for solr servlet on 127.0.0.1
     247     In that case, see https://serverfault.com/questions/218666/how-to-configure-tomcat-to-only-listen-to-127-0-0-1
    207248    -->
    208     <macrodef name="propertycopy">
    209       <attribute name="name"/>
    210       <attribute name="from"/>
    211       <sequential>
    212     <property name="@{name}" value="${@{from}}"/>
    213       </sequential>
    214     </macrodef>
    215     <!--
    216     2. Now can use the 'propertycopy' macro defined above to allow us to use a property's value
    217     (e.g. server.protocol's value) as a part of the name for a property.
    218     So we want do something like ${tomcat.port.${server.protocol}}, which, if server.protocol=http,
    219     we'd like it to turn into tomcat.port.http. Then we want to use the constructed variable name
    220     to assign its value to a new variable. Use is as follows:
    221        propertycopy name="tomcat.port.protocol" from="tomcat.port.${server.protocol}"
    222     http://ant.1045680.n5.nabble.com/Property-expansion-in-macrodef-attributes-td5476406.html
     249    <condition property="restrict.http.to.local" value="false" else="true">
     250      <matches string="${server.protocols}" pattern="http($|\s+|,)"/>
     251    </condition>
     252   
     253    <condition property="http.address.restriction" value="address=&quot;127.0.0.1&quot;" else="">
     254      <istrue value="${restrict.http.to.local}"/>
     255    </condition>
     256
     257    <!-- No certificates for localhost: https://letsencrypt.org/docs/certificates-for-localhost/
     258    But 'localhost' (or actually, 127.0.0.1) needed for solr: solr servlet not accessible to outside world
    223259    -->
    224     <propertycopy name="internal.tomcat.port" from="tomcat.port.${server.protocol}"/>
    225     <if>
    226       <bool><matches string="${internal.tomcat.port}" pattern="tomcat\.port"/></bool>
    227       <fail>...
    228       ********* ERROR: Unable to set tomcat.port:
    229       In file build.properties server.protocol=${server.protocol} and requires at minimum that its
    230       matching tomcat.port.${server.protocol} property line is enabled and set to a valid port number.</fail>
    231     </if>
    232 
    233   <!-- If we got here, we got a valid tomcat port. Set tomcat.port in build.properties
    234        Set autogenerated properties (properties we calculate here in build.xml)
    235        in build.properties. https://ant.apache.org/manual/Tasks/propertyfile.html
    236        For now only internal.tomcat.port is determined by build.xml
    237        and written out to build.properties as tomcat.port.
    238        Internally, this file still uses internal.tomcat.port as any old value
    239        read in from build.properties for tomcat.port can't be changed in memory
    240        even though we can write it back out again to build.properties.
    241   -->
    242   <echo>Using tomcat port: ${internal.tomcat.port}</echo>
    243 
    244   <!-- We're no longer writing out a tomcat.port property to build.properties based on what we've determined this should be:
    245   - the perl code only cares about the final GS3 URL, which is determined by this ant build file and uses internal.tomcat.port
    246   - and the GS3 Java src code has been updated to work without tomcat.port in build.properties -->
    247   <!--
    248   <propertyfile file="build.properties">
    249     <entry key="tomcat.port" value="${internal.tomcat.port}"/>
    250   </propertyfile>
    251   -->
    252 
    253   <!-- For setting filter tokens.
    254        Used to set up server.xml when configuring tomcat -->
    255   <property name="comment.start" value="&lt;!--" />
    256   <property name="comment.end" value="--&gt;" />
    257   <!-- originally, https redirectPort when using regular http port 8383
    258   was always fixed at 8443. Now we use redirectPort=tomcat.port.https unless
    259   it's not set, in which case we fall back to the original value of 8443. -->
    260   <condition property="https.redirect.port" value="${tomcat.port.https}" else="8443">
    261     <isset property="tomcat.port.https"/>
    262   </condition>
    263 
    264   <!-- if http is not enabled, comment out its Connecter element in server.xml -->
    265   <condition property="http.comment.out.start" value="" else="${comment.start}">
    266     <isset property="tomcat.port.http"/>
    267   </condition>
    268   <condition property="http.comment.out.end" value="" else="${comment.end}">
    269     <isset property="tomcat.port.http"/>
    270   </condition>
    271   <!-- if https is not enabled, comment out its Connecter element in server.xml -->
    272   <condition property="https.comment.out.start" value="" else="${comment.start}">
    273     <isset property="tomcat.port.https"/>
    274   </condition>
    275   <condition property="https.comment.out.end" value="" else="${comment.end}">
    276     <isset property="tomcat.port.https"/>
    277   </condition>
     260    <property name="local.http.url" value="http://127.0.0.1:${localhost.port.http}"/>
    278261
    279262    <!-- On linux, if testing https certification, pass in minus-minus-staging. If not testing on linux, nothing extra to pass in.
     
    10521035
    10531036  <target name="get-default-servlet-url">
    1054     <echo>${server.protocol}://${tomcat.server}:${internal.tomcat.port}${app.path}${server.default.servlet}</echo>
    1055   </target>
    1056 
     1037    <echo>${default.server.protocol}://${tomcat.server}:${default.tomcat.port}${app.path}${server.default.servlet}</echo>
     1038  </target>
     1039
     1040  <!-- solr should only be accessible locally, which therefore also means only over http.
     1041  But for http,  use 127.0.0.1 instead of localhost (as localhost can be mapped to something other than 127.0.0.1
     1042  and is therefore not safe). See https://letsencrypt.org/docs/certificates-for-localhost/ -->
    10571043  <target name="get-solr-servlet-url">
    1058     <echo>${server.protocol}://${tomcat.server}:${internal.tomcat.port}/${solr.context}</echo>
     1044    <!--<echo>${default.server.protocol}://${tomcat.server}:${default.tomcat.port}/${solr.context}</echo>-->
     1045    <echo>http://127.0.0.1:${localhost.port.http}/${solr.context}</echo>
    10591046  </target>
    10601047
     
    11461133    </if>
    11471134    <if><bool><isset property="install.flax"/></bool>
    1148         <property name="url" value="${server.protocol}://${tomcat.server}:${internal.tomcat.port}${app.path}/flax"/>
     1135        <property name="url" value="${default.server.protocol}://${tomcat.server}:${default.tomcat.port}${app.path}/flax"/>
    11491136    <else>
    1150         <property name="url" value="${server.protocol}://${tomcat.server}:${internal.tomcat.port}${app.path}/"/>
     1137        <property name="url" value="${default.server.protocol}://${tomcat.server}:${default.tomcat.port}${app.path}/"/>
    11511138    </else>
    11521139    </if>
     
    12011188  <target name="accept-properties" unless="properties.accepted">
    12021189    <input addproperty="properties.ok" validargs="y,n">The following properties (among others) are being used from a build.properties file found in this directory:
    1203       server.protocol=${server.protocol}
     1190      server.protocols=${server.protocols}     
    12041191      tomcat.server=${tomcat.server}
    1205       <!--tomcat.port=${internal.tomcat.port}-->
    1206       tomcat.port.http=${tomcat.port.http}
    12071192      tomcat.port.https=${tomcat.port.https}
     1193      localhost.port.http=${localhost.port.http}
     1194
     1195         default.server.protocol=${default.server.protocol}
     1196         default.tomcat.port=${default.tomcat.port}
     1197         Local base HTTP URL used by Greenstone: ${local.http.url}
     1198
    12081199      tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed)
    12091200      proxy.host=${proxy.host}
     
    12411232      </or>
    12421233    </condition>
    1243    
    1244     <echo>internal.tomcat.port = ${internal.tomcat.port}</echo>
    12451234
    12461235    <condition property="proxy.present">
     
    15511540    <filter token="gsdl3writablehome" value="${src.gsdl3.writablehome.unix}"/>
    15521541    <filter token="gsdl3version" value="${app.version}"/>
    1553     <filter token="server.protocol" value="${server.protocol}"/>
     1542    <filter token="server.protocols" value="${server.protocols}"/>
     1543    <filter token="default.server.protocol" value="${default.server.protocol}"/>
    15541544    <filter token="tomcat.server" value="${tomcat.server}"/>
    1555     <filter token="tomcat.port" value="${internal.tomcat.port}"/>
    1556     <!-- add filters for tomcat.port.http and tomcat.port.https depending on if
    1557      these are set. If any is not set, set its filter to the empty string -->
    1558     <if>
    1559       <bool><isset property="tomcat.port.http"/></bool>
    1560       <filter token="tomcat.port.http" value="${tomcat.port.http}"/>
    1561       <else><filter token="tomcat.port.http" value=""/></else>
    1562     </if>
    1563     <if>
    1564       <bool><isset property="tomcat.port.https"/></bool>
    1565       <filter token="tomcat.port.https" value="${tomcat.port.https}"/>
    1566       <else><filter token="tomcat.port.https" value=""/></else>
    1567     </if>
     1545    <filter token="default.tomcat.port" value="${default.tomcat.port}"/>
     1546    <filter token="localhost.port.http" value="${localhost.port.http}"/>
     1547    <filter token="tomcat.port.https" value="${tomcat.port.https}"/>   
    15681548    <filter token="greenstone.context" value="${greenstone.context}"/>
    15691549    <filter token="solr.context" value="${solr.context}"/>
     
    17401720        See https://ant.apache.org/manual/Tasks/antcall.html -->
    17411721    <antcall target="start">
    1742         <param name="tomcat.port.http" value="80"/>
    1743         <param name="internal.tomcat.port" value="80"/>
    1744         <param name="http.comment.out.start" value=""/>
    1745         <param name="http.comment.out.end" value=""/>
     1722        <param name="localhost.port.http" value="80"/>
     1723        <param name="default.tomcat.port" value="80"/>
     1724        <param name="http.address.restriction" value=""/><!-- don't prevent public access over http of port 80 -->
    17461725        <param name="https.comment.out.start" value="${comment.start}"/>
    17471726        <param name="https.comment.out.end" value="${comment.end}"/>
     
    17791758    <!-- stop the tomcat running on port 80 -->
    17801759    <antcall target="stop">
    1781         <param name="tomcat.port.http" value="80"/>
    1782         <param name="internal.tomcat.port" value="80"/>
    1783         <param name="http.comment.out.start" value=""/>
    1784         <param name="http.comment.out.end" value=""/>
     1760        <param name="localhost.port.http" value="80"/>
     1761        <param name="default.tomcat.port" value="80"/>
     1762        <param name="http.address.restriction" value=""/>
    17851763        <param name="https.comment.out.start" value="${comment.start}"/>
    17861764        <param name="https.comment.out.end" value="${comment.end}"/>
     
    20252003        <filter token="shutdown-port" value="${tomcat.shutdown.port}"/>
    20262004    <filter token="https.redirect.port" value="${https.redirect.port}"/>
    2027     <filter token="tomcat.port.http" value="${tomcat.port.http}"/>
     2005    <filter token="localhost.port.http" value="${localhost.port.http}"/>
    20282006    <filter token="tomcat.port.https" value="${tomcat.port.https}"/>
    20292007    <!-- Relative path preferred for keystore.file, in case tomcat is moved elsewhere -->
     
    20402018    <filter token="keystore.type" value="PKCS12"/>
    20412019    <filter token="keystore.pass" value="${keystore.pass}"/>
    2042     <filter token="http.comment.out.start" value="${http.comment.out.start}"/>
    2043     <filter token="http.comment.out.end" value="${http.comment.out.end}"/>
     2020    <!--
     2021        if server.protocols doesn't contain http, then http is only to be locally available (e.g. for solr servlet on 127.0.0.1)
     2022        In that case, see https://serverfault.com/questions/218666/how-to-configure-tomcat-to-only-listen-to-127-0-0-1
     2023    -->
     2024    <filter token="http.address.restriction" value="${http.address.restriction}"/>
     2025    <filter token="restrict.http.to.local" value="${restrict.http.to.local}"/>
    20442026    <filter token="https.comment.out.start" value="${https.comment.out.start}"/>
    20452027    <filter token="https.comment.out.end" value="${https.comment.out.end}"/>
     
    21662148    <waitfor maxwait="5" maxwaitunit="second">
    21672149      <and>
    2168         <socket server="${tomcat.server}" port="${internal.tomcat.port}"/>
    2169         <http url="${server.protocol}://${tomcat.server}:${internal.tomcat.port}${app.path}/index.html"/>
     2150        <socket server="${tomcat.server}" port="${default.tomcat.port}"/>
     2151    <!--<http url="${default.server.protocol}://${tomcat.server}:${default.tomcat.port}${app.path}/index.html"/>-->
     2152    <http url="${local.http.url}${app.path}/index.html"/>
    21702153      </and>
    21712154    </waitfor>
     
    21762159    <if><bool><istrue value="${tomcat.isstarted}"/></bool>
    21772160      <echo>**************************************</echo>
    2178       <echo>A WEB SERVER IS ALREADY RUNNING ON ${server.protocol}://${tomcat.server}:${internal.tomcat.port}. NOT STARTING.</echo>
     2161      <echo>A WEB SERVER IS ALREADY RUNNING ON ${default.server.protocol}://${tomcat.server}:${default.tomcat.port} (${local.http.url}). NOT STARTING.</echo>
    21792162      <echo>**************************************</echo>
    21802163      <else>
     
    22312214    <waitfor maxwait="5" maxwaitunit="second">
    22322215      <and>
    2233         <socket server="${tomcat.server}" port="${internal.tomcat.port}"/>
    2234         <http url="${server.protocol}://${tomcat.server}:${internal.tomcat.port}${app.path}/index.html"/>
     2216        <socket server="${tomcat.server}" port="${default.tomcat.port}"/>
     2217        <!--<http url="${default.server.protocol}://${tomcat.server}:${default.tomcat.port}${app.path}/index.html"/>-->
     2218        <http url="${local.http.url}${app.path}/index.html"/>
    22352219      </and>
    22362220    </waitfor>
     
    22412225  <target name="reconfigure" description="Reconfigure the message router">
    22422226    <waitfor maxwait="5" maxwaitunit="second">
    2243       <http url="${server.protocol}://${tomcat.server}:${internal.tomcat.port}${app.path}${server.default.servlet}?a=s&amp;sa=c"/>
     2227      <!--<http url="${default.server.protocol}://${tomcat.server}:${default.tomcat.port}${app.path}${server.default.servlet}?a=s&amp;sa=c"/>-->
     2228      <http url="${local.http.url}${app.path}${server.default.servlet}?a=s&amp;sa=c"/>
    22442229    </waitfor>
    22452230  </target>
     
    22482233  <target name="reconfigure-collection" description="Reconfigure the collection">
    22492234    <waitfor maxwait="5" maxwaitunit="second">
    2250       <http url="${server.protocol}://${tomcat.server}:${internal.tomcat.port}${app.path}${server.default.servlet}?a=s&amp;sa=c&amp;sc=${collection}"/>
     2235      <!--<http url="${default.server.protocol}://${tomcat.server}:${default.tomcat.port}${app.path}${server.default.servlet}?a=s&amp;sa=c&amp;sc=${collection}"/>-->
     2236      <http url="${local.http.url}${app.path}${server.default.servlet}?a=s&amp;sa=c&amp;sc=${collection}"/>
    22512237    </waitfor>
    22522238  </target>
     
    22812267  <target name="check-tomcat-running">
    22822268    <condition property="tomcat.isrunning">
    2283       <!--<http url="${server.protocol}://${tomcat.server}:${internal.tomcat.port}${app.path}"/>-->
    2284       <http url="${server.protocol}://${tomcat.server}:${internal.tomcat.port}"/>
     2269      <!--<http url="${default.server.protocol}://${tomcat.server}:${default.tomcat.port}${app.path}"/>-->
     2270      <!--<http url="${default.server.protocol}://${tomcat.server}:${default.tomcat.port}"/>--><!-- untrusted certificates won't work, so don't test https urls-->
     2271      <http url="${local.http.url}"/><!-- testing the local http url instead -->
    22852272    </condition>
    22862273  </target>
     
    22892276      <target name="verbose-check-tomcat-running">
    22902277      <condition property="tomcat.isrunning" value="true" else="false">
    2291       <http url="${server.protocol}://${tomcat.server}:${internal.tomcat.port}"/>
     2278      <http url="${default.server.protocol}://${tomcat.server}:${default.tomcat.port}"/>
     2279      <http url="${local.http.url}"/>
    22922280      </condition>
    22932281      <echo>Tomcat is running: ${tomcat.isrunning}</echo>
     
    23092297  <target name="check-tomcat-started">
    23102298    <condition property="tomcat.isstarted">
    2311       <http url="${server.protocol}://${tomcat.server}:${internal.tomcat.port}"/>
     2299      <!--<http url="${default.server.protocol}://${tomcat.server}:${default.tomcat.port}"/>-->
     2300      <http url="${local.http.url}"/>
    23122301    </condition>
    23132302  </target>
     
    23262315     <echo>Waiting for the server to shutdown... (${wait.numchecks} seconds max)</echo>
    23272316     <waitfor maxwait="${wait.numchecks}" maxwaitunit="second" checkevery="1" checkeveryunit="second" timeoutproperty="tomcat.timedout">
    2328        <not><socket server="${tomcat.server}" port="${internal.tomcat.port}"/></not>
     2317       <not><socket server="${tomcat.server}" port="${default.tomcat.port}"/></not>
    23292318     </waitfor>
    23302319     
     
    23342323       </bool>
    23352324       <property name="tomcat.isrunning" value="true"/>
    2336        <echo>WARNING: Checked the socket ${wait.numchecks} times, but port ${internal.tomcat.port} is still busy.</echo>
     2325       <echo>WARNING: Checked the socket ${wait.numchecks} times, but port ${default.tomcat.port} is still busy.</echo>
    23372326       <else>
    23382327     <echo>Tomcat is stopped.</echo>
     
    26062595      <classpath refid="compile.classpath"/>
    26072596      <arg value="-l"/>
    2608       <arg value="${server.protocol}://${tomcat.server}:${internal.tomcat.port}${app.path}/servlet/AxisServlet"/>
     2597      <arg value="${default.server.protocol}://${tomcat.server}:${default.tomcat.port}${app.path}/servlet/AxisServlet"/>
    26092598      <arg file="${basedir}/resources/soap/deploy.wsdd"/>
    26102599    </java>
     
    26222611      <classpath refid="compile.classpath"/>
    26232612      <arg value="-l"/>
    2624       <arg value="${server.protocol}://${tomcat.server}:${internal.tomcat.port}${app.path}/servlet/AxisServlet"/>
     2613      <arg value="${default.server.protocol}://${tomcat.server}:${default.tomcat.port}${app.path}/servlet/AxisServlet"/>
    26252614      <arg file="${basedir}/resources/soap/undeploy.wsdd"/>
    26262615    </java>
     
    26542643  <target name="get-undeploy-service-name" unless="axis.undeploy.servicename">
    26552644    <input addproperty="axis.undeploy.servicename" defaultvalue="localsite">Please enter the full name of the service you wish to undeploy.
    2656 To find out which web services you've got deployed, point your browser to ${server.protocol}://${tomcat.server}:${internal.tomcat.port}/greenstone3/services
     2645To find out which web services you've got deployed, point your browser to ${default.server.protocol}://${tomcat.server}:${default.tomcat.port}/greenstone3/services
    26572646Or press Enter for undeploying the default:localsite /&gt;</input>
    26582647     <echo>Name of service to undeploy: ${axis.undeploy.servicename}</echo>
     
    39533942                <java classname="org.junit.runner.JUnitCore" fork="true">
    39543943                    <arg value="gstests.TestClass"/>
    3955                     <jvmarg value="-DSERVERURL=${server.protocol}://${tomcat.server}:${internal.tomcat.port}${app.path}${server.default.servlet} "/>
     3944                    <jvmarg value="-DSERVERURL=${default.server.protocol}://${tomcat.server}:${default.tomcat.port}${app.path}${server.default.servlet} "/>
    39563945                    <classpath>
    39573946                        <fileset dir="${basedir}/ext/testing/lib/java">
Note: See TracChangeset for help on using the changeset viewer.