Changeset 37333


Ignore:
Timestamp:
2023-02-20T11:33:21+13:00 (15 months ago)
Author:
davidb
Message:

Shifting internal/external servlet-url properties to top-level to help with install-webswing-ext and configure-webswing-ext

File:
1 edited

Legend:

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

    r37315 r37333  
    319319    </condition>
    320320
     321    <condition property="local.ws.url" value="ws://${localhost.server.http}" else="ws://${localhost.server.http}:${localhost.port.http}">
     322      <equals arg1="${localhost.port.http}" arg2="80" trim="true"/>
     323    </condition>
     324
     325    <!-- Set global property for internal.servlet-url -->
     326    <property name="internal.servlet-url" value="${local.http.url}/${greenstone.context}${server.default.servlet}"/>
     327     
     328    <!-- Set global property for external.servlet-url -->
     329    <if>
     330      <bool><isset property="revproxy.domain"/></bool>
     331     
     332      <if>
     333    <bool><isset property="revproxy.opt_port"/></bool>
     334    <property name="revproxy.colon_opt_port" value=":${revproxy.opt_port}"/>
     335    <else>
     336      <property name="revproxy.colon_opt_port" value=""/>
     337    </else>
     338      </if>
     339      <if>
     340    <bool><isset property="revproxy.context"/></bool>
     341    <property name="revproxy.app.path" value="/${revproxy.context}"/>
     342    <else>
     343      <property name="revproxy.app.path" value="/${greenstone.context}"/>
     344    </else>
     345      </if>
     346     
     347      <property name="external.servlet-url" value="${revproxy.protocol}://${revproxy.domain}${revproxy.colon_opt_port}${revproxy.app.path}${server.default.servlet}"/>
     348     
     349      <else>
     350    <property name="external.servlet-url" value="${default.server.protocol}://${tomcat.server}:${default.tomcat.port}/${greenstone.context}${server.default.servlet}"/>
     351      </else>
     352    </if>
     353   
     354
     355
     356
     357
     358
    321359    <!-- On linux, if testing https certification, pass in minus-minus-staging. If not testing on linux, nothing extra to pass in.
    322360         On windows or mac, if testing https certification, nothing extra to pass in. If not testing on windows or mac, pass in minus-minus-live.
     
    12171255 
    12181256  <target name="get-revproxy-servlet-url">
     1257    <!-- the following is now globally set earlier in file -->
     1258    <!--
    12191259    <if><bool><isset property="revproxy.opt_port"/></bool>
    12201260    <property name="revproxy.colon_opt_port" value=":${revproxy.opt_port}"/>
     
    12321272   
    12331273    <echo>${revproxy.protocol}://${revproxy.domain}${revproxy.colon_opt_port}${revproxy.app.path}${server.default.servlet}</echo>
     1274    -->
     1275    <echo>${external.servlet-url}</echo>
    12341276  </target>
    12351277
     
    12501292
    12511293  <target name="get-internal-servlet-url">
     1294    <!-- The following is now resolved earlier on (top-level), and set as a property -->
     1295    <!--
    12521296    <antcall target="get-local-http-servlet-url" />
    1253   </target>
    1254 
    1255   <target name="get-external-servlet-url">     
     1297    -->
     1298    <echo>${internal.servlet-url}</echo>
     1299  </target>
     1300
     1301  <target name="get-external-servlet-url">
     1302    <!-- The following is now resolved earlier on (top-level), and set as a property -->
     1303    <!--
    12561304    <if><bool><isset property="revproxy.domain"/></bool>
    12571305      <antcall target="get-revproxy-servlet-url"/>
     
    12601308      </else>
    12611309    </if>
     1310    -->
     1311    <echo>${external.servlet-url}</echo>
    12621312  </target>
    12631313 
     
    27512801      <arg value="-Dweb.writablehome=${web.writablehome.unix}"/>
    27522802      <arg value="-Dgsdlos=${env.GSDLOS}"/>
     2803      <arg value="-Dinternal.websocket-baseurl=${local.ws.url}"/>
     2804      <arg value="-Dinternal.servlet-url=${internal.servlet-url}"/>
     2805      <arg value="-Dexternal.servlet-url=${external.servlet-url}"/>
    27532806      <arg value="configure-extension"/>
    27542807    </exec>
     
    27572810      <arg value="-Dweb.writablehome=${web.writablehome}"/>
    27582811      <arg value="-Dgsdlos=${env.GSDLOS}"/>
     2812      <arg value="-Dinternal.websocket-baseurl=${local.ws.url}"/>
     2813      <arg value="-Dinternal.servlet-url=${internal.servlet-url}"/>
     2814      <arg value="-Dexternal.servlet-url=${external.servlet-url}"/>
    27592815      <arg value="configure-extension"/>
    27602816    </exec>
Note: See TracChangeset for help on using the changeset viewer.