Changeset 29749


Ignore:
Timestamp:
2015-02-18T16:35:18+13:00 (9 years ago)
Author:
ak19
Message:

Bringing ext\solr's gs3-setup.bat up to speed with recent changse ing solr's gs3-setup.sh, now that solr's changed to use the GS3 tomcat server instead of solr's included jetty. gs3-setup.bat now reads tomcat.server and tomcat.port from build.properties to set SOLR_HOST and SOLR_PORT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/solr/trunk/src/gs3-setup.bat

    r26510 r29749  
    44
    55set extdesc=the Solr Extension
     6if "%GSDL3SRCHOME%" == "" echo Run the toplevel gs3-setup.bat before calling this script& goto End
    67
     8rem IF USING TOMCAT SERVER FOR SOLR
     9:: If using tomcat, read the tomcat host and port from the toplevel GS3 build.properties
     10:: http://en.kioskea.net/faq/1757-how-to-read-a-file-line-by-line
     11:: The following reads build.properties line by line, tokenizing it around the = sign, then
     12:: sets the SOLR_PORT and SOLR_HOST to the values of tomcat.port and tomcat.host properties
     13
     14set SOLR_PORT=8983
     15set SOLR_HOST=localhost
     16:: Loosely based on
     17:: http://stackoverflow.com/questions/7708681/how-to-read-from-a-properties-file-using-batch-script
     18FOR /F "tokens=1,2 delims==" %%G IN (%GSDL3SRCHOME%\build.properties) DO (
     19    if "%%G"=="tomcat.server" set SOLR_HOST=%%H
     20    if "%%G"=="tomcat.port" set SOLR_PORT=%%H
     21)
     22echo Tomcat host: %SOLR_HOST%
     23echo Tomcat port: %SOLR_PORT%
     24
     25
     26rem IF USING JETTY SERVER FOR SOLR
    727:: The port Jetty runs on:
    828set SOLR_JETTY_PORT=8983
     
    6383:: variables with brackets in them, such as "Program Files (x86)"
    6484
    65 echo ++Solr/Jetty server will run on port %SOLR_JETTY_PORT% (+ port %JETTY_STOP_PORT% for shutdown command)"
     85::echo ++Solr/Jetty server will run on port %SOLR_JETTY_PORT% (+ port %JETTY_STOP_PORT% for shutdown command)
     86echo ++Solr will run off the tomcat server on port %SOLR_PORT%
    6687echo --These port values can be changed by editing:
    6788echo --  %0
Note: See TracChangeset for help on using the changeset viewer.