Changeset 9567


Ignore:
Timestamp:
2005-04-06T14:59:45+12:00 (19 years ago)
Author:
kjdon
Message:

I think I have basic installing and tomcat launch finished :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ant-install-branch/gsdl3/build.xml

    r9558 r9567  
    4646  <property file="${user.home}/build.properties"/>
    4747
     48  <!-- get properties from the environment -->
     49  <property environment="env"/>
    4850  <property name="src.home" value="${basedir}/src/java"/>
    4951  <property name="build.home" value="${basedir}/build"/>
     
    7375  <property name="mg.home" value="${packages.home}/mg"/>
    7476  <property name="mgpp.home" value="${packages.home}/mgpp"/>
     77  <property name="mysql.home" value="${packages.home}/mysql"/>
    7578  <property name="gsdl-as.home" value="${packages.home}/gsdl-as"/>
    7679
     
    107110  <path id="compile.classpath">
    108111    <!-- Include all jar files in our lib directory -->
     112    <pathelement location="${javalib}"/>
    109113    <fileset dir="${javalib}">
     114      <include name="*.jar"/>
     115    </fileset>
     116    <!-- Include the resources directory -->
     117    <pathelement location="${basedir}/resources/java"/>
     118    <pathelement location="${basedir}/resources/dtd"/>
     119   
     120    <!-- Include the axis jar files -->
     121    <fileset dir="${basedir}/comms/soap/axis/lib">
    110122      <include name="*.jar"/>
    111123    </fileset>
     
    123135      <include name="*.jar"/>
    124136    </fileset>
    125 
    126     <!-- Include the axis jar files -->
    127     <fileset dir="${basedir}/comms/soap/axis/lib">
    128       <include name="*.jar"/>
    129     </fileset>
    130137  </path>
    131138
     
    144151    description="Remove all old compiled code. Includes core, packages and gs2building if necessary"/>
    145152
    146   <target name="compile" depends="init,compile-packages,compile-core,compile-gs2building"
     153  <target name="compile" depends="init,compile-extra,compile-packages,compile-core,compile-gs2building"
    147154    description="Compile all the source code, includes core, packages and gs2building if necessary. Copy jar files and executables to their correct places."/>
    148155
     
    543550    </exec>
    544551    <exec executable="make" os="Linux"
    545       dir="${mg.home}">
     552      dir="${mgpp.home}">
    546553      <arg value="install"/>
    547554    </exec>
     
    578585  </target>
    579586
    580 <!-- ===================== setup target ===================== -->
    581 
    582 
    583587  <!-- ================== gs2building targets ===============-->
    584588
     
    684688    <taskdef name="reload"    classname="org.apache.catalina.ant.ReloadTask"
    685689      classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
    686   <taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"
    687     classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
    688   <taskdef name="roles"     classname="org.apache.catalina.ant.RolesTask"
    689     classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
    690   <taskdef name="start"     classname="org.apache.catalina.ant.StartTask"
    691     classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
    692   <taskdef name="stop"      classname="org.apache.catalina.ant.StopTask"
    693     classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
    694   <taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask"
    695     classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
    696   </target>
    697 
    698   <target name="gli" description="Run the Greenstone Librarian Interface" depends="gli-local,gli-external"/>
     690    <taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"
     691      classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
     692    <taskdef name="roles"     classname="org.apache.catalina.ant.RolesTask"
     693      classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
     694    <taskdef name="start"     classname="org.apache.catalina.ant.StartTask"
     695      classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
     696    <taskdef name="stop"      classname="org.apache.catalina.ant.StopTask"
     697      classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
     698    <taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask"
     699      classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
     700  </target>
     701
     702  <target name="gli" description="Run the Greenstone Librarian Interface" depends="gli-local,gli-external">
     703    <echo>Running GLI from Ant means that you don't get to see any of the terminal output. If you have problems with GLI and want to see the output, please run the script gli4gs3.sh/bat from the gsdl3/gli directory.
     704    </echo>
     705  </target>
    699706
    700707  <target name="gli-local" depends="init" if="gsdl2.islocal">
     
    721728  </target>
    722729
    723   <target name="launch" description="Launch the Tomcat server" depends="init">
    724    
    725   </target>
    726 
    727  
     730  <target name="startup" description="Launch Greenstone (Tomcat and Mysql)" depends="init">
     731    <property name="tomcat.classpath" refid="compile.classpath"/>
     732    <property name="tomcat.path" value="${basedir}/packages/mysql/bin:${basedir}/bin/script:${basedir}/bin:${env.PATH}"/>
     733    <property name="catalina.opts" value="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx400M"/>
     734    <exec executable="${catalina.home}/bin/startup.sh" os="${os.linux}" dir="${catalina.home}/bin" spawn="false">
     735      <env key="GSDLOS" value="linux"/>
     736      <env key="GSDL3HOME" value="${basedir}"/>
     737      <env key="PATH" path="${tomcat.path}"/>
     738      <env key="CATALINA_OPTS" value="${catalina.opts}"/>
     739      <env key="CLASSPATH" path="${tomcat.classpath}"/>
     740      <env key="LD_LIBRARY_PATH" path="${env.LD_LIBRARY_PATH}:${basedir}/lib:${mysql.home}/lib/mysql"/>
     741    </exec>
     742    <exec executable="${catalina.home}/bin/startup.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="false">
     743      <env key="GSDLOS" value="windows"/>
     744      <env key="GSDL3HOME" value="${basedir}"/>
     745      <env key="PATH" path="${tomcat.path}:${basedir}/lib"/>
     746      <env key="CATALINA_OPTS" value="${catalina.opts}"/>
     747      <env key="CLASSPATH" path="${tomcat.classpath}"/>
     748    </exec>
     749  </target>
     750
     751  <target name="shutdown" description="Shutdown Greenstone (Tomcat and Mysql)" depends="init">
     752    <exec executable="${catalina.home}/bin/shutdown.sh" os="${os.linux}" dir="${catalina.home}/bin" spawn="false"/>
     753  </target>
     754 
     755  <target name="restart" description="Shutdown and restart the GReenstone servers" depends="init,shutdown,startup"/>
     756
    728757  <target name="test" description="Run the JUnit test suite (incomplete)"
    729758    depends="init">
     
    751780    </echo>
    752781  </target>
     782
     783  <target name="compile-extra" depends="init">
     784    <javac srcdir="${web.home}/WEB-INF/classes"
     785      destdir="${web.home}/WEB-INF/classes"
     786      debug="${compile.debug}"
     787      deprecation="${compile.deprecation}"
     788      optimize="${compile.optimize}">
     789      <classpath>
     790    <path refid="compile.classpath"/>
     791      </classpath>
     792    </javac>
     793  </target>
    753794</project>
    754795
Note: See TracChangeset for help on using the changeset viewer.