Changeset 31489

Show
Ignore:
Timestamp:
10.03.2017 19:16:57 (3 years ago)
Author:
ak19
Message:

1. new target get-solr-servlet-url to be used when solr building code tries to work out solr url to communicate to. 2. Changed all references to http in greenstone URL to refer to the new property server.protocol in build.props, so that the build.xml file becomes more robust to http and https.

Location:
main/trunk/greenstone3
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.properties.in

    r30672 r31489  
    33 
    44## Tomcat installation 
     5 
     6# The protocol (http, https) 
     7server.protocol=http 
     8 
    59# Set this to the internet/intranet name of the machine that Tomcat is/will be  
    610# run on. localhost is fine for accessing the server from the local machine,  
     
    1822# The context name of your GS3 digital library. By default this will be "greenstone3". Ensure this has a value. 
    1923greenstone.context=greenstone3 
     24 
     25# solr generally lives off /solr from the base greenstone URL 
     26solr.context=solr 
     27 
    2028 
    2129## If creating a GS3 set up with a dispersed web folder ("web-dispersed" GS3), with GS3 in a read-only location, then  
  • main/trunk/greenstone3/build.xml

    r31142 r31489  
    835835 
    836836  <target name="get-default-servlet-url"> 
    837     <echo>http://${tomcat.server}:${tomcat.port}${app.path}${server.default.servlet}</echo> 
    838   </target>  
     837    <echo>${server.protocol}://${tomcat.server}:${tomcat.port}${app.path}${server.default.servlet}</echo> 
     838  </target> 
     839 
     840  <target name="get-solr-servlet-url"> 
     841    <echo>${server.protocol}://${tomcat.server}:${tomcat.port}/${solr.context}</echo> 
     842  </target> 
    839843 
    840844  <target name="check-derbyserver-running"> 
     
    925929    </if> 
    926930    <if><bool><isset property="install.flax"/></bool> 
    927         <property name="url" value="http://${tomcat.server}:${tomcat.port}${app.path}/flax"/> 
     931        <property name="url" value="${server.protocol}://${tomcat.server}:${tomcat.port}${app.path}/flax"/> 
    928932    <else> 
    929         <property name="url" value="http://${tomcat.server}:${tomcat.port}${app.path}/"/> 
     933        <property name="url" value="${server.protocol}://${tomcat.server}:${tomcat.port}${app.path}/"/> 
    930934    </else> 
    931935    </if> 
     
    16021606      <and> 
    16031607        <socket server="${tomcat.server}" port="${tomcat.port}"/> 
    1604         <http url="http://${tomcat.server}:${tomcat.port}${app.path}/index.html"/> 
     1608        <http url="${server.protocol}://${tomcat.server}:${tomcat.port}${app.path}/index.html"/> 
    16051609      </and> 
    16061610    </waitfor> 
     
    16111615    <if><bool><istrue value="${tomcat.isstarted}"/></bool> 
    16121616      <echo>**************************************</echo> 
    1613       <echo>A WEB SERVER IS ALREADY RUNNING ON http://${tomcat.server}:${tomcat.port}. NOT STARTING.</echo> 
     1617      <echo>A WEB SERVER IS ALREADY RUNNING ON ${server.protocol}://${tomcat.server}:${tomcat.port}. NOT STARTING.</echo> 
    16141618      <echo>**************************************</echo> 
    16151619      <else> 
     
    16671671      <and> 
    16681672        <socket server="${tomcat.server}" port="${tomcat.port}"/> 
    1669         <http url="http://${tomcat.server}:${tomcat.port}${app.path}/index.html"/> 
     1673        <http url="${server.protocol}://${tomcat.server}:${tomcat.port}${app.path}/index.html"/> 
    16701674      </and> 
    16711675    </waitfor> 
     
    16761680  <target name="reconfigure" description="Reconfigure the message router"> 
    16771681    <waitfor maxwait="5" maxwaitunit="second"> 
    1678       <http url="http://${tomcat.server}:${tomcat.port}${app.path}${server.default.servlet}?a=s&amp;sa=c"/> 
     1682      <http url="${server.protocol}://${tomcat.server}:${tomcat.port}${app.path}${server.default.servlet}?a=s&amp;sa=c"/> 
    16791683    </waitfor> 
    16801684  </target> 
     
    16831687  <target name="reconfigure-collection" description="Reconfigure the collection"> 
    16841688    <waitfor maxwait="5" maxwaitunit="second"> 
    1685       <http url="http://${tomcat.server}:${tomcat.port}${app.path}${server.default.servlet}?a=s&amp;sa=c&amp;sc=${collection}"/> 
     1689      <http url="${server.protocol}://${tomcat.server}:${tomcat.port}${app.path}${server.default.servlet}?a=s&amp;sa=c&amp;sc=${collection}"/> 
    16861690    </waitfor> 
    16871691  </target> 
     
    17161720  <target name="check-tomcat-running"> 
    17171721    <condition property="tomcat.isrunning"> 
    1718       <!--<http url="http://${tomcat.server}:${tomcat.port}${app.path}"/>--> 
    1719       <http url="http://${tomcat.server}:${tomcat.port}"/> 
     1722      <!--<http url="${server.protocol}://${tomcat.server}:${tomcat.port}${app.path}"/>--> 
     1723      <http url="${server.protocol}://${tomcat.server}:${tomcat.port}"/> 
    17201724    </condition> 
    17211725  </target> 
     
    17261730  <target name="check-tomcat-started"> 
    17271731    <condition property="tomcat.isstarted"> 
    1728       <http url="http://${tomcat.server}:${tomcat.port}"/> 
     1732      <http url="${server.protocol}://${tomcat.server}:${tomcat.port}"/> 
    17291733    </condition> 
    17301734  </target> 
     
    20232027      <classpath refid="compile.classpath"/> 
    20242028      <arg value="-l"/> 
    2025       <arg value="http://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/> 
     2029      <arg value="${server.protocol}://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/> 
    20262030      <arg file="${basedir}/resources/soap/deploy.wsdd"/> 
    20272031    </java> 
     
    20392043      <classpath refid="compile.classpath"/> 
    20402044      <arg value="-l"/> 
    2041       <arg value="http://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/> 
     2045      <arg value="${server.protocol}://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/> 
    20422046      <arg file="${basedir}/resources/soap/undeploy.wsdd"/> 
    20432047    </java> 
     
    20712075  <target name="get-undeploy-service-name" unless="axis.undeploy.servicename"> 
    20722076    <input addproperty="axis.undeploy.servicename" defaultvalue="localsite">Please enter the full name of the service you wish to undeploy. 
    2073 To find out which web services you've got deployed, point your browser to http://HOST:PORT/greenstone3/services  
     2077To find out which web services you've got deployed, point your browser to ${server.protocol}://${tomcat.server}:${tomcat.port}/greenstone3/services  
    20742078Or press Enter for undeploying the default:localsite /&gt;</input> 
    20752079     <echo>Name of service to undeploy: ${axis.undeploy.servicename}</echo> 
     
    33703374                <java classname="org.junit.runner.JUnitCore" fork="true"> 
    33713375                    <arg value="gstests.TestClass"/> 
    3372                     <jvmarg value="-DSERVERURL=http://${tomcat.server}:${tomcat.port}${app.path}${server.default.servlet} "/> 
     3376                    <jvmarg value="-DSERVERURL=${server.protocol}://${tomcat.server}:${tomcat.port}${app.path}${server.default.servlet} "/> 
    33733377                    <classpath> 
    33743378                        <fileset dir="${basedir}/ext/testing/lib/java">