source: trunk/gsdl3/build.xml@ 10799

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

made a property called cvs.root - so can easily change this if necessary

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