source: trunk/gsdl3/build.xml@ 10802

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

upgraded mysql packages to 4.1.15: best versions as at 1 Nov 05

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