Changeset 10069 for trunk/gsdl3
- Timestamp:
- 2005-06-13T14:19:47+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/build.xml
r9986 r10069 51 51 <property name="build.home" value="${basedir}/build"/> 52 52 <property name="packages.home" value="${basedir}/packages"/> 53 <property name="javalib" value="${basedir}/lib/java"/>54 53 <property name="web.home" value="${basedir}/web"/> 55 <property name="web.lib" value="${web.home}/lib"/> 54 <!-- jar files needed by applets go here --> 55 <property name="web.applet" value="${web.home}/applet"/> 56 <!-- jar files needed by the servlet (and extra ones) go here --> 57 <property name="web.lib" value="${web.home}/WEB-INF/lib"/> 58 <!-- other files needed by the servlet go here --> 56 59 <property name="web.classes" value="${web.home}/WEB-INF/classes"/> 60 <!-- jni libraries and java wrappers go here --> 61 <property name="lib.jni" value="${basedir}/lib/jni"/> 57 62 58 63 <property name="javadocs" value="${basedir}/docs/javadoc"/> … … 61 66 <property name="app.path" value="/${app.name}"/> 62 67 <property name="app.version" value="3.00alpha"/> 68 69 <!-- catalina home is set to tomcat basedir is already installed, otherwise 70 use greenstone's tomcat --> 71 <condition property="catalina.home" value="${tomcat.installed.path}"> 72 <and> 73 <isset property="tomcat.installed.path"/> 74 <not> 75 <equals arg1="" arg2="${tomcat.installed.path}"/> 76 </not> 77 </and> 78 </condition> 63 79 <property name="catalina.home" value="${basedir}/comms/jakarta/tomcat"/> 64 80 65 81 <property name="os.linux" value="Linux"/> <!-- mac??--> 66 82 <property name="os.windows" value="Windows 95,Windows 98,Windows 2000,Windows XP, Windows NT,Windows ME"/> <!-- check this!!!--> … … 115 131 116 132 <path id="compile.classpath"> 117 <!-- Include all jar files in our lib directory --> 118 <pathelement location="${javalib}"/> 119 <fileset dir="${javalib}"> 133 <!-- Include all jar files and libraries in our jni lib directory --> 134 <pathelement location="${lib.jni}"/> 135 <fileset dir="${lib.jni}"> 136 <include name="*.jar"/> 137 </fileset> 138 <!-- Include all jar files in our web lib directory --> 139 <pathelement location="${web.lib}"/> 140 <fileset dir="${web.lib}"> 120 141 <include name="*.jar"/> 121 142 </fileset> 122 143 <!-- Include the resources directory --> 123 <pathelement location="${basedir}/resources/java"/> 124 <pathelement location="${basedir}/resources/dtd"/> 144 <!-- <pathelement location="${basedir}/resources/dtd"/>--> 125 145 126 146 <!-- Include the axis jar files --> … … 130 150 131 151 <!-- include the jar files from the packages --> 132 <!-- mg and mgpp get installed into lib/java but they may not be there yet --> 133 <pathelement location="${javalib}/mg.jar"/> 134 <pathelement location="${javalib}/mgpp.jar"/> 152 <!-- mg and mgpp get installed into lib/jni but they may not be there yet 153 so we add them in by name --> 154 <pathelement location="${lib.jni}/mg.jar"/> 155 <pathelement location="${lib.jni}/mgpp.jar"/> 135 156 <pathelement location="${vishnu.home}/build/vishnu.jar"/> 136 157 … … 149 170 </path> 150 171 151 <path id="running.path"> 172 <path id="local.tomcat.classpath"> 173 <!-- explicitly include the jni java wrappers in the classpath --> 174 <pathelement location="${lib.jni}"/> 175 <fileset dir="${lib.jni}"> 176 <include name="*.jar"/> 177 </fileset> 178 </path> 179 180 <path id="local.tomcat.path"> 152 181 <pathelement location="${mysql.home}/bin"/> 153 182 <pathelement location="${basedir}/bin/script"/> 154 183 <pathelement location="${basedir}/bin"/> 155 <pathelement location="${ basedir}/lib"/>184 <pathelement location="${lib.jni}"/> 156 185 <pathelement path="${env.PATH}"/> 157 186 <pathelement path="${env.Path}"/> 158 187 </path> 159 188 160 <path id="ld.library.path"> 161 <pathelement path="${env.LD_LIBRARY_PATH}"/> 162 <pathelement location="${basedir}/lib"/> 163 <pathelement location="${mysql.home}/lib/mysql"/> 164 </path> 165 166 <target name="test-java"> 189 <target name="test-java"> 167 190 <echo>${ant.java.version}</echo> 168 </target>191 </target> 169 192 <!-- ==================== Primary and Global Targets ============================= --> 170 193 … … 174 197 description="Install Greenstone 3. Use this when you first checkout the code. Also running this target later on will reinstall Greenstone. Most things will be reset back to their defaults, except for code changes."/> 175 198 176 <target name="prepare" depends="init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-mysql,prepare- collections"/>177 178 <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building "179 description="Do a cvs update for all sources. Doesn't re ompile the code."/>180 181 <target name="configure" depends="init,configure-tomcat,configure- files,configure-packages,configure-core,configure-gs2building"199 <target name="prepare" depends="init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-mysql,prepare-web"/> 200 201 <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web" 202 description="Do a cvs update for all sources. Doesn't recompile the code."/> 203 204 <target name="configure" depends="init,configure-tomcat,configure-web,configure-packages,configure-core,configure-gs2building" 182 205 description="Configure the installation. Includes setting up config files and configuring the C/C++ packages. This is called from install and update. Should be re-run if you change the build.properties file."/> 183 206 … … 186 209 <target name="clean-windows-c++" depends="init,clean-windows-c++-gs2building,clean-windows-c++-packages" 187 210 description="Remove C++ compiled code for Windows. Requires Microsoft Visual Studio"/> 188 <target name="compile" depends="init,compile- extra,compile-packages,compile-core,compile-gs2building"211 <target name="compile" depends="init,compile-web,compile-packages,compile-core,compile-gs2building" 189 212 description="Compile all the source code, includes core, packages and gs2building if necessary. Copy jar files and executables to their correct places."/> 190 213 <target name="compile-windows-c++" depends="init,compile-windows-c++-gs2building,compile-windows-c++-packages" 191 214 description="Compile the C/C++ code for Windows. Requires Microsoft Visual Studio"/> 192 <target name="update" depends="init,update-packages,update-core,update-gs2building "215 <target name="update" depends="init,update-packages,update-core,update-gs2building,update-web" 193 216 description="Update (thru CVS) all the source (including core, packages and gs2building) and recompile. Similar to install but doesn't reinstall components such as Tomcat and axis."/> 194 217 … … 268 291 <available file="${basedir}/gs2build" property="gs2build.present"/> 269 292 <available file="${basedir}/comms/soap/axis" property="axis.present"/> 270 <available file="${ basedir}/comms/jakarta/tomcat/webapps/axis" property="axis.installed"/>293 <available file="${catalina.home}/webapps/axis" property="axis.installed"/> 271 294 <condition property="gsdl2.islocal"> 272 295 <or> … … 316 339 </target> 317 340 318 <!-- ========== MiscellaneousTargets ================================ -->319 320 <target name="prepare- collections">321 <property name="collect.dir" value="${ basedir}/web/sites/localsite/collect"/>341 <!-- ========== Web app Targets ================================ --> 342 343 <target name="prepare-web"> 344 <property name="collect.dir" value="${web.home}/sites/localsite/collect"/> 322 345 <!-- gs3mgdemo --> 323 346 <unzip src="${collect.dir}/gs3mgdemo/import.zip" … … 344 367 <unzip src="${collect.dir}/gberg/index/index.zip" 345 368 dest="${collect.dir}/gberg/index"/> 346 </target> 347 348 <target name="configure-files" depends="configure-files-gsdl3,configure-files-server"/> 349 350 <target name="configure-files-gsdl3" depends="init"> 369 <mkdir dir="${web.home}/applet"/> 370 </target> 371 372 <target name="configure-web" depends="configure-web-gsdl3,configure-web-server"/> 373 374 <target name="configure-web-gsdl3" depends="init"> 351 375 <filter token="gsdl3home" value="${basedir}"/> 352 <copy file="${ basedir}/web/WEB-INF/web.xml.in" tofile="${basedir}/web/WEB-INF/web.xml" filtering="true" overwrite="true" />353 <copy file="${basedir}/resources/ java/SOAPServer.cfg.in" tofile="${basedir}/resources/java/SOAPServer.cfg" filtering="true" overwrite="true"/>354 </target> 355 356 <target name="configure- files-server" depends="init">376 <copy file="${web.home}/WEB-INF/web.xml.in" tofile="${web.home}/WEB-INF/web.xml" filtering="true" overwrite="true" /> 377 <copy file="${basedir}/resources/soap/SOAPServer.cfg.in" tofile="${web.classes}/SOAPServer.cfg" filtering="true" overwrite="true"/> 378 </target> 379 380 <target name="configure-web-server" depends="init"> 357 381 <filter token="port" value="${tomcat.port}"/> 358 382 <filter token="hostname" value="${tomcat.server}"/> 359 <copy file="${ basedir}/web/sites/localsite/siteConfig.xml.in" tofile="${basedir}/web/sites/localsite/siteConfig.xml" filtering="true" overwrite="true"/>360 <copy file="${ basedir}/web/sites/gateway/siteConfig.xml.in" tofile="${basedir}/web/sites/gateway/siteConfig.xml" filtering="true" overwrite="true"/>361 </target> 362 363 <target name="compile- extra" depends="init">364 <javac srcdir="${web. home}/WEB-INF/classes"365 destdir="${web. home}/WEB-INF/classes"383 <copy file="${web.home}/sites/localsite/siteConfig.xml.in" tofile="${web.home}/sites/localsite/siteConfig.xml" filtering="true" overwrite="true"/> 384 <copy file="${web.home}/sites/gateway/siteConfig.xml.in" tofile="${web.home}/sites/gateway/siteConfig.xml" filtering="true" overwrite="true"/> 385 </target> 386 387 <target name="compile-web" depends="init"> 388 <javac srcdir="${web.classes}" 389 destdir="${web.classes}" 366 390 debug="${compile.debug}" 367 391 deprecation="${compile.deprecation}" … … 373 397 </target> 374 398 375 376 399 <target name="cvsupdate-web"> 400 <cvs command="update -dP" dest="${web.home}"/> 401 </target> 402 403 <target name="update-web" depends="init,cvsupdate-web,configure-web"/> 377 404 378 405 <!-- ======================= Tomcat Targets ========================== --> … … 412 439 dest="${basedir}/comms/jakarta"/> 413 440 <copy file="${basedir}/comms/jakarta/jakarta-tomcat-5.5.7/common/endorsed/xml-apis.jar" 414 tofile="${ basedir}/web/lib/xml-apis.jar"/>441 tofile="${web.applet}/xml-apis.jar"/> 415 442 <copy file="${basedir}/comms/jakarta/jakarta-tomcat-5.5.7/common/endorsed/xercesImpl.jar" 416 tofile="${basedir}/web/lib/xercesImpl.jar"/> 417 </target> 418 419 <target name="configure-tomcat" depends="init" if="tomcat.islocal"> 443 tofile="${web.applet}/xercesImpl.jar"/> 444 </target> 445 446 <target name="configure-tomcat" depends="init,configure-tomcat-local,configure-tomcat-external"/> 447 448 <target name="configure-tomcat-local" depends="init" if="tomcat.islocal"> 420 449 <!-- re-setup the server.xml file --> 421 450 <copy file="${basedir}/comms/jakarta/server.xml.in" tofile="${basedir}/comms/jakarta/tomcat/conf/server.xml" overwrite="true"> … … 427 456 </target> 428 457 458 <target name="configure-tomcat-external" depends="init" unless="tomcat.islocal"> 459 <!-- re-setup the server.xml file --> 460 <!-- need to edit the config file, or do we get the user to do this???--> 461 </target> 462 429 463 <target name="reload" description="Reload web application" 430 464 depends="init,setup-catalina-ant-tasks"> … … 434 468 435 469 <target name="start-tomcat" description="Startup only Tomcat" depends="init" if="tomcat.islocal"> 436 <property name="tomcat.classpath" refid="compile.classpath"/>437 <property name="tomcat.path" refid=" running.path"/>470 <property name="tomcat.classpath" refid="local.tomcat.classpath"/> 471 <property name="tomcat.path" refid="local.tomcat.path"/> 438 472 <property name="catalina.opts" value="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx400M"/> 439 473 <exec executable="${catalina.home}/bin/startup.sh" os="${os.linux}" dir="${catalina.home}/bin" spawn="false"> … … 577 611 </exec> 578 612 <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}" 579 input="${ basedir}/web/sites/localsite/collect/gs3mgdemo/mysqldatadump.sql">613 input="${web.home}/sites/localsite/collect/gs3mgdemo/mysqldatadump.sql"> 580 614 <arg value="--user=root"/> 581 615 <arg value="localsite_gs3mgdemo"/> … … 642 676 </move> 643 677 <!-- install the webapp into tomcat --> 644 <copy todir="${ basedir}/comms/jakarta/tomcat/webapps/axis">678 <copy todir="${catalina.home}/webapps/axis"> 645 679 <fileset dir="${basedir}/comms/soap/axis/webapps/axis"/> 646 680 </copy> … … 724 758 </manifest> 725 759 </jar> 726 <copy file="${build.home}/gsdl3.jar" todir="${javalib}"/>727 760 <copy file="${build.home}/gsdl3.jar" todir="${web.lib}"/> 728 761 </target> … … 736 769 <cvs command="update -P"/> 737 770 </target> 771 738 772 <target name="configure-core"/> 739 773 <target name="update-core" depends="init,cvsupdate-core,clean-core,compile-core" … … 742 776 <target name="cvsupdate-core"> 743 777 <cvs command="update -l"/> 744 <cvs command="update -dP bin comms dist-resources docs interfaces lib resources src webwinutil"/>778 <cvs command="update -dP bin comms dist-resources docs lib resources src winutil"/> 745 779 </target> 746 780 … … 771 805 </manifest> 772 806 </jar> 773 <copy file="${build.home}/gsdl3.jar" todir="${javalib}"/>774 807 <copy file="${build.home}/gsdl3.jar" todir="${web.lib}"/> 775 <mkdir dir="${web.classes}/org/greenstone/gsdl3"/>776 <copy file="${build.home}/org/greenstone/gsdl3/LibraryServlet.class"777 todir="${web.classes}/org/greenstone/gsdl3"/>778 808 <jar destfile="${build.home}/phind.jar"> 779 809 <fileset dir="${build.home}"> … … 784 814 </manifest> 785 815 </jar> 786 <copy file="${build.home}/phind.jar" todir="${javalib}"/> 787 <copy file="${build.home}/phind.jar" todir="${web.lib}"/> 816 <copy file="${build.home}/phind.jar" todir="${web.applet}"/> 788 817 <jar destfile="${build.home}/anttasks.jar"> 789 818 <fileset dir="${build.home}"> … … 794 823 </manifest> 795 824 </jar> 796 <copy file="${build.home}/anttasks.jar" todir="${ javalib}"/>825 <copy file="${build.home}/anttasks.jar" todir="${basedir}/lib/java"/> 797 826 <jar destfile="${build.home}/gsdl3test.jar"> 798 827 <fileset dir="${build.home}"> … … 860 889 <!-- gsdl-as : just call the ant target--> 861 890 <ant antfile="${gsdl-as.home}/build.xml" dir="${gsdl-as.home}" 862 inheritall="false" target="clean"/> 891 inheritall="false" target="clean"> 892 <property name="catalina.home" value="${catalina.home}"/> 893 </ant> 863 894 </target> 864 895 … … 921 952 <echo>Compiling Vishnu</echo> 922 953 <ant antfile="${vishnu.home}/build.xml" dir="${vishnu.home}" 923 inheritall="false" target="compile"/> 954 inheritall="false" target="compile"> 955 <property name="catalina.dir" value="${catalina.home}"/> 956 </ant> 924 957 925 958 <!-- gsdl-as --> 926 959 <echo>Compiling GSDL-AS</echo> 927 960 <ant antfile="${gsdl-as.home}/build.xml" dir="${gsdl-as.home}" 928 inheritall="false" target="compile"/> 961 inheritall="false" target="compile"> 962 <property name="catalina.home" value="${catalina.home}"/> 963 </ant> 929 964 </target> 930 965 … … 1150 1185 1151 1186 1152 <target name="reconfigure-server-settings" depends="init,configure-tomcat,configure- files-server"1187 <target name="reconfigure-server-settings" depends="init,configure-tomcat,configure-web-server" 1153 1188 description="If you have changed any of the Tomcat properties in the build.properties file, run this target to update the Tomcat configuration, and any Greenstone configuration files that specify the server address"> 1154 1189 </target>
Note:
See TracChangeset
for help on using the changeset viewer.