source: trunk/gsdl3/build.xml@ 10746

Last change on this file since 10746 was 10746, checked in by kjdon, 19 years ago

added in javagdbm compiling stuff

  • Property svn:keywords set to Author Date Id Revision
File size: 64.5 KB
Line 
1<?xml version="1.0"?>
2
3<!-- ======================================================================
4 March 2005
5
6 GSDL3 build and install script
7
8 kjdon
9 ====================================================================== -->
10<project name="gsdl3" default="usage" basedir=".">
11
12 <!-- ============ self defined tasks =================== -->
13
14 <taskdef name="mysetproxy" classname="org.greenstone.anttasks.MySetProxy" classpath="${basedir}/lib/java/anttasks.jar"/>
15 <taskdef name="getuserandpassword" classname="org.greenstone.anttasks.MyGetUserAndPassword" classpath="${basedir}/lib/java/anttasks.jar"/>
16
17
18
19<!-- ===================== Property Definitions =========================== -->
20
21<!--
22
23 Each of the following properties are used in the build script.
24 Values for these properties are set by the first place they are
25 defined, from the following list:
26
27 * Definitions on the "ant" command line (ant -Dfoo=bar compile).
28
29 * Definitions from a "build.properties" file in the top level
30 source directory of this application.
31
32 * Definitions from a "build.properties" file in the user's
33 home directory.
34
35 * Default definitions in this build.xml file.
36
37 You will note below that property values can be composed based on the
38 contents of previously defined properties. This is a powerful technique
39 that helps you minimize the number of changes required when your development
40 environment is modified. Note that property composition is allowed within
41 "build.properties" files as well as in the "build.xml" script.
42
43-->
44
45 <property file="build.properties"/>
46 <property file="${user.home}/build.properties"/>
47
48 <!-- get properties from the environment -->
49 <property environment="env"/>
50 <property name="src.home" value="${basedir}/src/java"/>
51 <property name="build.home" value="${basedir}/build"/>
52 <property name="packages.home" value="${basedir}/packages"/>
53 <!-- this may be set in build.properties, eg if you move the web dir to
54 tomcats webapps directory -->
55 <property name="web.home" value="${basedir}/web"/>
56 <!-- jar files needed by applets go here -->
57 <property name="web.applet" value="${web.home}/applet"/>
58 <!-- jar files needed by the servlet (and extra ones) go here -->
59 <property name="web.lib" value="${web.home}/WEB-INF/lib"/>
60 <!-- other files needed by the servlet go here -->
61 <property name="web.classes" value="${web.home}/WEB-INF/classes"/>
62 <!-- jni libraries and java wrappers go here -->
63 <property name="lib.jni" value="${basedir}/lib/jni"/>
64
65 <property name="javadocs" value="${basedir}/docs/javadoc"/>
66
67 <property name="app.name" value="gsdl3"/>
68 <property name="app.path" value="/${app.name}"/>
69 <property name="app.version" value="3.00alpha"/>
70
71 <!-- catalina home is set to tomcat basedir is already installed, otherwise
72 use greenstone's tomcat -->
73 <condition property="catalina.home" value="${tomcat.installed.path}">
74 <and>
75 <isset property="tomcat.installed.path"/>
76 <not>
77 <equals arg1="" arg2="${tomcat.installed.path}"/>
78 </not>
79 </and>
80 </condition>
81 <property name="catalina.home" value="${basedir}/comms/jakarta/tomcat"/>
82
83 <property name="os.linux" value="Linux"/>
84 <property name="os.mac" value="Mac OS X"/>
85 <property name="os.windows" value="Windows 95,Windows 98,Windows 2000,Windows XP,Windows NT,Windows ME"/> <!-- check this!!!-->
86
87 <!-- this is true for linux and macs -->
88 <condition property="current.os.isunix">
89 <os family="unix"/>
90 </condition>
91
92 <condition property="current.os.isunixnotmac">
93 <and>
94 <os family="unix"/>
95 <not>
96 <os family="mac"/>
97 </not>
98 </and>
99 </condition>
100 <condition property="current.os.ismac">
101 <os family="mac"/>
102 </condition>
103
104 <condition property="current.os.iswindows">
105 <os family="windows"/>
106 </condition>
107
108 <!-- ============= Base dirs for each package and component ============ -->
109 <property name="applet.home" value="${src.home}/org/greenstone/applet"/>
110 <property name="gsdl3.home" value="${src.home}/org/greenstone/gsdl3"/>
111 <property name="anttasks.home" value="${src.home}/org/greenstone/anttasks"/>
112 <property name="gs2build.home" value="${basedir}/gs2build"/>
113 <property name="gli.home" value="${basedir}/gli"/>
114 <property name="vishnu.home" value="${packages.home}/vishnu"/>
115 <property name="mg.home" value="${packages.home}/mg"/>
116 <property name="mgpp.home" value="${packages.home}/mgpp"/>
117 <property name="javagdbm.home" value="${packages.home}/javagdbm"/>
118 <property name="mysql.home" value="${packages.home}/mysql"/>
119 <property name="gsdl-as.home" value="${packages.home}/gsdl-as"/>
120
121<!-- ==================== Compilation Control Options ==================== -->
122
123<!--
124
125 These properties control option settings on the Javac compiler when it
126 is invoked using the <javac> task.
127
128 compile.debug Should compilation include the debug option?
129
130 compile.deprecation Should compilation include the deprecation option?
131
132 compile.optimize Should compilation include the optimize option?
133
134-->
135
136 <property name="compile.debug" value="true"/>
137 <property name="compile.deprecation" value="true"/>
138 <property name="compile.optimize" value="true"/>
139
140<!--
141
142 Rather than relying on the CLASSPATH environment variable, Ant includes
143 features that makes it easy to dynamically construct the classpath you
144 need for each compilation. The example below constructs the compile
145 classpath to include the servlet.jar file, as well as the other components
146 that Tomcat makes available to web applications automatically, plus anything
147 that you explicitly added.
148
149-->
150
151 <path id="compile.classpath">
152 <!-- Include all jar files and libraries in our jni lib directory -->
153 <pathelement location="${lib.jni}"/>
154 <fileset dir="${lib.jni}">
155 <include name="*.jar"/>
156 </fileset>
157 <!-- Include all jar files in our web lib directory -->
158 <pathelement location="${web.lib}"/>
159 <fileset dir="${web.lib}">
160 <include name="*.jar"/>
161 </fileset>
162
163 <!-- Include the axis jar files -->
164 <!--<fileset dir="${basedir}/comms/soap/axis/lib">
165 <include name="*.jar"/>
166 </fileset>-->
167
168 <!-- include the jar files from the packages -->
169 <!-- mg and mgpp get installed into lib/jni but they may not be there yet
170 so we add them in by name -->
171 <pathelement location="${lib.jni}/mg.jar"/>
172 <pathelement location="${lib.jni}/mgpp.jar"/>
173 <pathelement location="${vishnu.home}/build/vishnu.jar"/>
174
175 <!-- Include all elements that Tomcat exposes to applications -->
176 <pathelement location="${catalina.home}/common/classes"/>
177 <fileset dir="${catalina.home}/common/endorsed">
178 <include name="*.jar"/>
179 </fileset>
180 <fileset dir="${catalina.home}/common/lib">
181 <include name="*.jar"/>
182 </fileset>
183 <pathelement location="${catalina.home}/shared/classes"/>
184 <fileset dir="${catalina.home}/shared/lib">
185 <include name="*.jar"/>
186 </fileset>
187 </path>
188
189 <path id="local.tomcat.classpath">
190 <!-- explicitly include the jni java wrappers in the classpath -->
191 <pathelement location="${lib.jni}"/>
192 <fileset dir="${lib.jni}">
193 <include name="*.jar"/>
194 </fileset>
195 </path>
196
197 <path id="local.tomcat.path">
198 <pathelement location="${mysql.home}/bin"/>
199 <pathelement location="${basedir}/bin/script"/>
200 <pathelement location="${basedir}/bin"/>
201 <pathelement location="${lib.jni}"/>
202 <pathelement path="${env.PATH}"/>
203 <pathelement path="${env.Path}"/>
204 </path>
205
206 <target name="test-setup">
207 <echo>ant java version=${ant.java.version}</echo>
208 <echo>is linux : ${current.os.isunix}</echo>
209 <echo>is mac : ${current.os.ismac}</echo>
210 <echo>is unixnotmac : ${current.os.isunixnotmac}</echo>
211 <echo>is windows : ${current.os.iswindows}</echo>
212 </target>
213<!-- ==================== Primary and Global Targets ============================= -->
214
215 <!-- add comments about using xxx-core, xxx-packages if only want certain parts?? -->
216
217 <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-mysql,prepare-web"
218 description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional cvs checkouts and downloads, so you need to be online to run this."/>
219
220 <target name="install" depends="init,configure-mysql,configure,configure-c++,compile,deploy-localsite"
221 description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare install'."/>
222
223 <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web"
224 description="Do a cvs update for all sources. Doesn't recompile the code. You need to be online to run this."/>
225
226 <target name="configure-c++" depends="init,configure-packages,configure-core,configure-gs2building"
227 description="Configure any C/C++ package code and gs2building code if necessary"/>
228
229 <target name="configure" depends="init,configure-tomcat,configure-web"
230 description="Configure the installation. Includes setting up config files. Should be re-run if you change the build.properties file."/>
231
232 <target name="clean" depends="init,clean-packages,clean-core,clean-gs2building"
233 description="Remove all old compiled code. Includes core, packages and gs2building if necessary"/>
234 <target name="clean-windows-c++" depends="init,clean-windows-c++-gs2building,clean-windows-c++-packages"
235 description="Remove C++ compiled code for Windows. Requires Microsoft Visual Studio"/>
236
237 <target name="compile" depends="init,compile-web,compile-packages,compile-core,compile-gs2building"
238 description="Compile all the source code, includes core, packages and gs2building if necessary. Copy jar files and executables to their correct places."/>
239
240 <target name="compile-windows-c++" depends="init,compile-windows-c++-gs2building,compile-windows-c++-packages"
241 description="Compile the C/C++ code for Windows. Requires Microsoft Visual Studio"/>
242
243 <target name="update" depends="init,cvsupdate,clean,configure,configure-c++,compile"
244 description="Update (thru CVS) all the source (including core, packages and gs2building), then clean, configure and recompile."/>
245
246 <target name="start" depends="init,start-mysql,start-tomcat"
247 description="Startup the (local) Greenstone servers (tomcat,mysql...)" />
248
249 <target name="stop" depends="init,stop-tomcat,stop-mysql"
250 description="Shutdown the (local) Greenstone servers."/>
251
252 <target name="restart" description="Shutdown and restart the (local) Greenstone servers" depends="init,stop,start"/>
253
254
255<!-- =========== Help targets =================================== -->
256
257 <property name="install-command" value="ant [options] prepare install"/>
258
259 <target name="usage" description="Print a help message">
260 <echo message=" Execute 'ant -projecthelp' for a list of targets."/>
261 <echo message=" Execute 'ant -help' for Ant help."/>
262 <echo>To install Greenstone3, run '${install-command}'.
263There are properties defined in build.properties. The install process will ask you if these properties are set correctly. To avoid this prompt, use the '-Dproperties.accepted=yes' option.
264To log the output, use the '-logfile build.log' option.
265The README.txt file has more information about the ant targets and install process.
266 </echo>
267 </target>
268
269 <target name="help" depends="usage" description="Print a help message"/>
270
271 <target name="debug" depends="init" description="Display all the currently used properties">
272 <echoproperties/>
273 </target>
274
275<!-- ====== initialization and setup targets ================== -->
276
277 <target name="accept-properties" unless="properties.accepted">
278 <input addproperty="properties.ok" validargs="y,n">The following properties (among others) are being used from a build.properties file found in this directory:
279tomcat.server=${tomcat.server}
280tomcat.port=${tomcat.port}
281tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed)
282gsdl2.installed.path=${gsdl2.installed.path} (this is the location of Greenstone 2 if you have it)
283proxy.host=${proxy.host}
284proxy.port=${proxy.port}
285mysql.installed.path=${mysql.installed.path} (this is the location of mysql if it is already installed)
286mysql.port=${mysql.port}
287If these are not acceptable, please change them and rerun this target. Continue [y/n]? />
288 </input>
289 <condition property="do.abort">
290 <equals arg1="n" arg2="${properties.ok}"/>
291 </condition>
292 <fail if="do.abort">Build aborted by user. Please change your properties settings and re-run the target</fail>
293 </target>
294
295 <target name="check-cvsroot">
296 <condition property="cvsroot.notset">
297 <or>
298 <not>
299 <isset property="env.CVSROOT"/>
300 </not>
301 <equals arg1="" arg2="${env.CVSROOT}"/>
302 </or>
303 </condition>
304 <fail if="cvsroot.notset" message="You need to set the CVSROOT variable"/>
305 </target>
306
307 <!-- this sets up some initial properties -->
308 <target name="init">
309
310 <condition property="java.too.old">
311 <or>
312 <equals arg1="1.1" arg2="${ant.java.version}"/>
313 <equals arg1="1.2" arg2="${ant.java.version}"/>
314 <equals arg1="1.3" arg2="${ant.java.version}"/>
315 </or>
316 </condition>
317 <fail if="java.too.old" message="You need Java 1.4 or greater to run Greenstone 3"/>
318
319 <available file="${basedir}/packages/mgpp/text" property="mgpp.present"/>
320 <available file="${basedir}/packages/mysql/bin" property="mysql.present"/>
321 <available file="${basedir}/gli" property="gli.present"/>
322 <available file="${basedir}/gs2build" property="gs2build.present"/>
323 <available file="${basedir}/comms/soap/axis" property="axis.present"/>
324 <condition property="gsdl2.islocal">
325 <or>
326 <not>
327 <isset property="gsdl2.installed.path"/>
328 </not>
329 <equals arg1="" arg2="${gsdl2.installed.path}"/>
330 </or>
331 </condition>
332 <condition property="mysql.islocal">
333 <or>
334 <not>
335 <isset property="mysql.installed.path"/>
336 </not>
337 <equals arg1="" arg2="${mysql.installed.path}"/>
338 </or>
339 </condition>
340 <condition property="tomcat.islocal">
341 <or>
342 <not>
343 <isset property="tomcat.installed.path"/>
344 </not>
345 <equals arg1="" arg2="${tomcat.installed.path}"/>
346 </or>
347 </condition>
348
349 <echo>tomcat.port:${tomcat.port}, gli.present:${gli.present} gsdlislocal=${gsdl2.islocal} gs2build.present=${gs2build.present} gsdl2.installed.path = ${gsdl2.installed.path}</echo>
350 <condition property="proxy.present">
351 <and>
352 <isset property="proxy.host"/>
353 <not>
354 <equals arg1="" arg2="${proxy.host}"/>
355 </not>
356 </and>
357 </condition>
358 </target>
359
360 <target name="setup-proxy" depends="init" if="proxy.present">
361 <condition property="ask.user">
362 <or>
363 <equals arg1="" arg2="${proxy.user}"/>
364 <equals arg1="" arg2="${proxy.password}"/>
365 </or>
366 </condition>
367 <getuserandpassword message="Using proxy: ${proxy.host}:${proxy.port}" if="ask.user" username="${proxy.user}" userproperty="proxy.username" pwordproperty="proxy.password"/>
368 <mysetproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
369 </target>
370
371 <!-- ========== Web app Targets ================================ -->
372
373 <target name="prepare-web">
374 <property name="collect.dir" value="${web.home}/sites/localsite/collect"/>
375 <!-- gs3mgdemo -->
376 <unzip src="${collect.dir}/gs3mgdemo/import.zip"
377 dest="${collect.dir}/gs3mgdemo"/>
378 <unzip src="${collect.dir}/gs3mgdemo/archives.zip"
379 dest="${collect.dir}/gs3mgdemo"/>
380 <unzip src="${collect.dir}/gs3mgdemo/index/index.zip"
381 dest="${collect.dir}/gs3mgdemo/index"/>
382 <delete file="${collect.dir}/gs3mgdemo/import.zip"/>
383 <delete file="${collect.dir}/gs3mgdemo/archives.zip"/>
384 <delete file="${collect.dir}/gs3mgdemo/index/index.zip"/>
385 <!-- gs2mgdemo -->
386 <unzip src="${collect.dir}/gs2mgdemo/import.zip"
387 dest="${collect.dir}/gs2mgdemo"/>
388 <unzip src="${collect.dir}/gs2mgdemo/metadata.zip"
389 dest="${collect.dir}/gs2mgdemo"/>
390 <unzip src="${collect.dir}/gs2mgdemo/index/index.zip"
391 dest="${collect.dir}/gs2mgdemo/index"/>
392 <delete file="${collect.dir}/gs2mgdemo/import.zip"/>
393 <delete file="${collect.dir}/gs2mgdemo/metadata.zip"/>
394 <delete file="${collect.dir}/gs2mgdemo/index/index.zip"/>
395 <!-- gs2mgppdemo -->
396 <unzip src="${collect.dir}/gs2mgppdemo/import.zip"
397 dest="${collect.dir}/gs2mgppdemo"/>
398 <unzip src="${collect.dir}/gs2mgppdemo/metadata.zip"
399 dest="${collect.dir}/gs2mgppdemo"/>
400 <unzip src="${collect.dir}/gs2mgppdemo/index/index.zip"
401 dest="${collect.dir}/gs2mgppdemo/index"/>
402 <delete file="${collect.dir}/gs2mgppdemo/import.zip"/>
403 <delete file="${collect.dir}/gs2mgppdemo/metadata.zip"/>
404 <delete file="${collect.dir}/gs2mgppdemo/index/index.zip"/>
405 <!-- gberg -->
406 <unzip src="${collect.dir}/gberg/index/index.zip"
407 dest="${collect.dir}/gberg/index"/>
408 <delete file="${collect.dir}/gberg/index/index.zip"/>
409 <mkdir dir="${web.home}/applet"/>
410
411 <condition property="need.xml.jars">
412 <equals arg1="1.5" arg2="${ant.java.version}"/>
413 </condition>
414 <antcall target="rename-xml-jars"/>
415 </target>
416
417 <target name="rename-xml-jars" if="need.xml.jars">
418 <copy file="${web.lib}/xalan.jar.tmp" tofile="${web.lib}/xalan.jar"/>
419 <copy file="${web.lib}/xercesImpl.jar.tmp" tofile="${web.lib}/xercesImpl.jar"/>
420 </target>
421
422 <target name="configure-web" depends="init,get-mysql-gsdl3-passwords"
423 description="Configure only the web app config files">
424 <!-- we want a unix path in the global.properties file -->
425 <pathconvert targetos="unix" property="gsdl3.home.unix">
426 <path path="${web.home}"/>
427 </pathconvert>
428 <!-- just in case these haven't been defined, we need something to write to
429 the file -->
430 <property name="mysql.admin.password" value=" "/>
431 <property name="mysql.reader.password" value=" "/>
432 <filter token="gsdl3home" value="${gsdl3.home.unix}"/>
433 <filter token="mysql.port" value="${mysql.port}"/>
434 <filter token="mysql.server" value="${mysql.server}"/>
435 <filter token="mysql.admin.pword" value="${mysql.admin.password}"/>
436 <filter token="mysql.reader.pword" value="${mysql.reader.password}"/>
437 <filter token="tomcat.server" value="${tomcat.server}"/>
438 <filter token="tomcat.port" value="${tomcat.port}"/>
439 <copy file="${basedir}/resources/java/global.properties.in" tofile="${web.classes}/global.properties" filtering="true" overwrite="true"/>
440 <chmod file="${web.classes}/global.properties" perm="600"/>
441 </target>
442
443 <target name="compile-web" depends="init">
444 <javac srcdir="${web.classes}"
445 destdir="${web.classes}"
446 debug="${compile.debug}"
447 deprecation="${compile.deprecation}"
448 optimize="${compile.optimize}">
449 <classpath>
450 <path refid="compile.classpath"/>
451 </classpath>
452 </javac>
453 </target>
454
455 <target name="cvsupdate-web" unless="nocvs.mode">
456 <cvs command="update -dP" dest="${web.home}"/>
457 </target>
458
459 <target name="update-web" depends="init,cvsupdate-web,configure-web"
460 description="update only the web stuff (config files)"/>
461
462
463<!-- ======================= Tomcat Targets ========================== -->
464
465 <!-- this target sets up tomcat for the first time, or resets it any subsequent times -->
466 <target name="prepare-tomcat" depends="init,setup-proxy" if="tomcat.islocal">
467 <get src="http://www.greenstone.org/gs3files/jakarta-tomcat-5.5.7.zip"
468 dest="${basedir}/comms/jakarta/jakarta-tomcat-5.5.7.zip"
469 usetimestamp="true"/>
470 <delete dir="${basedir}/comms/jakarta/tomcat.bak"/>
471 <move todir="${basedir}/comms/jakarta/tomcat.bak" failonerror="false">
472 <fileset dir="${basedir}/comms/jakarta/tomcat"/>
473 </move>
474 <unzip src="${basedir}/comms/jakarta/jakarta-tomcat-5.5.7.zip"
475 dest="${basedir}/comms/jakarta"/>
476 <condition property="need.tomcat.compat">
477 <equals arg1="1.4" arg2="${ant.java.version}"/>
478 </condition>
479 <antcall target="prepare-tomcat-compat"/>
480 <move todir="${basedir}/comms/jakarta/tomcat">
481 <fileset dir="${basedir}/comms/jakarta/jakarta-tomcat-5.5.7"/>
482 </move>
483 <copy file="${basedir}/comms/jakarta/setclasspath.bat"
484 tofile="${basedir}/comms/jakarta/tomcat/bin/setclasspath.bat"
485 overwrite="true"/>
486 <copy file="${basedir}/comms/jakarta/setclasspath.sh"
487 tofile="${basedir}/comms/jakarta/tomcat/bin/setclasspath.sh"
488 overwrite="true"/>
489 <!-- make sure we have execute permission for the .sh files -->
490 <chmod dir="${basedir}/comms/jakarta/tomcat/bin" perm="ugo+rx"
491 includes="*.sh"/>
492 </target>
493
494
495 <target name="prepare-tomcat-compat" if="need.tomcat.compat">
496 <get src="http://www.greenstone.org/gs3files/jakarta-tomcat-5.5.7-compat.zip"
497 dest="${basedir}/comms/jakarta/jakarta-tomcat-5.5.7-compat.zip"
498 usetimestamp="true"/>
499 <unzip src="${basedir}/comms/jakarta/jakarta-tomcat-5.5.7-compat.zip"
500 dest="${basedir}/comms/jakarta"/>
501 <copy file="${basedir}/comms/jakarta/jakarta-tomcat-5.5.7/common/endorsed/xml-apis.jar"
502 tofile="${web.applet}/xml-apis.jar"/>
503 <copy file="${basedir}/comms/jakarta/jakarta-tomcat-5.5.7/common/endorsed/xercesImpl.jar"
504 tofile="${web.applet}/xercesImpl.jar"/>
505 </target>
506
507 <target name="configure-tomcat" depends="init,configure-tomcat-local,configure-tomcat-external"/>
508
509 <target name="configure-tomcat-local" depends="init" if="tomcat.islocal">
510 <!-- re-setup the server.xml file -->
511 <copy file="${basedir}/comms/jakarta/server.xml.in" tofile="${basedir}/comms/jakarta/tomcat/conf/server.xml" overwrite="true">
512 <filterset>
513 <filter token="port" value="${tomcat.port}"/>
514 <filter token="gsdl3home" value="${basedir}"/>
515 </filterset>
516 </copy>
517 </target>
518
519 <target name="configure-tomcat-external" depends="init" unless="tomcat.islocal">
520 <!-- re-setup the server.xml file -->
521 <!-- need to edit the config file, or do we get the user to do this???-->
522 </target>
523
524 <target name="reload" description="Reload web application"
525 depends="init,setup-catalina-ant-tasks">
526 <reload url="http://kanuka:7070/manager" username="admin" password="admin"
527 path="/gsdl3"/>
528 </target>
529
530 <target name="start-tomcat" description="Startup only Tomcat" depends="init" if="tomcat.islocal">
531 <property name="tomcat.classpath" refid="local.tomcat.classpath"/>
532 <property name="tomcat.path" refid="local.tomcat.path"/>
533 <property name="catalina.opts" value="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx400M"/>
534 <exec executable="${catalina.home}/bin/startup.sh" os="${os.linux},${os.mac}" dir="${catalina.home}/bin" spawn="false">
535 <!--<env key="GSDLOS" value="linux"/> do we need this?? -->
536 <env key="GSDL3HOME" value="${basedir}"/>
537 <env key="PATH" path="${tomcat.path}"/>
538 <env key="CATALINA_OPTS" value="${catalina.opts}"/>
539 <env key="CATALINA_HOME" value="${catalina.home}"/>
540 <env key="CLASSPATH" path="${tomcat.classpath}"/>
541 <env key="LD_LIBRARY_PATH" path="${env.LD_LIBRARY_PATH}:${lib.jni}"/>
542 <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${lib.jni}"/>
543<!-- <env key="LD_LIBRARY_PATH" path="${env.LD_LIBRARY_PATH}:${lib.jni}:${mysql.home}/lib/mysql"/>
544
545 <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${lib.jni}:${mysql.home}/lib/mysql"/>--> <!-- for mac-->
546 </exec>
547 <exec executable="${catalina.home}/bin/startup.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="true">
548 <env key="GSDLOS" value="windows"/>
549 <env key="GSDL3HOME" value="${basedir}"/>
550 <env key="Path" path="${tomcat.path}"/>
551 <env key="PATH" path="${tomcat.path}"/>
552 <env key="CATALINA_OPTS" value="${catalina.opts}"/>
553 <env key="CLASSPATH" path="${tomcat.classpath}"/>
554 </exec>
555 <!-- wait for the server to startup in case other targets need it running -->
556 <waitfor maxwait="5" maxwaitunit="second">
557 <and>
558 <socket server="${tomcat.server}" port="${tomcat.port}"/>
559 <http url="http://${tomcat.server}:${tomcat.port}/gsdl3/index.html"/>
560 </and>
561 </waitfor>
562 </target>
563 <!-- windows: do we want to launch a webrowser?? -->
564 <target name="stop-tomcat" description="Shutdown only Tomcat" depends="init" if="tomcat.islocal">
565 <exec executable="${catalina.home}/bin/shutdown.sh" os="${os.linux},${os.mac}" dir="${catalina.home}/bin" spawn="false">
566 <env key="CATALINA_HOME" value="${catalina.home}"/>
567 </exec>
568 <exec executable="${catalina.home}/bin/shutdown.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="false"/>
569 </target>
570
571 <target name="restart-tomcat" description="Shutdown and restart only Tomcat" depends="init,stop-tomcat,start-tomcat"/>
572
573 <target name="setup-catalina-ant-tasks">
574 <!-- Configure the custom Ant tasks for the Tomcat Manager application -->
575 <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"
576 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
577 <taskdef name="list" classname="org.apache.catalina.ant.ListTask"
578 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
579 <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"
580 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
581 <taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"
582 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
583 <taskdef name="roles" classname="org.apache.catalina.ant.RolesTask"
584 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
585 <taskdef name="start" classname="org.apache.catalina.ant.StartTask"
586 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
587 <taskdef name="stop" classname="org.apache.catalina.ant.StopTask"
588 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
589 <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"
590 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
591 </target>
592
593
594<!-- ======================= Mysql Targets =========================== -->
595
596 <!-- this is one target that we only want to run once. -->
597 <target name="prepare-mysql" depends="init,init-mysql-vars,install-mysql,start-mysql,setup-mysql,stop-mysql-no-password-force"/>
598
599 <target name="init-mysql-vars">
600 <condition property="mysql.islocal.linux">
601 <and>
602 <isset property="mysql.islocal"/>
603 <isset property="current.os.isunixnotmac"/>
604 </and>
605 </condition>
606 <condition property="mysql.islocal.mac">
607 <and>
608 <isset property="mysql.islocal"/>
609 <isset property="current.os.ismac"/>
610 </and>
611 </condition>
612 <condition property="mysql.islocal.windows">
613 <and>
614 <isset property="mysql.islocal"/>
615 <isset property="current.os.iswindows"/>
616 </and>
617 </condition>
618 <condition property="mysql.islocal.usepassword">
619 <and>
620 <isset property="mysql.islocal"/>
621 <isset property="mysql.use.passwords"/>
622 <equals arg1="yes" arg2="${mysql.use.passwords}"/>
623 </and>
624 </condition>
625 <condition property="mysql.islocal.usepassword.windows">
626 <and>
627 <isset property="mysql.islocal.usepassword"/>
628 <isset property="current.os.iswindows"/>
629 </and>
630 </condition>
631 <condition property="mysql.islocal.usepassword.unix">
632 <and>
633 <isset property="mysql.islocal.usepassword"/>
634 <isset property="current.os.isunix"/>
635 </and>
636 </condition>
637 <condition property="mysql.islocal.nopassword">
638 <and>
639 <isset property="mysql.islocal"/>
640 <or>
641 <not>
642 <isset property="mysql.use.passwords"/>
643 </not>
644 <equals arg1="no" arg2="${mysql.use.passwords}"/>
645 </or>
646 </and>
647 </condition>
648 </target>
649
650 <target name="configure-mysql" depends="init,init-mysql-vars,start-mysql,set-mysql-account-passwords,stop-mysql" description="sets up the mysql account passwords"/>
651
652 <target name="get-mysql-root-password" depends="init,init-mysql-vars" if="mysql.islocal.usepassword">
653 <condition property="ask.root.password">
654 <or>
655 <not>
656 <isset property="mysql.root.password"/>
657 </not>
658 <equals arg1="" arg2="${mysql.root.password}"/>
659 </or>
660 </condition>
661 <getuserandpassword message="Please specify a password for the root mysql user: this is to secure your database." if="ask.root.password" username="root" pwordproperty="mysql.root.password"/>
662 </target>
663
664 <target name="get-mysql-gsdl3-passwords" depends="init,init-mysql-vars" if="mysql.islocal.usepassword">
665 <condition property="ask.admin.password">
666 <or>
667 <not>
668 <isset property="mysql.admin.password"/>
669 </not>
670 <equals arg1="" arg2="${mysql.admin.password}"/>
671 </or>
672 </condition>
673 <condition property="ask.reader.password">
674 <or>
675 <not>
676 <isset property="mysql.reader.password"/>
677 </not>
678 <equals arg1="" arg2="${mysql.reader.password}"/>
679 </or>
680 </condition>
681 <getuserandpassword message="Please specify the password for the gsdl3admin mysql user: this is used by greenstone" if="ask.admin.password" username="gsdl3admin" pwordproperty="mysql.admin.password"/>
682 <getuserandpassword message="Please specify the password for the gsdl3reader mysql user: this is used by greenstone" if="ask.reader.password" username="gsdl3reader" pwordproperty="mysql.reader.password"/>
683 </target>
684
685 <target name="install-mysql" depends="init,init-mysql-vars,install-mysql-linux,install-mysql-windows,install-mysql-mac"/>
686
687 <!-- install the database : linux-->
688 <target name="install-mysql-linux" depends="init,init-mysql-vars" if="mysql.islocal.linux" unless="mysql.present">
689 <get src="http://www.greenstone.org/gs3files/mysql-standard-4.1.11-pc-linux-gnu-i686.tar.gz"
690 dest="${packages.home}/mysql-standard-4.1.11-pc-linux-gnu-i686.tar.gz"
691 usetimestamp="true"/>
692 <untar src="${packages.home}/mysql-standard-4.1.11-pc-linux-gnu-i686.tar.gz"
693 dest="${packages.home}"
694 compression="gzip"/>
695 <move todir="${packages.home}/mysql">
696 <fileset dir="${packages.home}/mysql-standard-4.1.11-pc-linux-gnu-i686"/>
697 </move>
698 <!-- file permissions are screwed up, so make executables executable -->
699 <chmod file="${mysql.home}/scripts/mysql_install_db" perm="a+x"/>
700 <chmod perm="a+x">
701 <fileset dir="${mysql.home}/bin" />
702 </chmod>
703 <mkdir dir="${mysql.home}/var/"/>
704 <mkdir dir="${mysql.home}/var/log/"/>
705 <chmod file="${mysql.home}/var/" perm="777"/>
706 <chmod file="${mysql.home}/var/log/" perm="777"/>
707
708 <exec executable="${mysql.home}/scripts/mysql_install_db" dir="${mysql.home}">
709 <arg value="--datadir=./data"/>
710 <arg value="--basedir=."/>
711 <arg value="--user=root"/>
712 <arg value="--force"/>
713 </exec>
714 </target>
715
716
717 <!-- install the database : mac-->
718 <target name="install-mysql-mac" depends="init,init-mysql-vars" if="mysql.islocal.mac" unless="mysql.present">
719 <get src="http://www.greenstone.org/gs3files/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc.tar.gz"
720 dest="${packages.home}/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc.tar.gz"
721 usetimestamp="true"/>
722 <untar src="${packages.home}/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc.tar.gz"
723 dest="${packages.home}"
724 compression="gzip"/>
725 <move todir="${packages.home}/mysql">
726 <fileset dir="${packages.home}/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc"/>
727 </move>
728 <!-- file permissions are screwed up, so make executables executable -->
729 <chmod file="${mysql.home}/scripts/mysql_install_db" perm="a+x"/>
730 <chmod perm="a+x">
731 <fileset dir="${mysql.home}/bin" />
732 </chmod>
733 <mkdir dir="${mysql.home}/var/"/>
734 <mkdir dir="${mysql.home}/var/log/"/>
735 <chmod file="${mysql.home}/var/" perm="777" type="dir"/>
736 <chmod file="${mysql.home}/var/log/" perm="777" type="dir"/>
737 <exec executable="${mysql.home}/scripts/mysql_install_db" dir="${mysql.home}">
738 <arg value="--datadir=./data"/>
739 <arg value="--basedir=."/>
740 <!--<arg value="- -user=root"/>
741 <arg value="- -force"/>-->
742 </exec>
743 </target>
744
745 <!-- install the database : windows -->
746 <target name="install-mysql-windows" depends="init,init-mysql-vars" if="mysql.islocal.windows" unless="mysql.present">
747 <get src="http://www.greenstone.org/gs3files/mysql-noinstall-4.1.11-win32.zip"
748 dest="${packages.home}/mysql-noinstall-4.1.11-win32.zip"
749 usetimestamp="true"/>
750 <!-- can we run the installer?? -->
751 <unzip src="${packages.home}/mysql-noinstall-4.1.11-win32.zip"
752 dest="${packages.home}"/>
753 <move todir="${packages.home}/mysql">
754 <fileset dir="${packages.home}/mysql-4.1.11-win32"/>
755 </move>
756 </target>
757
758 <target name="setup-mysql" depends="init" if="mysql.islocal">
759 <!-- setup the gsdl3 accounts -->
760 <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
761 <arg value="--user=root"/>
762 <arg value="--execute=GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@localhost"/>
763 </exec>
764 <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
765 <arg value="--user=root"/>
766 <arg value="--execute=GRANT SELECT ON *.* TO gsdl3reader@localhost"/>
767 </exec>
768 <!--<exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
769 <arg value="- -user=root"/>
770 <arg value="- -execute=GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@'%';"/>
771 </exec>-->
772
773 <!-- remove the anonymous user -->
774 <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
775 <arg value="--user=root"/>
776 <arg value="--execute=delete from mysql.user where Host='localhost' and User='';"/>
777 </exec>
778 <!-- load in the demo collection database -->
779 <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
780 <arg value="--user=root"/>
781 <arg value="--execute=create database localsite_gs3mgdemo;"/>
782 </exec>
783 <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}"
784 input="${web.home}/sites/localsite/collect/gs3mgdemo/mysqldatadump.sql">
785 <arg value="--user=root"/>
786 <arg value="localsite_gs3mgdemo"/>
787 </exec>
788 </target>
789
790 <target name="set-mysql-account-passwords" depends="init,init-mysql-vars,get-mysql-root-password,get-mysql-gsdl3-passwords" if="mysql.islocal.usepassword">
791 <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
792 <arg value="--user=root"/>
793 <arg value="--execute=set password for 'root'@'localhost' = PASSWORD('${mysql.root.password}'); set password for 'gsdl3reader'@'localhost' = PASSWORD('${mysql.reader.password}'); set password for 'gsdl3admin'@'localhost' = PASSWORD('${mysql.admin.password}'); flush privileges;"/>
794 </exec>
795 </target>
796
797 <target name="start-mysql" depends="init,init-mysql-vars" if="mysql.islocal"
798 description="Startup only mysql">
799 <echo>Starting up the mysql server</echo>
800 <exec executable="${mysql.home}/bin/mysqld_safe" dir="${mysql.home}"
801 spawn="true" os="${os.linux},${os.mac}">
802 <arg value="--datadir=./data"/>
803 <arg value="--basedir=."/>
804 <arg value="--pid_file=gsdl3.pid"/>
805 <arg value="--socket=/tmp/mysql.sock"/>
806 <arg value="--port=${mysql.port}"/>
807 <arg value="--err-log=./var/log/mysql.log"/>
808 </exec>
809 <exec executable="${mysql.home}/bin/mysqld" dir="${mysql.home}" spawn="true" os="${os.windows}">
810 <arg value="--port=${mysql.port}"/>
811 </exec>
812 <sleep seconds="2"/>
813 </target>
814
815 <target name="stop-mysql" depends="init,init-mysql-vars,stop-mysql-use-password-unix,stop-mysql-use-password-windows,stop-mysql-no-password" if="mysql.islocal"
816 description="Shutdown only mysql">
817 <echo>MYSQL database server shutdown successfully</echo>
818 </target>
819
820 <target name="stop-mysql-no-password" depends="init" if="mysql.islocal.nopassword">
821 <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
822 failonerror="true" os="${os.linux},${os.mac}">
823 <arg value="--user=root"/>
824 <arg value="--socket=/tmp/mysql.sock"/>
825 <arg value="shutdown"/>
826 </exec>
827 <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
828 failonerror="true" os="${os.windows}">
829 <arg value="--user=root"/>
830 <arg value="shutdown"/>
831 </exec>
832 </target>
833
834 <target name="stop-mysql-no-password-force" depends="init">
835 <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
836 failonerror="true" os="${os.linux},${os.mac}">
837 <arg value="--user=root"/>
838 <arg value="--socket=/tmp/mysql.sock"/>
839 <arg value="shutdown"/>
840 </exec>
841 <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
842 failonerror="true" os="${os.windows}">
843 <arg value="--user=root"/>
844 <arg value="shutdown"/>
845 </exec>
846 </target>
847
848 <target name="stop-mysql-use-password-unix" depends="init" if="mysql.islocal.usepassword.unix">
849 <echo>At the password prompt, enter the mysql root password.</echo>
850 <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
851 failonerror="true" os="${os.linux},${os.mac}">
852 <arg value="--user=root"/>
853 <arg value="-p"/>
854 <arg value="--socket=/tmp/mysql.sock"/>
855 <arg value="shutdown"/>
856 </exec>
857 </target>
858
859 <target name="stop-mysql-use-password-windows" depends="init" if="mysql.islocal.usepassword.windows">
860 <!--<antcall target="get-mysql-root-password"/>
861 antcall doesn't set the property in teh callign project. if put this in the depends list, it will always be called, even if not windows. so copy it in here.-->
862 <condition property="ask.root.password">
863 <or>
864 <not>
865 <isset property="mysql.root.password"/>
866 </not>
867 <equals arg1="" arg2="${mysql.root.password}"/>
868 </or>
869 </condition>
870 <getuserandpassword message="Please enter the mysql root password:" if="ask.root.password" username="root" pwordproperty="mysql.root.password"/>
871 <!-- on windows it doesn't work unless the password is specified here -->
872 <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
873 failonerror="true" os="${os.windows}">
874 <arg value="--user=root"/>
875 <arg value="-p${mysql.root.password}"/>
876 <arg value="shutdown"/>
877 </exec>
878 </target>
879
880 <target name="restart-mysql" description="Shutdown and restart only mysql" depends="init,stop-mysql,start-mysql"/>
881
882
883<!-- ======================= Axis Targets ============================ -->
884
885 <target name="prepare-axis" depends="init">
886 <mkdir dir="${basedir}/comms/soap"/>
887 <get src="http://www.greenstone.org/gs3files/axis-bin-1_2_1.zip"
888 dest="${basedir}/comms/soap/axis-bin-1_2_1.zip"
889 usetimestamp="true"/>
890 <delete dir="${basedir}/comms/soap/axis.bak"/>
891 <move todir="${basedir}/comms/soap/axis.bak" failonerror="false">
892 <fileset dir="${basedir}/comms/soap/axis"/>
893 </move>
894 <unzip src="${basedir}/comms/soap/axis-bin-1_2_1.zip"
895 dest="${basedir}/comms/soap/"/>
896 <move todir="${basedir}/comms/soap/axis">
897 <fileset dir="${basedir}/comms/soap/axis-1_2_1"/>
898 </move>
899 <!-- install axis into greenstone web app -->
900 <copy todir="${web.lib}">
901 <fileset dir="${basedir}/comms/soap/axis/webapps/axis/WEB-INF/lib">
902 <include name="*.jar"/>
903 </fileset>
904 </copy>
905 <copy todir="${web.home}">
906 <fileset dir="${basedir}/comms/soap/axis/webapps/axis/">
907 <include name="*.jsp"/>
908 <include name="*.jws"/>
909 </fileset>
910 </copy>
911 <copy tofile="${web.home}/axis.html" file="${basedir}/comms/soap/axis/webapps/axis/index.html"/>
912 <copy todir="${web.classes}">
913 <fileset dir="${basedir}/comms/soap/axis/webapps/axis/WEB-INF/classes">
914 <include name="*.properties"/>
915 </fileset>
916 </copy>
917 </target>
918
919 <target name="soap-deploy-site" depends="get-sitename,get-siteuri,create-deployment-files"
920 description="Deploy a SOAP web service for a local Greenstone site">
921 <java classname="org.apache.axis.client.AdminClient">
922 <classpath refid="compile.classpath"/>
923 <arg value="-l"/>
924 <arg value="http://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/>
925 <arg file="${basedir}/resources/soap/${axis.sitename}.wsdd"/>
926 </java>
927 </target>
928
929 <target name="soap-undeploy-site" depends="get-sitename"
930 description="Undeploy a SOAP web service for a local Greenstone site">
931 <java classname="org.apache.axis.client.AdminClient">
932 <classpath refid="compile.classpath"/>
933 <arg value="-l"/>
934 <arg value="http://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/>
935 <arg file="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"/>
936 </java>
937 </target>
938
939 <!-- this target used to deploy the localsite server for the default installation -->
940 <target name="deploy-localsite" depends="init">
941 <antcall target="start-tomcat"/>
942 <antcall target="soap-deploy-site">
943 <param name="axis.sitename" value="localsite"/>
944 <param name="axis.siteuri" value="localsite"/>
945 </antcall>
946 <antcall target="stop-tomcat"/>
947 </target>
948
949 <target name="get-sitename" unless="axis.sitename">
950 <input addproperty="axis.sitename" message="What site? (press enter for default:localsite)" defaultvalue="localsite"/>
951 </target>
952
953 <target name="get-siteuri" depends="get-sitename" unless="axis.siteuri">
954 <input addproperty="axis.siteuri" message="What name do you want the service to have? (press enter for default:${axis.sitename})" defaultvalue="${axis.sitename}"/>
955 <echo>${axis.sitename}, ${axis.siteuri}</echo>
956 </target>
957 <target name="check-deployment-files" depends="get-sitename">
958 <condition property="deploy.exists">
959 <and>
960 <available file="${basedir}/resources/soap/${axis.sitename}.wsdd"/>
961 <available file="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"/>
962 <available file="${web.classes}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class"/>
963 </and>
964 </condition>
965 </target>
966
967 <target name="create-deployment-files" depends="get-sitename,get-siteuri,check-deployment-files"
968 if="axis.sitename" unless="deploy.exists">
969 <filter token="sitename" value="${axis.sitename}"/>
970 <filter token="siteuri" value="${axis.siteuri}"/>
971 <copy file="${basedir}/resources/soap/site.wsdd.template"
972 tofile="${basedir}/resources/soap/${axis.sitename}.wsdd"
973 filtering="true"/>
974 <copy file="${basedir}/resources/soap/undeploy-site.wsdd.template"
975 tofile="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"
976 filtering="true"/>
977 <!-- create the java files and compile them -->
978 <copy file="${gsdl3.home}/SOAPServer.java.in"
979 tofile="${gsdl3.home}/SOAPServer${axis.sitename}.java"
980 filtering="true"/>
981 <javac srcdir="${src.home}"
982 destdir="${build.home}"
983 debug="${compile.debug}"
984 deprecation="${compile.deprecation}"
985 optimize="${compile.optimize}">
986 <classpath refid="compile.classpath"/>
987 <include name="org/greenstone/gsdl3/SOAPServer${axis.sitename}.java" />
988 </javac>
989 <mkdir dir="${web.classes}/org/greenstone/gsdl3"/>
990 <copy file="${build.home}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class" tofile="${web.classes}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class" />
991 </target>
992
993
994<!-- ====================== Core targets ============================== -->
995<!-- core targets refer to the core gsdl3 java src -->
996
997 <target name="prepare-core" unless="nocvs.mode">
998 <!-- just get rid of empty directories-->
999 <cvs command="update -P"/>
1000 </target>
1001
1002 <target name="configure-core"/>
1003
1004 <target name="update-core" depends="init,cvsupdate-core,clean-core,compile-core"
1005 description="Update only the Greenstone core" />
1006
1007 <target name="cvsupdate-core" unless="nocvs.mode">
1008 <cvs command="update -l"/>
1009 <cvs command="update -dP bin comms dist-resources docs lib resources src winutil"/>
1010 </target>
1011
1012 <target name="clean-core"
1013 description="Clean only the Greenstone core">
1014 <delete dir="${build.home}"/>
1015 </target>
1016
1017 <target name="compile-core"
1018 description="Compile only the Greenstone core">
1019 <mkdir dir="${build.home}"/>
1020 <javac srcdir="${src.home}"
1021 destdir="${build.home}"
1022 debug="${compile.debug}"
1023 deprecation="${compile.deprecation}"
1024 optimize="${compile.optimize}">
1025 <classpath>
1026 <path refid="compile.classpath"/>
1027 </classpath>
1028 </javac>
1029 <jar destfile="${build.home}/gsdl3.jar">
1030 <fileset dir="${build.home}">
1031 <include name="org/greenstone/gsdl3/**"/>
1032 <exclude name="**/Test.class"/>
1033 </fileset>
1034 <manifest>
1035 <attribute name="Built-By" value="${user.name}" />
1036 </manifest>
1037 </jar>
1038 <copy file="${build.home}/gsdl3.jar" todir="${web.lib}"/>
1039 <jar destfile="${build.home}/phind.jar">
1040 <fileset dir="${build.home}">
1041 <include name="org/greenstone/applet/phind/**"/>
1042 </fileset>
1043 <manifest>
1044 <attribute name="Built-By" value="${user.name}" />
1045 </manifest>
1046 </jar>
1047 <copy file="${build.home}/phind.jar" todir="${web.applet}"/>
1048 <jar destfile="${build.home}/anttasks.jar">
1049 <fileset dir="${build.home}">
1050 <include name="org/greenstone/anttasks/**"/>
1051 </fileset>
1052 <manifest>
1053 <attribute name="Built-By" value="${user.name}" />
1054 </manifest>
1055 </jar>
1056 <copy file="${build.home}/anttasks.jar" todir="${basedir}/lib/java"/>
1057 <jar destfile="${build.home}/gsdl3test.jar">
1058 <fileset dir="${build.home}">
1059 <include name="org/greenstone/gsdl3/**/*Test.class"/>
1060 <include name="org/greenstone/testing/**"/>
1061 </fileset>
1062 <manifest>
1063 <attribute name="Built-By" value="${user.name}" />
1064 </manifest>
1065 </jar>
1066 </target>
1067
1068<!-- ================== Packages targets ================================ -->
1069 <!-- these targets refer to the greenstone packages - these need updating
1070 less often, so are in separate targets to the core -->
1071 <target name="prepare-packages" depends="init,prepare-mgpp,prepare-windows"/>
1072
1073 <target name="prepare-windows" depends="init" if="current.os.iswindows">
1074 <!-- need to download precompiled binaries for mg and mgpp -->
1075 </target>
1076
1077 <target name="checkout-mgpp" depends="check-cvsroot,init" unless="nocvs.mode">
1078 <cvs command="checkout -P" package="mgpp" dest="${basedir}/packages/"/>
1079 </target>
1080
1081 <target name="prepare-mgpp" depends="init" unless="mgpp.present">
1082 <antcall target="checkout-mgpp"/>
1083 </target>
1084
1085 <target name="update-packages" depends="init,cvsupdate-packages,configure-packages,clean-packages,compile-packages"
1086 description="Update only the packages"/>
1087
1088 <target name="cvsupdate-packages" unless="nocvs.mode">
1089 <cvs command="update -dP" dest="${packages.home}"/>
1090 </target>
1091
1092 <target name="configure-packages" description="Configure only the packages.">
1093 <echo>
1094 Configuring MG
1095 </echo>
1096 <exec executable="${mg.home}/configure" os="${os.linux},${os.mac}"
1097 dir="${mg.home}">
1098 <arg value="--prefix=${basedir}"/>
1099 <arg value="--libdir=${lib.jni}"/>
1100 </exec>
1101 <echo>
1102 Configuring MGPP
1103 </echo>
1104 <exec executable="${mgpp.home}/configure" os="${os.linux},${os.mac}"
1105 dir="${mgpp.home}">
1106 <arg value="--prefix=${basedir}"/>
1107 <arg value="--libdir=${lib.jni}"/>
1108 </exec>
1109 <echo>
1110 Configuring JavaGDBM
1111 </echo>
1112 <exec executable="${javagdbm.home}/configure" os="${os.linux},${os.mac}"
1113 dir="${javagdbm.home}">
1114 <arg value="--prefix=${basedir}"/>
1115 <arg value="--libdir=${lib.jni}"/>
1116 </exec>
1117 </target>
1118
1119 <target name="clean-packages" depends="init,clean-packages-c++,clean-packages-java" description="Clean only the packages"/>
1120
1121 <target name="clean-packages-c++" depends="init">
1122 <!-- mg : just call the make target -->
1123 <exec executable="make" os="${os.linux},${os.mac}"
1124 dir="${mg.home}">
1125 <arg value="clean"/>
1126 </exec>
1127 <!-- mgpp -->
1128 <exec executable="make" os="${os.linux},${os.mac}"
1129 dir="${mgpp.home}">
1130 <arg value="clean"/>
1131 </exec>
1132 <!-- javagdbm -->
1133 <exec executable="make" os="${os.linux},${os.mac}"
1134 dir="${javagdbm.home}">
1135 <arg value="clean"/>
1136 </exec>
1137 </target>
1138
1139 <target name="clean-packages-java" depends="init">
1140 <!-- vishnu : just call the ant target -->
1141 <ant antfile="${vishnu.home}/build.xml" dir="${vishnu.home}"
1142 inheritall="false" target="clean">
1143 <property name="catalina.home" value="${catalina.home}"/>
1144 </ant>
1145 <!-- gsdl-as : just call the ant target-->
1146 <ant antfile="${gsdl-as.home}/build.xml" dir="${gsdl-as.home}"
1147 inheritall="false" target="clean">
1148 <property name="catalina.home" value="${catalina.home}"/>
1149 </ant>
1150 </target>
1151
1152 <target name="clean-windows-c++-packages" depends="init" if="current.os.iswindows"
1153 description="Clean only the C/C++ packages">
1154 <exec executable="${mg.home}/winMake.bat" dir="${mg.home}">
1155 <arg value="clean"/>
1156 </exec>
1157 <exec executable="${mgpp.home}/winMake.bat" dir="${mgpp.home}">
1158 <arg value="clean"/>
1159 </exec>
1160 </target>
1161
1162 <target name="compile-packages"
1163 description="Compile only the packages">
1164 <echo>Compiling MG</echo>
1165 <exec executable="make" os="${os.linux},${os.mac}"
1166 dir="${mg.home}">
1167 </exec>
1168 <exec executable="make" os="${os.linux},${os.mac}"
1169 dir="${mg.home}">
1170 <arg value="install"/>
1171 </exec>
1172 <!-- windows: just the java stuff. -->
1173 <exec executable="${mg.home}/winMake.bat" os="${os.windows}"
1174 dir="${mg.home}">
1175 <arg value="compile"/>
1176 <arg value="javaonly"/>
1177 </exec>
1178 <!-- install the jar file -->
1179 <copy file="${mg.home}/mg.jar" todir="${lib.jni}"/>
1180
1181 <!-- mgpp -->
1182 <echo>Compiling MGPP</echo>
1183 <exec executable="make" os="${os.linux},${os.mac}"
1184 dir="${mgpp.home}">
1185 </exec>
1186 <exec executable="make" os="${os.linux},${os.mac}"
1187 dir="${mgpp.home}">
1188 <arg value="install"/>
1189 </exec>
1190 <!-- windows: just the java stuff. -->
1191 <exec executable="${mgpp.home}/winMake.bat" os="${os.windows}"
1192 dir="${mgpp.home}">
1193 <arg value="compile"/>
1194 <arg value="javaonly"/>
1195 </exec>
1196 <!-- install the jar file -->
1197 <copy file="${mgpp.home}/mgpp.jar" todir="${lib.jni}"/>
1198
1199 <!-- javagdbm -->
1200 <exec executable="make" os="${os.linux},${os.mac}"
1201 dir="${javagdbm.home}">
1202 </exec>
1203 <exec executable="make" os="${os.linux},${os.mac}"
1204 dir="${javagdbm.home}">
1205 <arg value="install"/>
1206 </exec>
1207 <!-- windows: just the java stuff. -->
1208 <exec executable="${javagdbm.home}/winMake.bat" os="${os.windows}"
1209 dir="${javagdbm.home}">
1210 <arg value="compile"/>
1211 <arg value="javaonly"/>
1212 </exec>
1213 <!-- install the jar file -->
1214 <copy file="${javagdbm.home}/javagdbm.jar" todir="${lib.jni}"/>
1215
1216 <!-- vishnu -->
1217 <echo>Compiling Vishnu</echo>
1218 <ant antfile="${vishnu.home}/build.xml" dir="${vishnu.home}"
1219 inheritall="false" target="compile">
1220 <property name="catalina.home" value="${catalina.home}"/>
1221 </ant>
1222
1223 <!-- gsdl-as -->
1224 <echo>Compiling GSDL-AS</echo>
1225 <ant antfile="${gsdl-as.home}/build.xml" dir="${gsdl-as.home}"
1226 inheritall="false" target="compile">
1227 <property name="catalina.home" value="${catalina.home}"/>
1228 </ant>
1229 </target>
1230
1231 <target name="compile-windows-c++-packages" depends="init" if="current.os.iswindows"
1232 description="Compile only the C/C++ packages">
1233 <exec executable="${mg.home}/winMake.bat" dir="${mg.home}"/>
1234 <exec executable="${mg.home}/winMake.bat" dir="${mg.home}">
1235 <arg value="install"/>
1236 <env key="GSDL3HOME" value="${basedir}"/>
1237 </exec>
1238 <exec executable="${mgpp.home}/winMake.bat" dir="${mgpp.home}"/>
1239 <exec executable="${mgpp.home}/winMake.bat" dir="${mgpp.home}">
1240 <arg value="install"/>
1241 <env key="GSDL3HOME" value="${basedir}"/>
1242 </exec>
1243 <exec executable="${javagdbm.home}/winMake.bat" dir="${javagdbm.home}"/>
1244 <exec executable="${javagdbm.home}/winMake.bat" dir="${javagdbm.home}">
1245 <arg value="install"/>
1246 <env key="GSDL3HOME" value="${basedir}"/>
1247 </exec>
1248 </target>
1249
1250 <!-- ================== gs2building targets ===============-->
1251
1252
1253 <target name="update-gs2building" if="gsdl2.islocal"
1254 depends="init,cvsupdate-gs2building,rename-gs2build-files,configure-gs2building,clean-gs2building,compile-gs2building"
1255 description="Update only the Greenstone 2 building components"/>
1256
1257 <target name="cvsupdate-gs2building" if="gsdl2.islocal" depends="init" unless="nocvs.mode">
1258 <cvs command="update -dP" dest="${gli.home}"/>
1259 <!-- Note: can't do a -d update here cos it will get all of gsdl
1260 also, an update doesn't get new files, so we do a checkout instead. -->
1261 <cvs command="co gs2build" dest="${basedir}"/>
1262 </target>
1263
1264 <target name="prepare-gs2building" depends="init,prepare-gs2build,prepare-gli" if="gsdl2.islocal">
1265 </target>
1266
1267 <target name="checkout-gs2build" depends="check-cvsroot,init" unless="nocvs.mode">
1268 <echo>checking out gs2build</echo>
1269 <cvs command="checkout -P" package="gs2build"/>
1270 </target>
1271
1272 <target name="prepare-gs2build" depends="init" if="gsdl2.islocal" unless="gs2build.present">
1273 <antcall target="checkout-gs2build"/>
1274 <!-- rename the .gs2build files -->
1275 <antcall target="rename-gs2build-files"/>
1276 <antcall target="unzip-windows-packages"/>
1277 <antcall target="get-windows-binaries"/>
1278 <antcall target="get-macos-extra"/>
1279 </target>
1280
1281 <target name="checkout-winbin" depends="init" if="current.os.iswindows"
1282 unless="nocvs.mode">
1283 <cvs command="checkout -P" package="winbin"/>
1284 </target>
1285
1286 <target name="get-windows-binaries" depends="init,checkout-winbin" if="current.os.iswindows">
1287 <copy todir="${basedir}/bin">
1288 <fileset dir="${basedir}/winbin/bin" includes="mg*.exe"/>
1289 </copy>
1290 <move todir="${gs2build.home}/bin/windows" failonerror="false">
1291 <fileset dir="${basedir}/winbin/bin"/>
1292 </move>
1293 <delete dir="${basedir}/winbin"/>
1294 </target>
1295
1296 <target name="unzip-windows-packages" depends="init">
1297 <unzip src="${gs2build.home}/packages/windows/gdbm/gdbm.zip"
1298 dest="${gs2build.home}/packages/windows/gdbm"/>
1299 <unzip src="${gs2build.home}/packages/windows/crypt/crypt.zip"
1300 dest="${gs2build.home}/packages/windows/crypt"/>
1301 <unzip src="${gs2build.home}/packages/windows/expat/expat.zip"
1302 dest="${gs2build.home}/packages/windows/expat"/>
1303 </target>
1304 <target name="get-macos-extra" depends="init" if="current.os.ismac">
1305 <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz"
1306 dest="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"
1307 usetimestamp="true"/>
1308 <untar src="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"
1309 dest="${gs2build.home}/perllib/cpan/"
1310 compression="gzip"/>
1311 </target>
1312 <target name="rename-gs2build-files" depends="rename-gs2build-files-unix,rename-gs2build-files-windows"/>
1313
1314 <target name="rename-gs2build-files-windows" if="current.os.iswindows">
1315 <!-- we want a windows path in the setup.bat file -->
1316 <pathconvert targetos="windows" property="gs2build.home.windows">
1317 <path path="${gs2build.home}"/>
1318 </pathconvert>
1319
1320 <property name="gs2build-extra.home" value="${gs2build.home}/gs2build-extra"/>
1321 <copy file="${gs2build-extra.home}/lib.win32.mak" tofile="${gs2build.home}/lib/win32.mak"/>
1322 <copy file="${gs2build-extra.home}/win32.mak" tofile="${gs2build.home}/win32.mak"/>
1323 <copy file="${gs2build-extra.home}/setup.bat" tofile="${gs2build.home}/setup.bat">
1324 <filterset>
1325 <filter token="gsdlhome" value="${gs2build.home.windows}"/>
1326 </filterset>
1327 </copy>
1328 </target>
1329 <target name="rename-gs2build-files-unix" if="current.os.isunix">
1330 <property name="gs2build-extra.home" value="${gs2build.home}/gs2build-extra"/>
1331 <copy file="${gs2build-extra.home}/configure" tofile="${gs2build.home}/configure"/>
1332 <chmod file="${gs2build.home}/configure" perm="a+x"/>
1333 <copy file="${gs2build-extra.home}/configure.in" tofile="${gs2build.home}/configure.in"/>
1334 <copy file="${gs2build-extra.home}/Makefile.in" tofile="${gs2build.home}/Makefile.in"/>
1335 <copy file="${gs2build-extra.home}/packages.configure" tofile="${gs2build.home}/packages/configure"/>
1336 <chmod file="${gs2build.home}/packages/configure" perm="a+x"/>
1337 <copy file="${gs2build-extra.home}/packages.Makefile" tofile="${gs2build.home}/packages/Makefile"/>
1338 <copy file="${gs2build-extra.home}/lib.Makefile.in" tofile="${gs2build.home}/lib/Makefile.in"/>
1339
1340 </target>
1341 <target name="prepare-gli" depends="init" if="gsdl2.islocal" unless="gli.present">
1342 <antcall target="checkout-gli"/>
1343 </target>
1344
1345 <target name="checkout-gli" depends="check-cvsroot,init" if="gsdl2.islocal" unless="nocvs.mode">
1346 <echo>checking out gli</echo>
1347 <cvs command="checkout -P" package="gli"/>
1348 </target>
1349
1350 <target name="configure-gs2building" depends="init" if="gsdl2.islocal"
1351 description="Configure only the Greenstone 2 building components">
1352 <exec executable="${gs2build.home}/configure" os="${os.linux}"
1353 dir="${gs2build.home}">
1354 <arg value="--prefix=${gs2build.home}"/>
1355 </exec>
1356 <exec executable="${gs2build.home}/configure" os="${os.mac}"
1357 dir="${gs2build.home}">
1358 <arg value="--prefix=${gs2build.home}"/>
1359 <arg value="--with-gdbm=${gdbm.installed.path}"/>
1360 </exec>
1361 </target>
1362
1363 <target name="clean-gs2building" depends="init,clean-gli,clean-gs2build" if="gsdl2.islocal"
1364 description="Clean only the Greenstone 2 building components"/>
1365 <target name="clean-gli" depends="init">
1366 <!-- gli -->
1367 <property name="gli.home" value="${basedir}/gli"/>
1368 <!-- linux -->
1369 <exec executable="clean.sh" os="${os.linux},${os.mac}" dir="${gli.home}"
1370 resolveExecutable="true"/>
1371 <!-- windows -->
1372 <exec executable="clean.bat" os="${os.windows}" dir="${gli.home}"
1373 resolveExecutable="true"/>
1374 </target>
1375 <target name="clean-gs2build" depends="init">
1376 <!-- gs2build -->
1377 <!--linux: -->
1378 <exec executable="make" os="${os.linux},${os.mac}" dir="${gs2build.home}">
1379 <arg value="clean"/>
1380 </exec>
1381 <!-- windows: -->
1382 </target>
1383
1384 <target name="clean-windows-c++-gs2building" depends="init" if="current.os.iswindows"
1385 description="remove all object files and executables">
1386 <!-- run the setup script -->
1387 <exec executable="${compile.windows.c++.setup}"/>
1388 <exec executable="nmake" dir="${gs2build.home}">
1389 <arg value="/f"/>
1390 <arg value="win32.mak"/>
1391 <arg value="clean"/>
1392 </exec>
1393 </target>
1394
1395 <target name="compile-gs2building" depends="init" if="gsdl2.islocal"
1396 description="Compile only the Greenstone 2 building components">
1397 <!-- gli -->
1398 <property name="gli.home" value="${basedir}/gli"/>
1399 <!-- linux -->
1400 <exec executable="makegli.sh" os="${os.linux},${os.mac}" dir="${gli.home}"
1401 resolveExecutable="true"/>
1402 <!-- windows -->
1403 <exec executable="makegli.bat" os="${os.windows}" dir="${gli.home}"
1404 resolveExecutable="true"/>
1405 <!-- gs2build -->
1406 <!--linux: make, make install -->
1407 <exec executable="make" os="${os.linux},${os.mac}" dir="${gs2build.home}">
1408 </exec>
1409 <exec executable="make" os="${os.linux},${os.mac}" dir="${gs2build.home}">
1410 <arg value="install"/>
1411 </exec>
1412 </target>
1413 <!-- windows: -->
1414 <target name="compile-windows-c++-gs2building" depends="init" if="current.os.iswindows"
1415 description="Use this if you want to compile the C++ code for the gs2build package">
1416 <!-- run the setup script -->
1417 <exec executable="${compile.windows.c++.setup}"/>
1418 <exec executable="nmake" dir="${gs2build.home}">
1419 <arg value="/f"/>
1420 <arg value="win32.mak"/>
1421 </exec>
1422 </target>
1423 <target name="gli" description="Run the Greenstone Librarian Interface" depends="gli-local,gli-external">
1424 </target>
1425
1426 <target name="gli-local" depends="init" if="gsdl2.islocal">
1427 <exec executable="${basedir}/gli/gli4gs3.sh" os="${os.linux}" dir="${basedir}/gli" spawn="true">
1428 <env key="gsdl3path" path="${basedir}"/>
1429 <env key="gsdlpath" path="${basedir}/gs2build"/>
1430 </exec>
1431 <exec executable="${basedir}/gli/gli4gs3.sh" os="${os.mac}" dir="${basedir}/gli" spawn="true">
1432 <env key="gsdl3path" path="${basedir}"/>
1433 <env key="gsdlpath" path="${basedir}/gs2build"/>
1434 <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${gdbm.installed.path}/lib"/>
1435 </exec>
1436 <exec executable="${basedir}/gli/gli4gs3.bat" os="${os.windows}" dir="${basedir}/gli" spawn="true">
1437 <env key="GSDL3PATH" path="${basedir}"/>
1438 <env key="GSDLPATH" path="${basedir}/gs2build"/>
1439 </exec>
1440 <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.
1441 </echo>
1442 </target>
1443
1444 <target name="gli-external" depends="init" unless="gsdl2.islocal">
1445 <exec executable="${gsdl2.installed.path}/gli/gli4gs3.sh" os="${os.linux},${os.mac}" dir="${gsdl2.installed.path}/gli" spawn="true">
1446 <env key="gsdl3path" path="${basedir}"/>
1447 <env key="gsdlpath" path="${gsdl2.installed.path}"/>
1448 </exec>
1449 <exec executable="${gsdl2.installed.path}/gli/gli4gs3.bat" os="${os.windows}" dir="${gsdl2.installed.path}/gli" spawn="true">
1450 <env key="GSDL3PATH" path="${basedir}"/>
1451 <env key="GSDLPATH" path="${gsdl2.installed.path}"/>
1452 </exec>
1453 <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 following in a terminal/command prompt:
1454 (Linux/Mac OS X / Windows)
1455in gsdl3 directory: source gs3-setup.sh / gs3-setup
1456in gsdl directory: source setup.bash / setup
1457in gli directory: gli4gs3.sh / gli4gs3
1458 </echo>
1459 </target>
1460
1461
1462<!-- ======================== TESTING Targets ========================= -->
1463
1464 <target name="test" description="Run the (incomplete) JUnit test suite "
1465 depends="init">
1466 <mkdir dir="${basedir}/test"/>
1467 <junit printsummary="withOutAndErr"
1468 errorproperty="test.failed"
1469 failureproperty="test.failed"
1470 fork="${junit.fork}">
1471 <formatter type="plain"/>
1472 <classpath>
1473 <pathelement location="${build.home}/gsdl3test.jar"/>
1474 <path refid="compile.classpath"/>
1475 </classpath>
1476 <test name="${testcase}" if="testcase"/>
1477 <batchtest todir="${basedir}/test" unless="testcase">
1478 <fileset dir="${build.home}"
1479 includes="**/*Test.class"
1480 />
1481 </batchtest>
1482 </junit>
1483 <echo>
1484 *********************************************
1485 Test output can be found in directory 'test'
1486 *********************************************
1487 </echo>
1488 </target>
1489
1490
1491<!-- ====================== DISTRIBUTION Targets ========================= -->
1492
1493 <target name="prepare-for-dist-1" depends="init">
1494 <cvs command="export -D '1 second ago'" package="mgpp"
1495 dest="${basedir}/packages/"
1496 cvsRoot=":pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src" />
1497 <cvs command="export -D '1 second ago'" package="gs2build"
1498 cvsRoot=":pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src" />
1499 <cvs command="export -D '1 second ago'" package="gli"
1500 cvsRoot=":pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src" />
1501 <antcall target="rename-gs2build-files-unix"/>
1502 <antcall target="unzip-windows-packages"/>
1503 <antcall target="get-windows-binaries"/>
1504 <antcall target="get-perl-for-windows"/>
1505 <antcall target="prepare-mysql"/>
1506 <delete file="${packages.home}/mysql-standard-4.1.11-pc-linux-gnu-i686.tar.gz"/>
1507 <delete dir="${packages.home}/mysql/sql-bench"/>
1508 <delete dir="${packages.home}/mysql/tests"/>
1509 <delete dir="${packages.home}/mysql/mysql-test"/>
1510 <antcall target="prepare-tomcat"/>
1511 <delete file="${basedir}/comms/jakarta/jakarta-tomcat-5.5.7.zip"/>
1512 <delete file="${basedir}/comms/jakarta/jakarta-tomcat-5.5.7-compat.zip"/>
1513 <antcall target="configure-tomcat"/>
1514 <antcall target="prepare-axis"/>
1515 <delete file="${basedir}/comms/soap/axis-bin-1_2_1.zip"/>
1516 <!-- delete old axis dir -->
1517 <delete dir="${basedir}/comms/soap/axis"/>
1518 <antcall target="prepare-web"/>
1519 </target>
1520
1521 <target name="prepare-for-dist-2" depends="init">
1522 <antcall target="configure-c++"/>
1523 </target>
1524
1525 <target name="prepare-for-dist-3" depends="init">
1526 <antcall target="compile"/>
1527 <antcall target="clean-packages-c++"/>
1528 <antcall target="clean-gs2build"/>
1529 <antcall target="deploy-localsite"/>
1530 <xslt in="build.xml" out="dist-build.xml" style="dist-resources/convert-build-xml.xsl"/>
1531 <delete dir="${basedir}/dist-resources"/>
1532 </target>
1533
1534 <target name="get-perl-for-windows" if="current.os.iswindows">
1535 <get src="http://www.greenstone.org/gs3files/perl-for-windows.zip"
1536 dest="${gs2build.home}/bin/windows/perl-for-windows.zip"
1537 usetimestamp="true"/>
1538 <unzip src="${gs2build.home}/bin/windows/perl-for-windows.zip"
1539 dest="${gs2build.home}/bin/windows"/>
1540 <delete file="${gs2build.home}/bin/windows/perl-for-windows.zip"/>
1541 </target>
1542
1543 <target name="install-for-dist" depends="accept-properties,init,configure-mysql,configure,configure-tomcat">
1544 <condition property="need.xml.jars">
1545 <equals arg1="1.5" arg2="${ant.java.version}"/>
1546 </condition>
1547 <antcall target="rename-xml-jars"/>
1548 <antcall target="rename-gs2build-files-windows"/>
1549 </target>
1550</project>
1551
1552
Note: See TracBrowser for help on using the repository browser.