source: trunk/gsdl3/build.xml@ 10779

Last change on this file since 10779 was 10779, checked in by kjdon, 18 years ago

changed gsdl3 to greenstone3 in some text

  • Property svn:keywords set to Author Date Id Revision
File size: 64.2 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 <!-- 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-reader-password,get-mysql-admin-password"
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="${app.path}"/>
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}:${gdbm.installed.path}/lib"/> <!-- for mac os -->
543 </exec>
544 <exec executable="${catalina.home}/bin/startup.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="true">
545 <env key="GSDLOS" value="windows"/>
546 <env key="GSDL3HOME" value="${basedir}"/>
547 <env key="Path" path="${tomcat.path}"/>
548 <env key="PATH" path="${tomcat.path}"/>
549 <env key="CATALINA_OPTS" value="${catalina.opts}"/>
550 <env key="CLASSPATH" path="${tomcat.classpath}"/>
551 </exec>
552 <!-- wait for the server to startup in case other targets need it running -->
553 <waitfor maxwait="5" maxwaitunit="second">
554 <and>
555 <socket server="${tomcat.server}" port="${tomcat.port}"/>
556 <http url="http://${tomcat.server}:${tomcat.port}${app.path}/index.html"/>
557 </and>
558 </waitfor>
559 </target>
560 <!-- windows: do we want to launch a webrowser?? -->
561 <target name="stop-tomcat" description="Shutdown only Tomcat" depends="init" if="tomcat.islocal">
562 <exec executable="${catalina.home}/bin/shutdown.sh" os="${os.linux},${os.mac}" dir="${catalina.home}/bin" spawn="false">
563 <env key="CATALINA_HOME" value="${catalina.home}"/>
564 </exec>
565 <exec executable="${catalina.home}/bin/shutdown.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="false"/>
566 </target>
567
568 <target name="restart-tomcat" description="Shutdown and restart only Tomcat" depends="init,stop-tomcat,start-tomcat"/>
569
570 <target name="setup-catalina-ant-tasks">
571 <!-- Configure the custom Ant tasks for the Tomcat Manager application -->
572 <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"
573 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
574 <taskdef name="list" classname="org.apache.catalina.ant.ListTask"
575 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
576 <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"
577 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
578 <taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"
579 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
580 <taskdef name="roles" classname="org.apache.catalina.ant.RolesTask"
581 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
582 <taskdef name="start" classname="org.apache.catalina.ant.StartTask"
583 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
584 <taskdef name="stop" classname="org.apache.catalina.ant.StopTask"
585 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
586 <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"
587 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
588 </target>
589
590
591<!-- ======================= Mysql Targets =========================== -->
592
593 <!-- this is one target that we only want to run once. -->
594 <target name="prepare-mysql" depends="init,init-mysql-vars,install-mysql,start-mysql,setup-mysql,stop-mysql-no-password-force"/>
595
596 <target name="init-mysql-vars">
597 <condition property="mysql.islocal.linux">
598 <and>
599 <isset property="mysql.islocal"/>
600 <isset property="current.os.isunixnotmac"/>
601 </and>
602 </condition>
603 <condition property="mysql.islocal.mac">
604 <and>
605 <isset property="mysql.islocal"/>
606 <isset property="current.os.ismac"/>
607 </and>
608 </condition>
609 <condition property="mysql.islocal.windows">
610 <and>
611 <isset property="mysql.islocal"/>
612 <isset property="current.os.iswindows"/>
613 </and>
614 </condition>
615 <condition property="mysql.islocal.usepassword">
616 <and>
617 <isset property="mysql.islocal"/>
618 <isset property="mysql.use.passwords"/>
619 <equals arg1="yes" arg2="${mysql.use.passwords}"/>
620 </and>
621 </condition>
622 <condition property="mysql.islocal.usepassword.windows">
623 <and>
624 <isset property="mysql.islocal.usepassword"/>
625 <isset property="current.os.iswindows"/>
626 </and>
627 </condition>
628 <condition property="mysql.islocal.usepassword.unix">
629 <and>
630 <isset property="mysql.islocal.usepassword"/>
631 <isset property="current.os.isunix"/>
632 </and>
633 </condition>
634 <condition property="mysql.islocal.nopassword">
635 <and>
636 <isset property="mysql.islocal"/>
637 <or>
638 <not>
639 <isset property="mysql.use.passwords"/>
640 </not>
641 <equals arg1="no" arg2="${mysql.use.passwords}"/>
642 </or>
643 </and>
644 </condition>
645 </target>
646
647 <target name="configure-mysql" depends="init,init-mysql-vars,start-mysql,set-mysql-account-passwords,stop-mysql" description="sets up the mysql account passwords"/>
648
649 <target name="get-mysql-root-password" depends="init,init-mysql-vars" if="mysql.islocal.usepassword" unless="mysql.root.password">
650 <echo>(Enter password in the Java popup)</echo>
651 <getuserandpassword message="Please specify a password for the root mysql user: this is to secure your database." username="root" pwordproperty="mysql.root.password"/>
652 </target>
653
654 <target name="get-mysql-root-password-windows" depends="init,init-mysql-vars" if="mysql.islocal.usepassword.windows" unless="mysql.root.password">
655 <echo>(Enter password in the Java popup)</echo>
656 <getuserandpassword message="Please enter the mysql root password" username="root" pwordproperty="mysql.root.password"/>
657 </target>
658
659 <target name="get-mysql-reader-password" depends="init,init-mysql-vars" if="mysql.islocal.usepassword" unless="mysql.reader.password" >
660 <echo>(Enter password in the Java popup)</echo>
661 <getuserandpassword message="Please specify the password for the gsdl3reader mysql user: this is used by greenstone" username="gsdl3reader" pwordproperty="mysql.reader.password"/>
662 </target>
663
664 <target name="get-mysql-admin-password" depends="init,init-mysql-vars" if="mysql.islocal.usepassword" unless="mysql.admin.password" >
665 <echo>(Enter password in the Java popup)</echo>
666 <getuserandpassword message="Please specify the password for the gsdl3admin mysql user: this is used by greenstone" username="gsdl3admin" pwordproperty="mysql.admin.password"/>
667 </target>
668
669 <target name="install-mysql" depends="init,init-mysql-vars,install-mysql-linux,install-mysql-windows,install-mysql-mac"/>
670
671 <!-- install the database : linux-->
672 <target name="install-mysql-linux" depends="init,init-mysql-vars" if="mysql.islocal.linux" unless="mysql.present">
673 <get src="http://www.greenstone.org/gs3files/mysql-standard-4.1.11-pc-linux-gnu-i686.tar.gz"
674 dest="${packages.home}/mysql-standard-4.1.11-pc-linux-gnu-i686.tar.gz"
675 usetimestamp="true"/>
676 <untar src="${packages.home}/mysql-standard-4.1.11-pc-linux-gnu-i686.tar.gz"
677 dest="${packages.home}"
678 compression="gzip"/>
679 <move todir="${packages.home}/mysql">
680 <fileset dir="${packages.home}/mysql-standard-4.1.11-pc-linux-gnu-i686"/>
681 </move>
682 <!-- file permissions are screwed up, so make executables executable -->
683 <chmod file="${mysql.home}/scripts/mysql_install_db" perm="a+x"/>
684 <chmod perm="a+x">
685 <fileset dir="${mysql.home}/bin" />
686 </chmod>
687 <mkdir dir="${mysql.home}/var/"/>
688 <mkdir dir="${mysql.home}/var/log/"/>
689 <chmod file="${mysql.home}/var/" perm="777"/>
690 <chmod file="${mysql.home}/var/log/" perm="777"/>
691
692 <exec executable="${mysql.home}/scripts/mysql_install_db" dir="${mysql.home}">
693 <arg value="--datadir=./data"/>
694 <arg value="--basedir=."/>
695 <arg value="--user=root"/>
696 <arg value="--force"/>
697 </exec>
698 </target>
699
700
701 <!-- install the database : mac-->
702 <target name="install-mysql-mac" depends="init,init-mysql-vars" if="mysql.islocal.mac" unless="mysql.present">
703 <get src="http://www.greenstone.org/gs3files/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc.tar.gz"
704 dest="${packages.home}/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc.tar.gz"
705 usetimestamp="true"/>
706 <untar src="${packages.home}/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc.tar.gz"
707 dest="${packages.home}"
708 compression="gzip"/>
709 <move todir="${packages.home}/mysql">
710 <fileset dir="${packages.home}/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc"/>
711 </move>
712 <!-- file permissions are screwed up, so make executables executable -->
713 <chmod file="${mysql.home}/scripts/mysql_install_db" perm="a+x"/>
714 <chmod perm="a+x">
715 <fileset dir="${mysql.home}/bin" />
716 </chmod>
717 <mkdir dir="${mysql.home}/var/"/>
718 <mkdir dir="${mysql.home}/var/log/"/>
719 <chmod file="${mysql.home}/var/" perm="777" type="dir"/>
720 <chmod file="${mysql.home}/var/log/" perm="777" type="dir"/>
721 <exec executable="${mysql.home}/scripts/mysql_install_db" dir="${mysql.home}">
722 <arg value="--datadir=./data"/>
723 <arg value="--basedir=."/>
724 <!--<arg value="- -user=root"/>
725 <arg value="- -force"/>-->
726 </exec>
727 </target>
728
729 <!-- install the database : windows -->
730 <target name="install-mysql-windows" depends="init,init-mysql-vars" if="mysql.islocal.windows" unless="mysql.present">
731 <get src="http://www.greenstone.org/gs3files/mysql-noinstall-4.1.11-win32.zip"
732 dest="${packages.home}/mysql-noinstall-4.1.11-win32.zip"
733 usetimestamp="true"/>
734 <!-- can we run the installer?? -->
735 <unzip src="${packages.home}/mysql-noinstall-4.1.11-win32.zip"
736 dest="${packages.home}"/>
737 <move todir="${packages.home}/mysql">
738 <fileset dir="${packages.home}/mysql-4.1.11-win32"/>
739 </move>
740 </target>
741
742 <target name="setup-mysql" depends="init" if="mysql.islocal">
743 <!-- setup the gsdl3 accounts -->
744 <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
745 <arg value="--user=root"/>
746 <arg value="--execute=GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@localhost"/>
747 </exec>
748 <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
749 <arg value="--user=root"/>
750 <arg value="--execute=GRANT SELECT ON *.* TO gsdl3reader@localhost"/>
751 </exec>
752 <!--<exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
753 <arg value="- -user=root"/>
754 <arg value="- -execute=GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@'%';"/>
755 </exec>-->
756
757 <!-- remove the anonymous user -->
758 <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
759 <arg value="--user=root"/>
760 <arg value="--execute=delete from mysql.user where Host='localhost' and User='';"/>
761 </exec>
762 <!-- load in the demo collection database -->
763 <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
764 <arg value="--user=root"/>
765 <arg value="--execute=create database localsite_gs3mgdemo;"/>
766 </exec>
767 <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}"
768 input="${web.home}/sites/localsite/collect/gs3mgdemo/mysqldatadump.sql">
769 <arg value="--user=root"/>
770 <arg value="localsite_gs3mgdemo"/>
771 </exec>
772 </target>
773
774 <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">
775 <exec executable="${mysql.home}/bin/mysql" dir="${mysql.home}">
776 <arg value="--user=root"/>
777 <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;"/>
778 </exec>
779 </target>
780
781 <target name="start-mysql" depends="init,init-mysql-vars" if="mysql.islocal"
782 description="Startup only mysql">
783 <echo>Starting up the mysql server</echo>
784 <exec executable="${mysql.home}/bin/mysqld_safe" dir="${mysql.home}"
785 spawn="true" os="${os.linux},${os.mac}">
786 <arg value="--datadir=./data"/>
787 <arg value="--basedir=."/>
788 <arg value="--pid_file=gsdl3.pid"/>
789 <arg value="--socket=/tmp/mysql.sock"/>
790 <arg value="--port=${mysql.port}"/>
791 <arg value="--err-log=./var/log/mysql.log"/>
792 </exec>
793 <exec executable="${mysql.home}/bin/mysqld" dir="${mysql.home}" spawn="true" os="${os.windows}">
794 <arg value="--port=${mysql.port}"/>
795 </exec>
796 <sleep seconds="2"/>
797 </target>
798
799 <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"
800 description="Shutdown only mysql">
801 <echo>MYSQL database server shutdown successfully</echo>
802 </target>
803
804 <target name="stop-mysql-no-password" depends="init" if="mysql.islocal.nopassword">
805 <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
806 failonerror="true" os="${os.linux},${os.mac}">
807 <arg value="--user=root"/>
808 <arg value="--socket=/tmp/mysql.sock"/>
809 <arg value="shutdown"/>
810 </exec>
811 <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
812 failonerror="true" os="${os.windows}">
813 <arg value="--user=root"/>
814 <arg value="shutdown"/>
815 </exec>
816 </target>
817
818 <target name="stop-mysql-no-password-force" depends="init">
819 <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
820 failonerror="true" os="${os.linux},${os.mac}">
821 <arg value="--user=root"/>
822 <arg value="--socket=/tmp/mysql.sock"/>
823 <arg value="shutdown"/>
824 </exec>
825 <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
826 failonerror="true" os="${os.windows}">
827 <arg value="--user=root"/>
828 <arg value="shutdown"/>
829 </exec>
830 </target>
831
832 <target name="stop-mysql-use-password-unix" depends="init" if="mysql.islocal.usepassword.unix">
833 <echo>At the password prompt, enter the mysql root password.</echo>
834 <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
835 failonerror="true" os="${os.linux},${os.mac}">
836 <arg value="--user=root"/>
837 <arg value="-p"/>
838 <arg value="--socket=/tmp/mysql.sock"/>
839 <arg value="shutdown"/>
840 </exec>
841 </target>
842
843 <target name="stop-mysql-use-password-windows" depends="init,get-mysql-root-password-windows" if="mysql.islocal.usepassword.windows">
844 <!-- on windows it doesn't work unless the password is specified here -->
845 <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
846 failonerror="true" os="${os.windows}">
847 <arg value="--user=root"/>
848 <arg value="-p${mysql.root.password}"/>
849 <arg value="shutdown"/>
850 </exec>
851 </target>
852
853 <target name="restart-mysql" description="Shutdown and restart only mysql" depends="init,stop-mysql,start-mysql"/>
854
855
856<!-- ======================= Axis Targets ============================ -->
857
858 <target name="prepare-axis" depends="init">
859 <mkdir dir="${basedir}/comms/soap"/>
860 <get src="http://www.greenstone.org/gs3files/axis-bin-1_2_1.zip"
861 dest="${basedir}/comms/soap/axis-bin-1_2_1.zip"
862 usetimestamp="true"/>
863 <delete dir="${basedir}/comms/soap/axis.bak"/>
864 <move todir="${basedir}/comms/soap/axis.bak" failonerror="false">
865 <fileset dir="${basedir}/comms/soap/axis"/>
866 </move>
867 <unzip src="${basedir}/comms/soap/axis-bin-1_2_1.zip"
868 dest="${basedir}/comms/soap/"/>
869 <move todir="${basedir}/comms/soap/axis">
870 <fileset dir="${basedir}/comms/soap/axis-1_2_1"/>
871 </move>
872 <!-- install axis into greenstone web app -->
873 <copy todir="${web.lib}">
874 <fileset dir="${basedir}/comms/soap/axis/webapps/axis/WEB-INF/lib">
875 <include name="*.jar"/>
876 </fileset>
877 </copy>
878 <copy todir="${web.home}">
879 <fileset dir="${basedir}/comms/soap/axis/webapps/axis/">
880 <include name="*.jsp"/>
881 <include name="*.jws"/>
882 </fileset>
883 </copy>
884 <copy tofile="${web.home}/axis.html" file="${basedir}/comms/soap/axis/webapps/axis/index.html"/>
885 <copy todir="${web.classes}">
886 <fileset dir="${basedir}/comms/soap/axis/webapps/axis/WEB-INF/classes">
887 <include name="*.properties"/>
888 </fileset>
889 </copy>
890 </target>
891
892 <target name="soap-deploy-site" depends="get-sitename,get-siteuri,create-deployment-files"
893 description="Deploy a SOAP web service for a local Greenstone site">
894 <java classname="org.apache.axis.client.AdminClient">
895 <classpath refid="compile.classpath"/>
896 <arg value="-l"/>
897 <arg value="http://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/>
898 <arg file="${basedir}/resources/soap/${axis.sitename}.wsdd"/>
899 </java>
900 </target>
901
902 <target name="soap-undeploy-site" depends="get-sitename"
903 description="Undeploy a SOAP web service for a local Greenstone site">
904 <java classname="org.apache.axis.client.AdminClient">
905 <classpath refid="compile.classpath"/>
906 <arg value="-l"/>
907 <arg value="http://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/>
908 <arg file="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"/>
909 </java>
910 </target>
911
912 <!-- this target used to deploy the localsite server for the default installation -->
913 <target name="deploy-localsite" depends="init">
914 <antcall target="start-tomcat"/>
915 <antcall target="soap-deploy-site">
916 <param name="axis.sitename" value="localsite"/>
917 <param name="axis.siteuri" value="localsite"/>
918 </antcall>
919 <antcall target="stop-tomcat"/>
920 </target>
921
922 <target name="get-sitename" unless="axis.sitename">
923 <input addproperty="axis.sitename" message="What site? (press enter for default:localsite)" defaultvalue="localsite"/>
924 </target>
925
926 <target name="get-siteuri" depends="get-sitename" unless="axis.siteuri">
927 <input addproperty="axis.siteuri" message="What name do you want the service to have? (press enter for default:${axis.sitename})" defaultvalue="${axis.sitename}"/>
928 <echo>${axis.sitename}, ${axis.siteuri}</echo>
929 </target>
930 <target name="check-deployment-files" depends="get-sitename">
931 <condition property="deploy.exists">
932 <and>
933 <available file="${basedir}/resources/soap/${axis.sitename}.wsdd"/>
934 <available file="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"/>
935 <available file="${web.classes}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class"/>
936 </and>
937 </condition>
938 </target>
939
940 <target name="create-deployment-files" depends="get-sitename,get-siteuri,check-deployment-files"
941 if="axis.sitename" unless="deploy.exists">
942 <filter token="sitename" value="${axis.sitename}"/>
943 <filter token="siteuri" value="${axis.siteuri}"/>
944 <copy file="${basedir}/resources/soap/site.wsdd.template"
945 tofile="${basedir}/resources/soap/${axis.sitename}.wsdd"
946 filtering="true"/>
947 <copy file="${basedir}/resources/soap/undeploy-site.wsdd.template"
948 tofile="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"
949 filtering="true"/>
950 <!-- create the java files and compile them -->
951 <copy file="${gsdl3.home}/SOAPServer.java.in"
952 tofile="${gsdl3.home}/SOAPServer${axis.sitename}.java"
953 filtering="true"/>
954 <javac srcdir="${src.home}"
955 destdir="${build.home}"
956 debug="${compile.debug}"
957 deprecation="${compile.deprecation}"
958 optimize="${compile.optimize}">
959 <classpath refid="compile.classpath"/>
960 <include name="org/greenstone/gsdl3/SOAPServer${axis.sitename}.java" />
961 </javac>
962 <mkdir dir="${web.classes}/org/greenstone/gsdl3"/>
963 <copy file="${build.home}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class" tofile="${web.classes}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class" />
964 </target>
965
966
967<!-- ====================== Core targets ============================== -->
968<!-- core targets refer to the core gsdl3 java src -->
969
970 <target name="prepare-core" unless="nocvs.mode">
971 <!-- just get rid of empty directories-->
972 <cvs command="update -P"/>
973 </target>
974
975 <target name="configure-core"/>
976
977 <target name="update-core" depends="init,cvsupdate-core,clean-core,compile-core"
978 description="Update only the Greenstone core" />
979
980 <target name="cvsupdate-core" unless="nocvs.mode">
981 <cvs command="update -l"/>
982 <cvs command="update -dP bin comms dist-resources docs lib resources src winutil"/>
983 </target>
984
985 <target name="clean-core"
986 description="Clean only the Greenstone core">
987 <delete dir="${build.home}"/>
988 </target>
989
990 <target name="compile-core"
991 description="Compile only the Greenstone core">
992 <mkdir dir="${build.home}"/>
993 <javac srcdir="${src.home}"
994 destdir="${build.home}"
995 debug="${compile.debug}"
996 deprecation="${compile.deprecation}"
997 optimize="${compile.optimize}">
998 <classpath>
999 <path refid="compile.classpath"/>
1000 </classpath>
1001 </javac>
1002 <jar destfile="${build.home}/gsdl3.jar">
1003 <fileset dir="${build.home}">
1004 <include name="org/greenstone/gsdl3/**"/>
1005 <exclude name="**/Test.class"/>
1006 </fileset>
1007 <manifest>
1008 <attribute name="Built-By" value="${user.name}" />
1009 </manifest>
1010 </jar>
1011 <copy file="${build.home}/gsdl3.jar" todir="${web.lib}"/>
1012 <jar destfile="${build.home}/phind.jar">
1013 <fileset dir="${build.home}">
1014 <include name="org/greenstone/applet/phind/**"/>
1015 </fileset>
1016 <manifest>
1017 <attribute name="Built-By" value="${user.name}" />
1018 </manifest>
1019 </jar>
1020 <copy file="${build.home}/phind.jar" todir="${web.applet}"/>
1021 <jar destfile="${build.home}/anttasks.jar">
1022 <fileset dir="${build.home}">
1023 <include name="org/greenstone/anttasks/**"/>
1024 </fileset>
1025 <manifest>
1026 <attribute name="Built-By" value="${user.name}" />
1027 </manifest>
1028 </jar>
1029 <copy file="${build.home}/anttasks.jar" todir="${basedir}/lib/java"/>
1030 <jar destfile="${build.home}/gsdl3test.jar">
1031 <fileset dir="${build.home}">
1032 <include name="org/greenstone/gsdl3/**/*Test.class"/>
1033 <include name="org/greenstone/testing/**"/>
1034 </fileset>
1035 <manifest>
1036 <attribute name="Built-By" value="${user.name}" />
1037 </manifest>
1038 </jar>
1039 </target>
1040
1041<!-- ================== Packages targets ================================ -->
1042 <!-- these targets refer to the greenstone packages - these need updating
1043 less often, so are in separate targets to the core -->
1044 <target name="prepare-packages" depends="init,prepare-mgpp,prepare-windows"/>
1045
1046 <target name="prepare-windows" depends="init" if="current.os.iswindows">
1047 <!-- need to download precompiled binaries for mg and mgpp -->
1048 </target>
1049
1050 <target name="checkout-mgpp" depends="check-cvsroot,init" unless="nocvs.mode">
1051 <cvs command="checkout -P" package="mgpp" dest="${basedir}/packages/"/>
1052 </target>
1053
1054 <target name="prepare-mgpp" depends="init" unless="mgpp.present">
1055 <antcall target="checkout-mgpp"/>
1056 </target>
1057
1058 <target name="update-packages" depends="init,cvsupdate-packages,configure-packages,clean-packages,compile-packages"
1059 description="Update only the packages"/>
1060
1061 <target name="cvsupdate-packages" unless="nocvs.mode">
1062 <cvs command="update -dP" dest="${packages.home}"/>
1063 </target>
1064
1065 <target name="configure-packages" description="Configure only the packages.">
1066 <echo>
1067 Configuring MG
1068 </echo>
1069 <exec executable="${mg.home}/configure" os="${os.linux},${os.mac}"
1070 dir="${mg.home}">
1071 <arg value="--prefix=${basedir}"/>
1072 <arg value="--libdir=${lib.jni}"/>
1073 </exec>
1074 <echo>
1075 Configuring MGPP
1076 </echo>
1077 <exec executable="${mgpp.home}/configure" os="${os.linux},${os.mac}"
1078 dir="${mgpp.home}">
1079 <arg value="--prefix=${basedir}"/>
1080 <arg value="--libdir=${lib.jni}"/>
1081 </exec>
1082 <echo>
1083 Configuring JavaGDBM
1084 </echo>
1085 <exec executable="${javagdbm.home}/configure" os="${os.linux}"
1086 dir="${javagdbm.home}">
1087 <arg value="--prefix=${basedir}"/>
1088 <arg value="--libdir=${lib.jni}"/>
1089 </exec>
1090 <exec executable="${javagdbm.home}/configure" os="${os.mac}"
1091 dir="${javagdbm.home}">
1092 <arg value="--prefix=${basedir}"/>
1093 <arg value="--libdir=${lib.jni}"/>
1094 <arg value="--with-gdbm=${gdbm.installed.path}"/>
1095 </exec>
1096
1097 </target>
1098
1099 <target name="clean-packages" depends="init,clean-packages-c++,clean-packages-java" description="Clean only the packages"/>
1100
1101 <target name="clean-packages-c++" depends="init">
1102 <!-- mg : just call the make target -->
1103 <exec executable="make" os="${os.linux},${os.mac}"
1104 dir="${mg.home}">
1105 <arg value="clean"/>
1106 </exec>
1107 <!-- mgpp -->
1108 <exec executable="make" os="${os.linux},${os.mac}"
1109 dir="${mgpp.home}">
1110 <arg value="clean"/>
1111 </exec>
1112 <!-- javagdbm -->
1113 <exec executable="make" os="${os.linux},${os.mac}"
1114 dir="${javagdbm.home}">
1115 <arg value="clean"/>
1116 </exec>
1117 </target>
1118
1119 <target name="clean-packages-java" depends="init">
1120 <!-- vishnu : just call the ant target -->
1121 <ant antfile="${vishnu.home}/build.xml" dir="${vishnu.home}"
1122 inheritall="false" target="clean">
1123 <property name="catalina.home" value="${catalina.home}"/>
1124 </ant>
1125 <!-- gsdl-as : just call the ant target-->
1126 <ant antfile="${gsdl-as.home}/build.xml" dir="${gsdl-as.home}"
1127 inheritall="false" target="clean">
1128 <property name="catalina.home" value="${catalina.home}"/>
1129 </ant>
1130 </target>
1131
1132 <target name="clean-windows-c++-packages" depends="init" if="current.os.iswindows"
1133 description="Clean only the C/C++ packages">
1134 <exec executable="${mg.home}/winMake.bat" dir="${mg.home}">
1135 <arg value="clean"/>
1136 </exec>
1137 <exec executable="${mgpp.home}/winMake.bat" dir="${mgpp.home}">
1138 <arg value="clean"/>
1139 </exec>
1140 </target>
1141
1142 <target name="compile-packages"
1143 description="Compile only the packages">
1144 <echo>Compiling MG</echo>
1145 <exec executable="make" os="${os.linux},${os.mac}"
1146 dir="${mg.home}">
1147 </exec>
1148 <exec executable="make" os="${os.linux},${os.mac}"
1149 dir="${mg.home}">
1150 <arg value="install"/>
1151 </exec>
1152 <!-- windows: just the java stuff. -->
1153 <exec executable="${mg.home}/winMake.bat" os="${os.windows}"
1154 dir="${mg.home}">
1155 <arg value="compile"/>
1156 <arg value="javaonly"/>
1157 </exec>
1158 <!-- install the jar file -->
1159 <copy file="${mg.home}/mg.jar" todir="${lib.jni}"/>
1160
1161 <!-- mgpp -->
1162 <echo>Compiling MGPP</echo>
1163 <exec executable="make" os="${os.linux},${os.mac}"
1164 dir="${mgpp.home}">
1165 </exec>
1166 <exec executable="make" os="${os.linux},${os.mac}"
1167 dir="${mgpp.home}">
1168 <arg value="install"/>
1169 </exec>
1170 <!-- windows: just the java stuff. -->
1171 <exec executable="${mgpp.home}/winMake.bat" os="${os.windows}"
1172 dir="${mgpp.home}">
1173 <arg value="compile"/>
1174 <arg value="javaonly"/>
1175 </exec>
1176 <!-- install the jar file -->
1177 <copy file="${mgpp.home}/mgpp.jar" todir="${lib.jni}"/>
1178
1179 <!-- javagdbm -->
1180 <exec executable="make" os="${os.linux},${os.mac}"
1181 dir="${javagdbm.home}">
1182 </exec>
1183 <exec executable="make" os="${os.linux},${os.mac}"
1184 dir="${javagdbm.home}">
1185 <arg value="install"/>
1186 </exec>
1187 <!-- windows: just the java stuff. -->
1188 <exec executable="${javagdbm.home}/winMake.bat" os="${os.windows}"
1189 dir="${javagdbm.home}">
1190 <arg value="compile"/>
1191 <arg value="javaonly"/>
1192 </exec>
1193 <!-- install the jar file -->
1194 <copy file="${javagdbm.home}/javagdbm.jar" todir="${lib.jni}"/>
1195
1196 <!-- vishnu -->
1197 <echo>Compiling Vishnu</echo>
1198 <ant antfile="${vishnu.home}/build.xml" dir="${vishnu.home}"
1199 inheritall="false" target="compile">
1200 <property name="catalina.home" value="${catalina.home}"/>
1201 </ant>
1202
1203 <!-- gsdl-as -->
1204 <echo>Compiling GSDL-AS</echo>
1205 <ant antfile="${gsdl-as.home}/build.xml" dir="${gsdl-as.home}"
1206 inheritall="false" target="compile">
1207 <property name="catalina.home" value="${catalina.home}"/>
1208 </ant>
1209 </target>
1210
1211 <target name="compile-windows-c++-packages" depends="init" if="current.os.iswindows"
1212 description="Compile only the C/C++ packages">
1213 <exec executable="${mg.home}/winMake.bat" dir="${mg.home}"/>
1214 <exec executable="${mg.home}/winMake.bat" dir="${mg.home}">
1215 <arg value="install"/>
1216 <env key="GSDL3HOME" value="${basedir}"/>
1217 </exec>
1218 <exec executable="${mgpp.home}/winMake.bat" dir="${mgpp.home}"/>
1219 <exec executable="${mgpp.home}/winMake.bat" dir="${mgpp.home}">
1220 <arg value="install"/>
1221 <env key="GSDL3HOME" value="${basedir}"/>
1222 </exec>
1223 <exec executable="${javagdbm.home}/winMake.bat" dir="${javagdbm.home}"/>
1224 <exec executable="${javagdbm.home}/winMake.bat" dir="${javagdbm.home}">
1225 <arg value="install"/>
1226 <env key="GSDL3HOME" value="${basedir}"/>
1227 </exec>
1228 </target>
1229
1230 <!-- ================== gs2building targets ===============-->
1231
1232
1233 <target name="update-gs2building" if="gsdl2.islocal"
1234 depends="init,cvsupdate-gs2building,rename-gs2build-files,configure-gs2building,clean-gs2building,compile-gs2building"
1235 description="Update only the Greenstone 2 building components"/>
1236
1237 <target name="cvsupdate-gs2building" if="gsdl2.islocal" depends="init" unless="nocvs.mode">
1238 <cvs command="update -dP" dest="${gli.home}"/>
1239 <!-- Note: can't do a -d update here cos it will get all of gsdl
1240 also, an update doesn't get new files, so we do a checkout instead. -->
1241 <cvs command="co gs2build" dest="${basedir}"/>
1242 </target>
1243
1244 <target name="prepare-gs2building" depends="init,prepare-gs2build,prepare-gli" if="gsdl2.islocal">
1245 </target>
1246
1247 <target name="checkout-gs2build" depends="check-cvsroot,init" unless="nocvs.mode">
1248 <echo>checking out gs2build</echo>
1249 <cvs command="checkout -P" package="gs2build"/>
1250 </target>
1251
1252 <target name="prepare-gs2build" depends="init" if="gsdl2.islocal" unless="gs2build.present">
1253 <antcall target="checkout-gs2build"/>
1254 <!-- rename the .gs2build files -->
1255 <antcall target="rename-gs2build-files"/>
1256 <antcall target="unzip-windows-packages"/>
1257 <antcall target="get-windows-binaries"/>
1258 <antcall target="get-macos-extra"/>
1259 </target>
1260
1261 <target name="checkout-winbin" depends="init" if="current.os.iswindows"
1262 unless="nocvs.mode">
1263 <cvs command="checkout -P" package="winbin"/>
1264 </target>
1265
1266 <target name="get-windows-binaries" depends="init,checkout-winbin" if="current.os.iswindows">
1267 <copy todir="${basedir}/bin">
1268 <fileset dir="${basedir}/winbin/bin" includes="mg*.exe"/>
1269 </copy>
1270 <move todir="${gs2build.home}/bin/windows" failonerror="false">
1271 <fileset dir="${basedir}/winbin/bin"/>
1272 </move>
1273 <delete dir="${basedir}/winbin"/>
1274 </target>
1275
1276 <target name="unzip-windows-packages" depends="init" if="current.os.iswindows">
1277 <unzip src="${gs2build.home}/packages/windows/gdbm/gdbm.zip"
1278 dest="${gs2build.home}/packages/windows/gdbm"/>
1279 <unzip src="${gs2build.home}/packages/windows/crypt/crypt.zip"
1280 dest="${gs2build.home}/packages/windows/crypt"/>
1281 <unzip src="${gs2build.home}/packages/windows/expat/expat.zip"
1282 dest="${gs2build.home}/packages/windows/expat"/>
1283 </target>
1284 <target name="get-macos-extra" depends="init" if="current.os.ismac">
1285 <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz"
1286 dest="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"
1287 usetimestamp="true"/>
1288 <untar src="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"
1289 dest="${gs2build.home}/perllib/cpan/"
1290 compression="gzip"/>
1291 </target>
1292 <target name="rename-gs2build-files" depends="rename-gs2build-files-unix,rename-gs2build-files-windows"/>
1293
1294 <target name="rename-gs2build-files-windows" if="current.os.iswindows">
1295 <!-- we want a windows path in the setup.bat file -->
1296 <pathconvert targetos="windows" property="gs2build.home.windows">
1297 <path path="${gs2build.home}"/>
1298 </pathconvert>
1299
1300 <property name="gs2build-extra.home" value="${gs2build.home}/gs2build-extra"/>
1301 <copy file="${gs2build-extra.home}/lib.win32.mak" tofile="${gs2build.home}/lib/win32.mak"/>
1302 <copy file="${gs2build-extra.home}/win32.mak" tofile="${gs2build.home}/win32.mak"/>
1303 <copy file="${gs2build-extra.home}/setup.bat" tofile="${gs2build.home}/setup.bat">
1304 <filterset>
1305 <filter token="gsdlhome" value="${gs2build.home.windows}"/>
1306 </filterset>
1307 </copy>
1308 </target>
1309 <target name="rename-gs2build-files-unix" if="current.os.isunix">
1310 <property name="gs2build-extra.home" value="${gs2build.home}/gs2build-extra"/>
1311 <copy file="${gs2build-extra.home}/configure" tofile="${gs2build.home}/configure"/>
1312 <chmod file="${gs2build.home}/configure" perm="a+x"/>
1313 <copy file="${gs2build-extra.home}/configure.in" tofile="${gs2build.home}/configure.in"/>
1314 <copy file="${gs2build-extra.home}/Makefile.in" tofile="${gs2build.home}/Makefile.in"/>
1315 <copy file="${gs2build-extra.home}/packages.configure" tofile="${gs2build.home}/packages/configure"/>
1316 <chmod file="${gs2build.home}/packages/configure" perm="a+x"/>
1317 <copy file="${gs2build-extra.home}/packages.Makefile" tofile="${gs2build.home}/packages/Makefile"/>
1318 <copy file="${gs2build-extra.home}/lib.Makefile.in" tofile="${gs2build.home}/lib/Makefile.in"/>
1319
1320 </target>
1321 <target name="prepare-gli" depends="init" if="gsdl2.islocal" unless="gli.present">
1322 <antcall target="checkout-gli"/>
1323 </target>
1324
1325 <target name="checkout-gli" depends="check-cvsroot,init" if="gsdl2.islocal" unless="nocvs.mode">
1326 <echo>checking out gli</echo>
1327 <cvs command="checkout -P" package="gli"/>
1328 </target>
1329
1330 <target name="configure-gs2building" depends="init" if="gsdl2.islocal"
1331 description="Configure only the Greenstone 2 building components">
1332 <exec executable="${gs2build.home}/configure" os="${os.linux}"
1333 dir="${gs2build.home}">
1334 <arg value="--prefix=${gs2build.home}"/>
1335 </exec>
1336 <exec executable="${gs2build.home}/configure" os="${os.mac}"
1337 dir="${gs2build.home}">
1338 <arg value="--prefix=${gs2build.home}"/>
1339 <arg value="--with-gdbm=${gdbm.installed.path}"/>
1340 </exec>
1341 </target>
1342
1343 <target name="clean-gs2building" depends="init,clean-gli,clean-gs2build" if="gsdl2.islocal"
1344 description="Clean only the Greenstone 2 building components"/>
1345 <target name="clean-gli" depends="init">
1346 <!-- gli -->
1347 <property name="gli.home" value="${basedir}/gli"/>
1348 <!-- linux -->
1349 <exec executable="clean.sh" os="${os.linux},${os.mac}" dir="${gli.home}"
1350 resolveExecutable="true"/>
1351 <!-- windows -->
1352 <exec executable="clean.bat" os="${os.windows}" dir="${gli.home}"
1353 resolveExecutable="true"/>
1354 </target>
1355 <target name="clean-gs2build" depends="init">
1356 <!-- gs2build -->
1357 <!--linux: -->
1358 <exec executable="make" os="${os.linux},${os.mac}" dir="${gs2build.home}">
1359 <arg value="clean"/>
1360 </exec>
1361 <!-- windows: -->
1362 </target>
1363
1364 <target name="clean-windows-c++-gs2building" depends="init" if="current.os.iswindows"
1365 description="remove all object files and executables">
1366 <!-- run the setup script -->
1367 <exec executable="${compile.windows.c++.setup}"/>
1368 <exec executable="nmake" dir="${gs2build.home}">
1369 <arg value="/f"/>
1370 <arg value="win32.mak"/>
1371 <arg value="clean"/>
1372 </exec>
1373 </target>
1374
1375 <target name="compile-gs2building" depends="init" if="gsdl2.islocal"
1376 description="Compile only the Greenstone 2 building components">
1377 <!-- gli -->
1378 <property name="gli.home" value="${basedir}/gli"/>
1379 <!-- linux -->
1380 <exec executable="makegli.sh" os="${os.linux},${os.mac}" dir="${gli.home}"
1381 resolveExecutable="true"/>
1382 <!-- windows -->
1383 <exec executable="makegli.bat" os="${os.windows}" dir="${gli.home}"
1384 resolveExecutable="true"/>
1385 <!-- gs2build -->
1386 <!--linux: make, make install -->
1387 <exec executable="make" os="${os.linux},${os.mac}" dir="${gs2build.home}">
1388 </exec>
1389 <exec executable="make" os="${os.linux},${os.mac}" dir="${gs2build.home}">
1390 <arg value="install"/>
1391 </exec>
1392 </target>
1393 <!-- windows: -->
1394 <target name="compile-windows-c++-gs2building" depends="init" if="current.os.iswindows"
1395 description="Use this if you want to compile the C++ code for the gs2build package">
1396 <!-- run the setup script -->
1397 <exec executable="${compile.windows.c++.setup}"/>
1398 <exec executable="nmake" dir="${gs2build.home}">
1399 <arg value="/f"/>
1400 <arg value="win32.mak"/>
1401 </exec>
1402 </target>
1403 <target name="gli" description="Run the Greenstone Librarian Interface" depends="gli-local,gli-external">
1404 </target>
1405
1406 <target name="gli-local" depends="init" if="gsdl2.islocal">
1407 <exec executable="${basedir}/gli/gli4gs3.sh" os="${os.linux}" dir="${basedir}/gli" spawn="true">
1408 <env key="gsdl3path" path="${basedir}"/>
1409 <env key="gsdlpath" path="${basedir}/gs2build"/>
1410 </exec>
1411 <exec executable="${basedir}/gli/gli4gs3.sh" os="${os.mac}" dir="${basedir}/gli" spawn="true">
1412 <env key="gsdl3path" path="${basedir}"/>
1413 <env key="gsdlpath" path="${basedir}/gs2build"/>
1414 <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${gdbm.installed.path}/lib"/>
1415 </exec>
1416 <exec executable="${basedir}/gli/gli4gs3.bat" os="${os.windows}" dir="${basedir}/gli" spawn="true">
1417 <env key="GSDL3PATH" path="${basedir}"/>
1418 <env key="GSDLPATH" path="${basedir}/gs2build"/>
1419 </exec>
1420 <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.
1421 </echo>
1422 </target>
1423
1424 <target name="gli-external" depends="init" unless="gsdl2.islocal">
1425 <exec executable="${gsdl2.installed.path}/gli/gli4gs3.sh" os="${os.linux},${os.mac}" dir="${gsdl2.installed.path}/gli" spawn="true">
1426 <env key="gsdl3path" path="${basedir}"/>
1427 <env key="gsdlpath" path="${gsdl2.installed.path}"/>
1428 </exec>
1429 <exec executable="${gsdl2.installed.path}/gli/gli4gs3.bat" os="${os.windows}" dir="${gsdl2.installed.path}/gli" spawn="true">
1430 <env key="GSDL3PATH" path="${basedir}"/>
1431 <env key="GSDLPATH" path="${gsdl2.installed.path}"/>
1432 </exec>
1433 <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:
1434 (Linux/Mac OS X / Windows)
1435in greenstone3 directory: source gs3-setup.sh / gs3-setup
1436in gsdl directory: source setup.bash / setup
1437in gli directory: gli4gs3.sh / gli4gs3
1438 </echo>
1439 </target>
1440
1441
1442<!-- ======================== TESTING Targets ========================= -->
1443
1444 <target name="test" description="Run the (incomplete) JUnit test suite "
1445 depends="init">
1446 <mkdir dir="${basedir}/test"/>
1447 <junit printsummary="withOutAndErr"
1448 errorproperty="test.failed"
1449 failureproperty="test.failed"
1450 fork="${junit.fork}">
1451 <formatter type="plain"/>
1452 <classpath>
1453 <pathelement location="${build.home}/gsdl3test.jar"/>
1454 <path refid="compile.classpath"/>
1455 </classpath>
1456 <test name="${testcase}" if="testcase"/>
1457 <batchtest todir="${basedir}/test" unless="testcase">
1458 <fileset dir="${build.home}"
1459 includes="**/*Test.class"
1460 />
1461 </batchtest>
1462 </junit>
1463 <echo>
1464 *********************************************
1465 Test output can be found in directory 'test'
1466 *********************************************
1467 </echo>
1468 </target>
1469
1470
1471<!-- ====================== DISTRIBUTION Targets ========================= -->
1472
1473 <target name="prepare-for-dist-1" depends="init">
1474 <cvs command="export -D '1 second ago'" package="mgpp"
1475 dest="${basedir}/packages/"
1476 cvsRoot=":pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src" />
1477 <cvs command="export -D '1 second ago'" package="gs2build"
1478 cvsRoot=":pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src" />
1479 <cvs command="export -D '1 second ago'" package="gli"
1480 cvsRoot=":pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src" />
1481 <antcall target="rename-gs2build-files-unix"/>
1482 <antcall target="unzip-windows-packages"/>
1483 <antcall target="get-windows-binaries"/>
1484 <antcall target="get-perl-for-windows"/>
1485 <antcall target="prepare-mysql"/>
1486 <delete file="${packages.home}/mysql-standard-4.1.11-pc-linux-gnu-i686.tar.gz"/>
1487 <delete dir="${packages.home}/mysql/sql-bench"/>
1488 <delete dir="${packages.home}/mysql/tests"/>
1489 <delete dir="${packages.home}/mysql/mysql-test"/>
1490 <antcall target="prepare-tomcat"/>
1491 <delete file="${basedir}/comms/jakarta/jakarta-tomcat-5.5.7.zip"/>
1492 <delete file="${basedir}/comms/jakarta/jakarta-tomcat-5.5.7-compat.zip"/>
1493 <antcall target="configure-tomcat"/>
1494 <antcall target="prepare-axis"/>
1495 <delete file="${basedir}/comms/soap/axis-bin-1_2_1.zip"/>
1496 <!-- delete old axis dir -->
1497 <delete dir="${basedir}/comms/soap/axis"/>
1498 <antcall target="prepare-web"/>
1499 </target>
1500
1501 <target name="prepare-for-dist-2" depends="init">
1502 <antcall target="configure-c++"/>
1503 </target>
1504
1505 <target name="prepare-for-dist-3" depends="init">
1506 <antcall target="compile"/>
1507 <antcall target="clean-packages-c++"/>
1508 <antcall target="clean-gs2build"/>
1509 <antcall target="deploy-localsite"/>
1510 <xslt in="build.xml" out="dist-build.xml" style="dist-resources/convert-build-xml.xsl"/>
1511 <delete dir="${basedir}/dist-resources"/>
1512 </target>
1513
1514 <target name="get-perl-for-windows" if="current.os.iswindows">
1515 <get src="http://www.greenstone.org/gs3files/perl-for-windows.zip"
1516 dest="${gs2build.home}/bin/windows/perl-for-windows.zip"
1517 usetimestamp="true"/>
1518 <unzip src="${gs2build.home}/bin/windows/perl-for-windows.zip"
1519 dest="${gs2build.home}/bin/windows"/>
1520 <delete file="${gs2build.home}/bin/windows/perl-for-windows.zip"/>
1521 </target>
1522
1523 <target name="install-for-dist" depends="accept-properties,init,configure-mysql,configure,configure-tomcat">
1524 <condition property="need.xml.jars">
1525 <equals arg1="1.5" arg2="${ant.java.version}"/>
1526 </condition>
1527 <antcall target="rename-xml-jars"/>
1528 <antcall target="rename-gs2build-files-windows"/>
1529 </target>
1530</project>
1531
1532
Note: See TracBrowser for help on using the repository browser.