- Timestamp:
- 2015-07-10T20:47:45+12:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/build.xml
r30012 r30013 797 797 </target> 798 798 799 <!-- Need a copy of the check-derby-running target with a distinct property, because ant restart runs 800 both stop and start, which stop and start derby respectively. Both need check the derby socket. 801 Because each property can be set only once during an invocation with ant, ant restart will need 802 two check-derbyserver properties, one for each derby check. --> 803 <target name="check-derbyserver-started"> 804 <condition property="derby.isstarted" value="true" else="false"> 805 <socket server="${derby.server}" port="${derby.server.port}"/> 806 </condition> 807 <echo>Derby is running: ${derby.isstarted}</echo> 808 </target> 809 810 811 <!-- Unused --> 799 812 <target name="start-derby-java" depends="check-derbyserver-running"> 800 813 <if><bool><not><istrue value="${derby.isrunning}"/></not></bool> … … 810 823 </target> 811 824 825 <target name="start-derby" depends="check-derbyserver-started"> 826 <if><bool><not><istrue value="${derby.isstarted}"/></not></bool> 827 <echo>About to launch derby on ${derby.server}:${derby.server.port}</echo> 828 <antcall target="force-start-derby"/> 829 <else> 830 <echo>Derby networked server ALREADY RUNNING on ${derby.server}:${derby.server.port}</echo> 831 </else> 832 </if> 833 </target> 834 812 835 <!-- Using derby 10.1.2.1 813 836 See db-derby-10.1.2.1-bin/docs/html/adminguide/index.html --> 814 <target name="start-derby" depends="check-derbyserver-running"> 815 <if><bool><not><istrue value="${derby.isrunning}"/></not></bool> 816 <echo>About to launch derby on ${derby.server}:${derby.server.port}</echo> 837 <target name="force-start-derby"> 817 838 <property name="derby.server.classpath.prop" refid="derby.server.classpath" /> 818 839 … … 824 845 <arg value="${derby.server.port}"/> 825 846 </exec> 826 <else> 827 <echo>Derby networked server ALREADY RUNNING on ${derby.server}:${derby.server.port}</echo> 828 </else> 829 </if> 847 830 848 </target> 831 849 … … 1514 1532 </target> 1515 1533 1516 1517 <!-- Another way: http://ptrthomas.wordpress.com/2006/03/25/how-to-start-and-stop-tomcat-from-ant/ --> 1518 <target name="start-tomcat" description="Startup only Tomcat" depends="init,check-tomcat-running" if="tomcat.islocal"> 1519 <if><bool><istrue value="${tomcat.isrunning}"/></bool> 1534 <target name="start-tomcat" description="Startup only Tomcat" depends="check-tomcat-started"> 1535 1536 <if><bool><istrue value="${tomcat.isstarted}"/></bool> 1520 1537 <echo>**************************************</echo> 1521 1538 <echo>A WEB SERVER IS ALREADY RUNNING ON http://${tomcat.server}:${tomcat.port}. NOT STARTING.</echo> 1522 1539 <echo>**************************************</echo> 1523 1540 <else> 1541 <antcall target="force-start-tomcat"/> 1542 </else> 1543 </if> 1544 </target> 1545 1546 <!-- Another way: http://ptrthomas.wordpress.com/2006/03/25/how-to-start-and-stop-tomcat-from-ant/ --> 1547 <target name="force-start-tomcat" description="Startup only Tomcat" depends="init" if="tomcat.islocal"> 1548 1524 1549 <property name="tomcat.classpath" refid="local.tomcat.classpath"/> 1525 1550 <property name="tomcat.path" refid="local.tomcat.path"/> … … 1571 1596 </waitfor> 1572 1597 1573 </else>1574 </if>1575 1598 </target> 1576 1599 … … 1622 1645 </condition> 1623 1646 </target> 1647 1648 <!-- Need a copy of the check-tomcat-running target with a distinct property, because ant restart runs 1649 both stop and start, both of which need to do tomcat checks. Each property can be set only once during 1650 an invocation with ant. So ant restart will need two properties to store each of the tomcat checks --> 1651 <target name="check-tomcat-started"> 1652 <condition property="tomcat.isstarted"> 1653 <http url="http://${tomcat.server}:${tomcat.port}"/> 1654 </condition> 1655 </target> 1656 1657 1624 1658 1625 1659 <!-- stop-tomcat checks if the tomcat server is already running. If it appears to be running … … 1650 1684 </target> 1651 1685 1652 <target name="restart-tomcat" description="Shutdown and restart only Tomcat" depends="init,stop-tomcat, start-tomcat"/>1686 <target name="restart-tomcat" description="Shutdown and restart only Tomcat" depends="init,stop-tomcat,force-start-tomcat"/> 1653 1687 1654 1688 <target name="setup-catalina-ant-tasks"> … … 1844 1878 <istrue value="${tomcat.isrunning}"/> 1845 1879 </bool> 1846 <antcall target=" start-tomcat"/>1880 <antcall target="force-start-tomcat"/> 1847 1881 </if> 1848 1882 --> … … 1931 1965 <target name="deploy-localsite" depends="init" 1932 1966 description="Deploy the SOAP server for localsite. Will start and stop Tomcat."> 1933 <antcall target=" start-tomcat"/>1967 <antcall target="force-start-tomcat"/> 1934 1968 <echo>Deploying ${base.webservice.name} web services for localsite under service name: localsite</echo> 1935 1969 <antcall target="create-deployment-files">
Note:
See TracChangeset
for help on using the changeset viewer.