Changeset 25443
- Timestamp:
- 2012-04-19T17:57:39+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/build.xml
r25437 r25443 1121 1121 <env key="CATALINA_HOME" value="${catalina.home}"/> 1122 1122 <arg line=">nul 2>&1"/> 1123 </exec> 1124 <!--<antcall target="wait-until-tomcat-stopped"/> 1125 </target> 1126 1127 <target name="wait-until-tomcat-stopped">--> 1128 <echo>Waiting for the server to shutdown...</echo> 1129 <waitfor maxwait="15" maxwaitunit="second" checkevery="1" checkeveryunit="second" timeoutproperty="tomcat.timedout"> 1130 <socket server="${tomcat.server}" port="${tomcat.port}"/> 1131 </waitfor> 1132 1133 <if> 1134 <bool> 1135 <isset property="${tomcat.timedout}"/> 1136 </bool> 1137 <property name="tomcat.isrunning" value="true"/> 1138 <echo>WARNING: Checked socket 15 times, but port ${tomcat.port} still busy. Going to try to continue anyway...</echo> 1139 <else> 1140 <echo>Tomcat is stopped.</echo> 1141 <property name="tomcat.isrunning" value="false"/> 1142 </else> 1143 </if> 1123 </exec> 1144 1124 </target> 1145 1125 … … 1157 1137 </target> 1158 1138 1159 <target name="stop-tomcat" description="Shutdown only Tomcat if running"><!-- depends="check-tomcat-running" if="tomcat.isrunning">--> 1139 <!-- stop-tomcat checks if the tomcat server is already running. If it appears to be running 1140 (regardless of whether tomcat was just starting to shut down), this target calls force-stop-tomcat 1141 to issue the shutdown command to tomcat. Then it waits for at most 15 seconds for the server to 1142 actually stop by checking the socket at which tomcat listens every second, printing a warning 1143 at the end of the max wait time of 15 seconds if tomcat was still running. --> 1144 <target name="stop-tomcat" description="Shutdown only Tomcat if running" depends="check-tomcat-running" if="tomcat.isrunning"> 1160 1145 <antcall target="force-stop-tomcat"/> 1146 1147 <property name="wait.numchecks" value="15"/> 1148 <echo>Waiting for the server to shutdown... (${wait.numchecks} seconds max)</echo> 1149 <waitfor maxwait="${wait.numchecks}" maxwaitunit="second" checkevery="1" checkeveryunit="second" timeoutproperty="tomcat.timedout"> 1150 <socket server="${tomcat.server}" port="${tomcat.port}"/> 1151 </waitfor> 1152 1153 <if> 1154 <bool> 1155 <isset property="${tomcat.timedout}"/> 1156 </bool> 1157 <property name="tomcat.isrunning" value="true"/> 1158 <echo>WARNING: Checked the socket ${wait.numchecks} times, but port ${tomcat.port} is still busy.</echo> 1159 <else> 1160 <echo>Tomcat is stopped.</echo> 1161 <property name="tomcat.isrunning" value="false"/> 1162 </else> 1163 </if> 1161 1164 </target> 1162 1165
Note:
See TracChangeset
for help on using the changeset viewer.