Changeset 9568


Ignore:
Timestamp:
2005-04-07T10:58:53+12:00 (19 years ago)
Author:
kjdon
Message:

more stuff

File:
1 edited

Legend:

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

    r9567 r9568  
    6666  <property name="os.windows" value="Windows 95,Windows 98,Windows 2000,Windows XP, Windows NT,Windows ME"/> <!-- check this!!!-->
    6767
     68  <condition property="current.os.islinux">
     69    <os family="unix"/>
     70  </condition>
     71  <condition property="current.os.iswindows">
     72    <os family="windows"/>
     73  </condition>
    6874  <!-- ============= Base dirs for each package and component ============ -->
    6975  <property name="applet.home" value="${src.home}/org/greenstone/applet"/>
     
    242248
    243249 <!-- this is all the do-once things -->
    244   <target name="prepare" depends="init,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-collections">
     250  <target name="prepare" depends="init,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-mysql,prepare-collections">
    245251  </target>
    246252 
     
    327333  </target>
    328334 
     335  <target name="prepare-mysql" depends="init,install-mysql-linux,install-mysql-windows">
     336
     337  </target>
     338
     339  <target name="install-mysql-linux" depends="init" if="current.os.islinux">
     340    <echo>linux mysql</echo>
     341    <!-- get teh file -->
     342    <untar src="${packages.home}/mysql-standard-4.1.11-pc-linux-gnu-i686.tar.gz"
     343      dest="${packages.home}"
     344      compression="gzip"/>
     345    <move todir="${packages.dir}/mysql">
     346      <fileset dir="${packages.dir}/mysql-standard-4.1.11"/>
     347    </move>
     348  </target>
     349
     350  <target name="install-mysql-windows" depends="init" if="current.os.iswindows">
     351    <echo>windows is true</echo>
     352  </target>
     353
    329354  <target name="prepare-axis" depends="init">
    330355    <get src="http://www.greenstone.org/gs3files/axis-1_1.zip"
     
    673698  </target>
    674699
    675  
    676 
    677 
    678  
    679700
    680701<!-- ============ running targets ========================-->
     
    747768      <env key="CLASSPATH" path="${tomcat.classpath}"/>
    748769    </exec>
     770    <!-- wait for the server to startup in case other targets need it running -->
     771    <waitfor maxwait="5" maxwaitunit="second">
     772      <and>
     773    <socket server="${tomcat.server}" port="${tomcat.port}"/>
     774    <http url="http://${tomcat.server}:${tomcat.port}/gsdl3/index.html"/>
     775      </and>
     776    </waitfor>
    749777  </target>
    750778
     
    753781  </target>
    754782 
    755   <target name="restart" description="Shutdown and restart the GReenstone servers" depends="init,shutdown,startup"/>
    756 
    757   <target name="test" description="Run the JUnit test suite (incomplete)"
     783  <target name="restart" description="Shutdown and restart the Greenstone servers" depends="init,shutdown,startup"/>
     784
     785  <target name="test" description="Run the (incomplete) JUnit test suite "
    758786    depends="init">
    759787    <mkdir dir="${basedir}/test"/>
     
    792820    </javac>
    793821  </target>
     822
     823  <target name="get-sitename">
     824    <input addproperty="axis.sitename" message="What site? (press enter for default:localsite)" defaultvalue="localsite"/>
     825    <condition property="deploy.exists">
     826      <available file="${basedir}/resources/soap/${axis.sitename}.wsdd"/>
     827    </condition>
     828    <condition property="undeploy.exists">
     829      <available file="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"/>
     830    </condition>
     831    <echo>${axis.sitename}, ${deploy.exists}, ${undeploy.exists}</echo>
     832  </target>
     833
     834  <target name="create-deployment-files" depends="get-sitename"
     835    if="axis.sitename" unless="deploy.exists">
     836    <filter token="sitename" value="${axis.sitename}"/>
     837    <copy file="${basedir}/resources/soap/site.wsdd.template"
     838      tofile="${basedir}/resources/soap/${axis.sitename}.wsdd"
     839      filtering="true"/>
     840     <copy file="${basedir}/resources/soap/undeploy-site.wsdd.template"
     841      tofile="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"
     842      filtering="true"/>
     843    <!-- create the java files and compile them -->
     844    <copy file="${gsdl3.home}/SOAPServer.java.in"
     845      tofile="${gsdl3.home}/SOAPServer${axis.sitename}.java"
     846      filtering="true"/>
     847    <javac srcdir="${src.home}"
     848      destdir="${build.home}"
     849      debug="${compile.debug}"
     850      deprecation="${compile.deprecation}"
     851      optimize="${compile.optimize}">
     852      <classpath refid="compile.classpath"/>
     853      <include name="org/greenstone/gsdl3/SOAPServer${axis.sitename}.java" />
     854    </javac>
     855    <jar destfile="${build.home}/gsdl3.jar">
     856      <fileset dir="${build.home}">
     857    <include name="org/greenstone/gsdl3/**"/>
     858    <exclude name="**/Test.class"/>
     859      </fileset>
     860      <manifest>
     861    <attribute name="Built-By" value="${user.name}" />
     862      </manifest>
     863    </jar>
     864    <copy file="${build.home}/gsdl3.jar" todir="${javalib}"/>
     865    <copy file="${build.home}/gsdl3.jar" todir="${web.lib}"/>
     866  </target>
     867   
     868  <target name="axis-deploy-site" depends="get-sitename,create-deployment-files,restart">
     869    <java classname="org.apache.axis.client.AdminClient">
     870      <classpath refid="compile.classpath"/>
     871      <arg value="-p"/>
     872      <arg value="${tomcat.port}"/>
     873      <arg file="${basedir}/resources/soap/${axis.sitename}.wsdd"/>
     874    </java>   
     875  </target>
     876 
     877  <target name="axis-undeploy-site" depends="get-sitename">
     878    <java classname="org.apache.axis.client.AdminClient">
     879      <classpath refid="compile.classpath"/>
     880      <arg value="-p"/>
     881      <arg value="${tomcat.port}"/>
     882      <arg file="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"/>
     883    </java>
     884  </target>
     885
     886  <!-- mysql targets -->
     887 
    794888</project>
    795889
Note: See TracChangeset for help on using the changeset viewer.