1 | <?xml version="1.0"?>
|
---|
2 | <!-- ======================================================================
|
---|
3 | March 2005
|
---|
4 |
|
---|
5 | Greenstone3 build and install script
|
---|
6 |
|
---|
7 | kjdon
|
---|
8 | ====================================================================== -->
|
---|
9 | <project name="greenstone3" default="usage" basedir=".">
|
---|
10 |
|
---|
11 | <!-- ============ classpath =================== -->
|
---|
12 | <path id="project.classpath">
|
---|
13 | <fileset dir="lib/java">
|
---|
14 | <include name="**/*.jar"/>
|
---|
15 | </fileset>
|
---|
16 | </path>
|
---|
17 |
|
---|
18 | <!-- ============ self defined tasks =================== -->
|
---|
19 | <taskdef name="mysetproxy" classname="org.greenstone.anttasks.MySetProxy" classpathref="project.classpath"/>
|
---|
20 | <taskdef name="getuserandpassword" classname="org.greenstone.anttasks.MyGetUserAndPassword" classpathref="project.classpath"/>
|
---|
21 | <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
|
---|
22 | <taskdef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
|
---|
23 | <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
|
---|
24 | <taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/>
|
---|
25 |
|
---|
26 | <!-- ===================== Property Definitions =========================== -->
|
---|
27 |
|
---|
28 | <!--
|
---|
29 |
|
---|
30 | Each of the following properties are used in the build script.
|
---|
31 | Values for these properties are set by the first place they are
|
---|
32 | defined, from the following list:
|
---|
33 |
|
---|
34 | * Definitions on the "ant" command line (ant -Dfoo=bar compile).
|
---|
35 |
|
---|
36 | * Definitions from a "build.properties" file in the top level
|
---|
37 | source directory of this application.
|
---|
38 |
|
---|
39 | * Definitions from a "build.properties" file in the user's
|
---|
40 | home directory.
|
---|
41 |
|
---|
42 | * Default definitions in this build.xml file.
|
---|
43 |
|
---|
44 | You will note below that property values can be composed based on the
|
---|
45 | contents of previously defined properties. This is a powerful technique
|
---|
46 | that helps you minimize the number of changes required when your development
|
---|
47 | environment is modified. Note that property composition is allowed within
|
---|
48 | "build.properties" files as well as in the "build.xml" script.
|
---|
49 |
|
---|
50 | -->
|
---|
51 |
|
---|
52 |
|
---|
53 | <!--the first three properties have to be put on the top to be used by build.properties-->
|
---|
54 | <property name="src.packages.home" value="${basedir}/src/packages"/>
|
---|
55 | <property name="gdbm.home" value="${src.packages.home}/gdbm-1.8.3"/>
|
---|
56 | <property name="flax.svn.root" value="http://svn.greenstone.org/flax"/>
|
---|
57 | <property file="build.properties"/>
|
---|
58 | <property file="${user.home}/build.properties"/>
|
---|
59 |
|
---|
60 | <!-- get properties from the environment -->
|
---|
61 | <property environment="env"/>
|
---|
62 |
|
---|
63 |
|
---|
64 | <!-- version properties for external packages -->
|
---|
65 | <property name="tomcat.version" value="apache-tomcat-5.5.25"/>
|
---|
66 | <property name="axis.zip.version" value="axis-bin-1_2_1.zip"/>
|
---|
67 | <property name="axis.dir.version" value="axis-1_2_1"/>
|
---|
68 | <property name="gdbm.version" value="gdbm-1.8.3"/>
|
---|
69 |
|
---|
70 | <property name="build.home" value="${basedir}/build"/>
|
---|
71 | <property name="src.home" value="${basedir}/src/java"/>
|
---|
72 | <property name="packages.home" value="${basedir}/packages"/>
|
---|
73 | <!-- this may be set in build.properties, eg if you move the web dir to
|
---|
74 | tomcats webapps directory -->
|
---|
75 | <property name="web.home" value="${basedir}/web"/>
|
---|
76 | <!-- jar files needed by applets go here -->
|
---|
77 | <property name="web.applet" value="${web.home}/applet"/>
|
---|
78 | <!-- jar files needed by the servlet (and extra ones) go here -->
|
---|
79 | <property name="web.lib" value="${web.home}/WEB-INF/lib"/>
|
---|
80 | <!-- other files needed by the servlet go here -->
|
---|
81 | <property name="web.classes" value="${web.home}/WEB-INF/classes"/>
|
---|
82 | <!--- flax: the WordNet home -->
|
---|
83 | <property name="wn.home" value="${web.home}/WEB-INF/classes/flax/WordNet"/>
|
---|
84 |
|
---|
85 | <!-- jni libraries and java wrappers go here -->
|
---|
86 | <property name="lib.jni" value="${basedir}/lib/jni"/>
|
---|
87 |
|
---|
88 | <property name="javadocs" value="${basedir}/docs/javadoc"/>
|
---|
89 |
|
---|
90 | <property name="app.name" value="greenstone3"/>
|
---|
91 | <property name="app.path" value="/${app.name}"/>
|
---|
92 |
|
---|
93 |
|
---|
94 | <!-- defaults - set these on the command line or in build.properties or they will take these default values-->
|
---|
95 | <property name="app.version" value="trunk"/>
|
---|
96 | <property name="branch.path" value="trunk"/>
|
---|
97 | <property name="branch.revision" value="HEAD"/>
|
---|
98 |
|
---|
99 | <!--constants -->
|
---|
100 | <property name="svn.root" value="http://svn.greenstone.org"/>
|
---|
101 |
|
---|
102 | <!-- <property name="cvs.root" value=":pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src"/> -->
|
---|
103 | <!-- catalina home is set to tomcat basedir is already installed, otherwise
|
---|
104 | use greenstone's tomcat -->
|
---|
105 | <condition property="catalina.home" value="${tomcat.installed.path}">
|
---|
106 | <and>
|
---|
107 | <isset property="tomcat.installed.path"/>
|
---|
108 | <not>
|
---|
109 | <equals arg1="" arg2="${tomcat.installed.path}"/>
|
---|
110 | </not>
|
---|
111 | </and>
|
---|
112 | </condition>
|
---|
113 | <property name="catalina.home" value="${packages.home}/tomcat"/>
|
---|
114 |
|
---|
115 | <property name="os.linux" value="Linux"/>
|
---|
116 | <property name="os.mac" value="Mac OS X"/>
|
---|
117 | <property name="os.solaris" value="SunOS"/>
|
---|
118 | <property name="os.unix" value="${os.linux},${os.mac},${os.solaris}"/>
|
---|
119 | <property name="os.windows" value="Windows 95,Windows 98,Windows 2000,Windows XP,Windows NT,Windows ME"/> <!-- check this!!!-->
|
---|
120 |
|
---|
121 | <!-- this is true for linux and macs -->
|
---|
122 | <condition property="current.os.isunix">
|
---|
123 | <os family="unix"/>
|
---|
124 | </condition>
|
---|
125 |
|
---|
126 | <condition property="current.os.isunixnotmac">
|
---|
127 | <and>
|
---|
128 | <os family="unix"/>
|
---|
129 | <not>
|
---|
130 | <os family="mac"/>
|
---|
131 | </not>
|
---|
132 | </and>
|
---|
133 | </condition>
|
---|
134 | <condition property="current.os.ismac">
|
---|
135 | <os family="mac"/>
|
---|
136 | </condition>
|
---|
137 |
|
---|
138 | <condition property="current.os.iswindows">
|
---|
139 | <os family="windows"/>
|
---|
140 | </condition>
|
---|
141 |
|
---|
142 | <condition property="collection.building.enabled">
|
---|
143 | <not>
|
---|
144 | <isset property="disable.collection.building"/>
|
---|
145 | </not>
|
---|
146 | </condition>
|
---|
147 |
|
---|
148 | <condition property="collection.building.enabled.windows">
|
---|
149 | <and>
|
---|
150 | <isset property="collection.building.enabled"/>
|
---|
151 | <isset property="current.os.iswindows"/>
|
---|
152 | </and>
|
---|
153 | </condition>
|
---|
154 |
|
---|
155 | <condition property="collection.building.enabled.unix">
|
---|
156 | <and>
|
---|
157 | <isset property="collection.building.enabled"/>
|
---|
158 | <isset property="current.os.isunix"/>
|
---|
159 | </and>
|
---|
160 | </condition>
|
---|
161 |
|
---|
162 | <condition property="independent-indexers">
|
---|
163 | <isset property="disable.collection.building"/>
|
---|
164 | </condition>
|
---|
165 |
|
---|
166 | <!-- where is search4j tool -->
|
---|
167 | <condition property="search4j.exec" value="bin/search4j.exe">
|
---|
168 | <isset property="current.os.iswindows"/>
|
---|
169 | </condition>
|
---|
170 | <property name="search4j.exec" value="bin/search4j"/>
|
---|
171 |
|
---|
172 |
|
---|
173 | <!-- ============= Base dirs for each package and component ============ -->
|
---|
174 | <property name="src.applet.home" value="${src.home}/org/greenstone/applet"/>
|
---|
175 | <property name="src.gsdl3.home" value="${src.home}/org/greenstone/gsdl3"/>
|
---|
176 | <property name="anttasks.home" value="${src.home}/org/greenstone/anttasks"/>
|
---|
177 | <property name="gs2build.home" value="${basedir}/gs2build"/>
|
---|
178 | <property name="gli.home" value="${basedir}/gli"/>
|
---|
179 | <property name="javagdbm.home" value="${src.packages.home}/javagdbm"/>
|
---|
180 |
|
---|
181 | <!--<property name="indexers.home" value="${basedir}/src/packages/indexers">-->
|
---|
182 | <condition property="indexers.home" value="${basedir}/src/packages/indexers">
|
---|
183 | <isset property="disable.collection.building"/>
|
---|
184 | </condition>
|
---|
185 | <condition property="indexers.home" value="${gs2build.home}/indexers">
|
---|
186 | <not>
|
---|
187 | <isset property="disable.collection.building"/>
|
---|
188 | </not>
|
---|
189 | </condition>
|
---|
190 |
|
---|
191 | <property name="mg.home" value="${indexers.home}/mg"/>
|
---|
192 | <property name="mgpp.home" value="${indexers.home}/mgpp"/>
|
---|
193 | <property name="lucene.home" value="${indexers.home}/lucene-gs"/>
|
---|
194 |
|
---|
195 | <!-- ==================== Compilation Control Options ==================== -->
|
---|
196 |
|
---|
197 | <!--
|
---|
198 |
|
---|
199 | These properties control option settings on the Javac compiler when it
|
---|
200 | is invoked using the <javac> task.
|
---|
201 |
|
---|
202 | compile.debug Should compilation include the debug option?
|
---|
203 |
|
---|
204 | compile.deprecation Should compilation include the deprecation option?
|
---|
205 |
|
---|
206 | compile.optimize Should compilation include the optimize option?
|
---|
207 |
|
---|
208 | -->
|
---|
209 |
|
---|
210 | <property name="compile.debug" value="true"/>
|
---|
211 | <property name="compile.deprecation" value="true"/>
|
---|
212 | <property name="compile.optimize" value="true"/>
|
---|
213 |
|
---|
214 | <!--
|
---|
215 |
|
---|
216 | Rather than relying on the CLASSPATH environment variable, Ant includes
|
---|
217 | features that makes it easy to dynamically construct the classpath you
|
---|
218 | need for each compilation. The example below constructs the compile
|
---|
219 | classpath to include the servlet.jar file, as well as the other components
|
---|
220 | that Tomcat makes available to web applications automatically, plus anything
|
---|
221 | that you explicitly added.
|
---|
222 |
|
---|
223 | -->
|
---|
224 |
|
---|
225 | <path id="compile.classpath">
|
---|
226 | <!-- Include all jar files and libraries in our jni lib directory -->
|
---|
227 | <pathelement location="${lib.jni}"/>
|
---|
228 | <fileset dir="${lib.jni}">
|
---|
229 | <include name="*.jar"/>
|
---|
230 | </fileset>
|
---|
231 | <!-- Include all jar files in our web lib directory -->
|
---|
232 | <pathelement location="${web.lib}"/>
|
---|
233 | <fileset dir="${web.lib}">
|
---|
234 | <include name="*.jar"/>
|
---|
235 | </fileset>
|
---|
236 |
|
---|
237 | <!-- Include the axis jar files -->
|
---|
238 | <!--<fileset dir="${basedir}/comms/soap/axis/lib">
|
---|
239 | <include name="*.jar"/>
|
---|
240 | </fileset>-->
|
---|
241 |
|
---|
242 | <!-- include the jar files from the source packages -->
|
---|
243 | <!-- mg and mgpp get installed into lib/jni but they may not be there yet
|
---|
244 | so we add them in by name -->
|
---|
245 | <pathelement location="${lib.jni}/mg.jar"/>
|
---|
246 | <pathelement location="${lib.jni}/mgpp.jar"/>
|
---|
247 |
|
---|
248 | <!-- Include all elements that Tomcat exposes to applications -->
|
---|
249 | <pathelement location="${catalina.home}/common/classes"/>
|
---|
250 | <fileset dir="${catalina.home}/common/endorsed">
|
---|
251 | <include name="*.jar"/>
|
---|
252 | </fileset>
|
---|
253 | <fileset dir="${catalina.home}/common/lib">
|
---|
254 | <include name="*.jar"/>
|
---|
255 | </fileset>
|
---|
256 | <pathelement location="${catalina.home}/shared/classes"/>
|
---|
257 | <fileset dir="${catalina.home}/shared/lib">
|
---|
258 | <include name="*.jar"/>
|
---|
259 | </fileset>
|
---|
260 | </path>
|
---|
261 |
|
---|
262 | <path id="local.tomcat.classpath">
|
---|
263 | <!-- explicitly include the jni java wrappers in the classpath -->
|
---|
264 | <pathelement location="${lib.jni}"/>
|
---|
265 | <fileset dir="${lib.jni}">
|
---|
266 | <include name="*.jar"/>
|
---|
267 | </fileset>
|
---|
268 | </path>
|
---|
269 |
|
---|
270 | <path id="local.tomcat.path">
|
---|
271 | <pathelement location="${basedir}/bin/script"/>
|
---|
272 | <pathelement location="${basedir}/bin"/>
|
---|
273 | <pathelement location="${lib.jni}"/>
|
---|
274 | <pathelement path="${env.PATH}"/>
|
---|
275 | <pathelement path="${env.Path}"/>
|
---|
276 | <pathelement path="${wn.home}/bin"/>
|
---|
277 | </path>
|
---|
278 |
|
---|
279 | <target name="test-setup">
|
---|
280 | <echo>ant java version=${ant.java.version}</echo>
|
---|
281 | <echo>is unix : ${current.os.isunix}</echo>
|
---|
282 | <echo>is mac : ${current.os.ismac}</echo>
|
---|
283 | <echo>is unixnotmac : ${current.os.isunixnotmac}</echo>
|
---|
284 | <echo>is windows : ${current.os.iswindows}</echo>
|
---|
285 | <echo>os.unix: ${os.unix}</echo>
|
---|
286 | </target>
|
---|
287 | <!-- ==================== Primary and Global Targets ============================= -->
|
---|
288 |
|
---|
289 | <!-- add comments about using xxx-core, xxx-packages if only want certain parts?? -->
|
---|
290 |
|
---|
291 | <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections,prepare-gdbm, prepare-flax"
|
---|
292 | description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional subversion checkouts and downloads, so you need to be online to run this.">
|
---|
293 | <!-- <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections"
|
---|
294 | 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.">-->
|
---|
295 |
|
---|
296 | <!-- make sure .sh files are executable -->
|
---|
297 | <chmod dir="${basedir}" perm="ugo+rx"
|
---|
298 | includes="*.sh"/>
|
---|
299 | <chmod dir="${basedir}/bin/script" perm="ugo+rx"
|
---|
300 | includes="*.sh,*.pl"/>
|
---|
301 | </target>
|
---|
302 | <target name="install" depends="init,install-indexer-files,configure,configure-c++,compile"
|
---|
303 | description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare install'."/>
|
---|
304 |
|
---|
305 | <!-- <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web"
|
---|
306 | description="Do a cvs update for all sources. Doesn't recompile the code. You need to be online to run this."/>-->
|
---|
307 | <target name="svnupdate" depends="init,svnupdate-packages,svnupdate-core,svnupdate-gs2building,svnupdate-web"
|
---|
308 | description="Do a `svn update` for all sources. Doesn't recompile the code. You need to be online to run this."/>
|
---|
309 |
|
---|
310 |
|
---|
311 | <target name="configure-c++" depends="init,configure-packages,configure-core,configure-gs2building"
|
---|
312 | description="Configure any C/C+/+ package code and gs2building code if necessary"/>
|
---|
313 |
|
---|
314 | <target name="configure" depends="init,configure-tomcat,configure-web"
|
---|
315 | description="Configure the installation. Includes setting up config files. Should be re-run if you change the build.properties file."/>
|
---|
316 |
|
---|
317 | <target name="clean" depends="init,clean-packages,clean-core,clean-gs2building,clean-gdbm"
|
---|
318 | description="Remove all old compiled code. Includes core, packages and gs2building if necessary"/>
|
---|
319 |
|
---|
320 | <target name="distclean" depends="init,distclean-packages,clean-core,distclean-gs2building,distclean-gdbm"
|
---|
321 | description="Remove all compiled code and also any Makefiles etc generated during configure-c++. Includes core, packages, gs2building as necessary"/>
|
---|
322 |
|
---|
323 | <target name="compile" depends="init,compile-web,compile-packages,compile-core,compile-gs2building"
|
---|
324 | description="Compile all the source code, includes core, packages and gs2building if necessary. Copy jar files and executables to their correct places."/>
|
---|
325 |
|
---|
326 | <target name="update" depends="init,svnupdate,clean,configure,configure-c++,compile"
|
---|
327 | description="Update (thru Subversion) all the source (including core, packages and gs2building), then clean, configure and recompile. To do this without any SVN updates, run it like 'ant -Dnosvn.mode=yes update'"/>
|
---|
328 |
|
---|
329 | <target name="start" depends="init,start-tomcat"
|
---|
330 | description="Startup the Tomcat server." >
|
---|
331 | <echo>${app.name} (${app.version}) server running using Apache Tomcat and Java</echo>
|
---|
332 | <echo>Tomcat: ${catalina.home}</echo>
|
---|
333 | <echo>Java: ${java.home}</echo>
|
---|
334 | <echo>URL: http://${tomcat.server}:${tomcat.port}${app.path}/</echo>
|
---|
335 | <!-- assuming that index.html is not needed here -->
|
---|
336 | </target>
|
---|
337 |
|
---|
338 | <target name="stop" depends="init,stop-tomcat"
|
---|
339 | description="Shutdown the Tomcat server."/>
|
---|
340 |
|
---|
341 | <target name="restart" description="Shutdown and restart Tomcat" depends="init,stop,start"/>
|
---|
342 |
|
---|
343 |
|
---|
344 | <!-- =========== Help targets =================================== -->
|
---|
345 |
|
---|
346 | <property name="install-command" value="ant [options] prepare install"/>
|
---|
347 |
|
---|
348 | <target name="usage" description="Print a help message">
|
---|
349 | <echo message=" Execute 'ant -projecthelp' for a list of targets."/>
|
---|
350 | <echo message=" Execute 'ant -help' for Ant help."/>
|
---|
351 | <echo>To install Greenstone3, run '${install-command}'.
|
---|
352 | There 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.
|
---|
353 | To log the output, use the '-logfile build.log' option.
|
---|
354 | The README.txt file has more information about the ant targets and install process.
|
---|
355 | </echo>
|
---|
356 | </target>
|
---|
357 |
|
---|
358 | <target name="help" depends="usage" description="Print a help message"/>
|
---|
359 |
|
---|
360 | <target name="debug" depends="init" description="Display all the currently used properties">
|
---|
361 | <echoproperties/>
|
---|
362 | </target>
|
---|
363 |
|
---|
364 | <!-- ====== initialization and setup targets ================== -->
|
---|
365 |
|
---|
366 | <target name="accept-properties" unless="properties.accepted">
|
---|
367 | <input addproperty="properties.ok" validargs="y,n">The following properties (among others) are being used from a build.properties file found in this directory:
|
---|
368 | tomcat.server=${tomcat.server}
|
---|
369 | tomcat.port=${tomcat.port}
|
---|
370 | tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed)
|
---|
371 | proxy.host=${proxy.host}
|
---|
372 | proxy.port=${proxy.port}
|
---|
373 | If these are not acceptable, please change them and rerun this target. Continue [y/n]? />
|
---|
374 | </input>
|
---|
375 | <condition property="do.abort">
|
---|
376 | <equals arg1="n" arg2="${properties.ok}"/>
|
---|
377 | </condition>
|
---|
378 | <fail if="do.abort">Build aborted by user. Please change your properties settings and re-run the target</fail>
|
---|
379 | </target>
|
---|
380 |
|
---|
381 |
|
---|
382 | <!-- this sets up some initial properties -->
|
---|
383 | <target name="init">
|
---|
384 |
|
---|
385 | <condition property="java.too.old">
|
---|
386 | <or>
|
---|
387 | <equals arg1="1.1" arg2="${ant.java.version}"/>
|
---|
388 | <equals arg1="1.2" arg2="${ant.java.version}"/>
|
---|
389 | <equals arg1="1.3" arg2="${ant.java.version}"/>
|
---|
390 | </or>
|
---|
391 | </condition>
|
---|
392 | <fail if="java.too.old" message="You need Java 1.4 or greater to run Greenstone 3"/>
|
---|
393 |
|
---|
394 | <available file="${indexers.home}" property="indexers.present"/>
|
---|
395 | <available file="${basedir}/gli" property="gli.present"/>
|
---|
396 | <available file="${basedir}/gs2build" property="gs2build.present"/>
|
---|
397 |
|
---|
398 | <condition property="tomcat.islocal">
|
---|
399 | <or>
|
---|
400 | <not>
|
---|
401 | <isset property="tomcat.installed.path"/>
|
---|
402 | </not>
|
---|
403 | <equals arg1="" arg2="${tomcat.installed.path}"/>
|
---|
404 | </or>
|
---|
405 | </condition>
|
---|
406 |
|
---|
407 | <echo>tomcat.port = ${tomcat.port}</echo>
|
---|
408 | <echo>gli.present = ${gli.present}</echo>
|
---|
409 | <echo>gs2build.present = ${gs2build.present}</echo>
|
---|
410 | <!-- gsdl2.installed.path appears not to be set, so wrap in if block -->
|
---|
411 | <if>
|
---|
412 | <bool><isset property="gsdl2.installed.path"/></bool>
|
---|
413 | <echo>gsdl2.installed.path = ${gsdl2.installed.path}</echo>
|
---|
414 | </if>
|
---|
415 |
|
---|
416 | <condition property="proxy.present">
|
---|
417 | <and>
|
---|
418 | <isset property="proxy.host"/>
|
---|
419 | <not>
|
---|
420 | <equals arg1="" arg2="${proxy.host}"/>
|
---|
421 | </not>
|
---|
422 | </and>
|
---|
423 | </condition>
|
---|
424 |
|
---|
425 | <condition property="need.macos.extra">
|
---|
426 | <and>
|
---|
427 | <isset property="current.os.ismac"/>
|
---|
428 | <not>
|
---|
429 | <isset property="disable.collection.building"/>
|
---|
430 | </not>
|
---|
431 | </and>
|
---|
432 | </condition>
|
---|
433 | </target>
|
---|
434 |
|
---|
435 | <target name="setup-proxy" depends="init" if="proxy.present">
|
---|
436 | <condition property="ask.user">
|
---|
437 | <or>
|
---|
438 | <equals arg1="" arg2="${proxy.user}"/>
|
---|
439 | <equals arg1="" arg2="${proxy.password}"/>
|
---|
440 | </or>
|
---|
441 | </condition>
|
---|
442 | <getuserandpassword message="Using proxy: ${proxy.host}:${proxy.port}" if="ask.user" username="${proxy.user}" userproperty="proxy.username" pwordproperty="proxy.password"/>
|
---|
443 | <mysetproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
|
---|
444 | </target>
|
---|
445 |
|
---|
446 | <!-- ========== Web app Targets ================================ -->
|
---|
447 |
|
---|
448 | <target name="prepare-web" depends="init,configure-java-version">
|
---|
449 | <mkdir dir="${web.home}/applet"/>
|
---|
450 | <mkdir dir="${web.home}/logs"/>
|
---|
451 | </target>
|
---|
452 |
|
---|
453 | <!-- if we are using java 1.5+, we need the xalan.jar file in web/WEB-INF/lib, but if we are using java 1.4, we can't have it there -->
|
---|
454 | <target name="configure-java-version" depends="init"
|
---|
455 | description="Activates or deactivates some jar libraries as needed depending on your java version">
|
---|
456 |
|
---|
457 | <available property="have.xalan.jar" file="${web.lib}/xalan.jar"/>
|
---|
458 | <condition property="need.xalan.jar">
|
---|
459 | <or>
|
---|
460 | <equals arg1="1.5" arg2="${ant.java.version}"/>
|
---|
461 | <equals arg1="1.6" arg2="${ant.java.version}"/>
|
---|
462 | </or>
|
---|
463 | </condition>
|
---|
464 |
|
---|
465 | <!-- if they have xalan.jar but dont need it -->
|
---|
466 | <if>
|
---|
467 | <bool>
|
---|
468 | <and>
|
---|
469 | <isset property="have.xalan.jar"/>
|
---|
470 | <not><isset property="need.xalan.jar"/></not>
|
---|
471 | </and>
|
---|
472 | </bool>
|
---|
473 | <antcall target="deactivate-xalan-jar"/>
|
---|
474 | </if>
|
---|
475 |
|
---|
476 | <!-- if they need xalan.jar but dont have it -->
|
---|
477 | <if>
|
---|
478 | <bool>
|
---|
479 | <and>
|
---|
480 | <not><isset property="have.xalan.jar"/></not>
|
---|
481 | <isset property="need.xalan.jar"/>
|
---|
482 | </and>
|
---|
483 | </bool>
|
---|
484 | <antcall target="activate-xalan-jar"/>
|
---|
485 | </if>
|
---|
486 |
|
---|
487 | </target>
|
---|
488 |
|
---|
489 | <target name="activate-xalan-jar">
|
---|
490 | <echo>activating xalan.jar</echo>
|
---|
491 | <copy file="${web.lib}/xalan.jar.tmp" tofile="${web.lib}/xalan.jar"/>
|
---|
492 | <if><bool><isset property="current.os.ismac"/></bool>
|
---|
493 | <copy file="${web.lib}/xalan.jar.tmp" tofile="${catalina.home}/common/endorsed/xalan.jar"/>
|
---|
494 | </if>
|
---|
495 | </target>
|
---|
496 |
|
---|
497 | <!-- to delete -->
|
---|
498 | <target name="copy-xalan-for-mac"></target>
|
---|
499 |
|
---|
500 | <target name="deactivate-xalan-jar">
|
---|
501 | <echo>deactivating xalan.jar</echo>
|
---|
502 | <delete file="${web.lib}/xalan.jar"/>
|
---|
503 | </target>
|
---|
504 |
|
---|
505 |
|
---|
506 | <target name="prepare-collections" depends="init">
|
---|
507 | <property name="collect.dir" value="${web.home}/sites/localsite/collect"/>
|
---|
508 | <property name="import.zip" value="import.zip"/>
|
---|
509 | <property name="metadata.zip" value="metadata.zip"/>
|
---|
510 | <property name="index.zip" value="index/index.zip"/>
|
---|
511 |
|
---|
512 | <echo message="installing collections..."/>
|
---|
513 | <antcall target="gs2mgdemo-install"/>
|
---|
514 | <antcall target="gs2mgppdemo-install"/>
|
---|
515 | <antcall target="gberg-install"/>
|
---|
516 |
|
---|
517 | </target>
|
---|
518 |
|
---|
519 | <target name="gs2mgdemo-prepare" if="collect.dir">
|
---|
520 | <property name="gs2mgdemo.dir" value="${collect.dir}/gs2mgdemo"/>
|
---|
521 |
|
---|
522 | <fileset id="gs2mgdemofiles" dir="${gs2mgdemo.dir}">
|
---|
523 | <include name="${import.zip}"/>
|
---|
524 | <include name="${metadata.zip}"/>
|
---|
525 | <include name="${index.zip}"/>
|
---|
526 | </fileset>
|
---|
527 |
|
---|
528 | <condition property="gs2mgdemo.present">
|
---|
529 | <and>
|
---|
530 | <available file="${gs2mgdemo.dir}/${import.zip}"/>
|
---|
531 | <available file="${gs2mgdemo.dir}/${metadata.zip}"/>
|
---|
532 | <available file="${gs2mgdemo.dir}/${index.zip}"/>
|
---|
533 | </and>
|
---|
534 | </condition>
|
---|
535 | </target>
|
---|
536 |
|
---|
537 | <target name="gs2mgdemo-install" if="gs2mgdemo.present" depends="gs2mgdemo-prepare">
|
---|
538 | <echo> installing gs2mgdemo</echo>
|
---|
539 | <unzip dest="${gs2mgdemo.dir}" src="${gs2mgdemo.dir}/${import.zip}" />
|
---|
540 | <unzip dest="${gs2mgdemo.dir}" src="${gs2mgdemo.dir}/${metadata.zip}" />
|
---|
541 | <unzip dest="${gs2mgdemo.dir}/index" src="${gs2mgdemo.dir}/${index.zip}" />
|
---|
542 | <!--Don't delete the zips, else doing an svn update will get them all over again.-->
|
---|
543 | <!--<delete><fileset refid="gs2mgdemofiles"/></delete>-->
|
---|
544 | <echo>collection gs2mgdemo installed</echo>
|
---|
545 | </target>
|
---|
546 |
|
---|
547 | <target name="gs2mgppdemo-prepare" if="collect.dir">
|
---|
548 | <property name="gs2mgppdemo.dir" value="${collect.dir}/gs2mgppdemo"/>
|
---|
549 |
|
---|
550 | <fileset id="gs2mgppdemofiles" dir="${gs2mgppdemo.dir}">
|
---|
551 | <include name="${import.zip}"/>
|
---|
552 | <include name="${metadata.zip}"/>
|
---|
553 | <include name="${index.zip}"/>
|
---|
554 | </fileset>
|
---|
555 |
|
---|
556 | <condition property="gs2mgppdemo.present">
|
---|
557 | <and>
|
---|
558 | <available file="${gs2mgppdemo.dir}/${import.zip}"/>
|
---|
559 | <available file="${gs2mgppdemo.dir}/${metadata.zip}"/>
|
---|
560 | <available file="${gs2mgppdemo.dir}/${index.zip}"/>
|
---|
561 | </and>
|
---|
562 | </condition>
|
---|
563 | </target>
|
---|
564 |
|
---|
565 | <target name="gs2mgppdemo-install" if="gs2mgppdemo.present" depends="gs2mgppdemo-prepare">
|
---|
566 | <unzip dest="${gs2mgppdemo.dir}" src="${gs2mgppdemo.dir}/${import.zip}" />
|
---|
567 | <unzip dest="${gs2mgppdemo.dir}" src="${gs2mgppdemo.dir}/${metadata.zip}" />
|
---|
568 | <unzip dest="${gs2mgppdemo.dir}/index" src="${gs2mgppdemo.dir}/${index.zip}" />
|
---|
569 | <!--<delete><fileset refid="gs2mgppdemofiles"/></delete>-->
|
---|
570 | <echo>collection gs2mgppdemo installed</echo>
|
---|
571 | </target>
|
---|
572 |
|
---|
573 | <target name="gberg-prepare" if="collect.dir">
|
---|
574 | <property name="gberg.dir" value="${collect.dir}/gberg"/>
|
---|
575 |
|
---|
576 | <fileset id="gbergfiles" dir="${gberg.dir}">
|
---|
577 | <include name="${index.zip}"/>
|
---|
578 | </fileset>
|
---|
579 | <available file="${gberg.dir}/${index.zip}" property="gberg.present"/>
|
---|
580 | </target>
|
---|
581 |
|
---|
582 | <target name="gberg-install" if="gberg.present" depends="gberg-prepare">
|
---|
583 | <unzip dest="${gberg.dir}/index">
|
---|
584 | <fileset refid="gbergfiles"/>
|
---|
585 | </unzip>
|
---|
586 | <!--<delete><fileset refid="gbergfiles"/></delete>-->
|
---|
587 | <echo>collection gberg installed</echo>
|
---|
588 | </target>
|
---|
589 |
|
---|
590 |
|
---|
591 |
|
---|
592 | <!--
|
---|
593 | <target name="prepare-collections" depends="init">
|
---|
594 | <property name="collect.dir" value="${web.home}/sites/localsite/collect"/>
|
---|
595 |
|
---|
596 | <unzip src="${collect.dir}/gs2mgdemo/import.zip"
|
---|
597 | dest="${collect.dir}/gs2mgdemo"/>
|
---|
598 | <unzip src="${collect.dir}/gs2mgdemo/metadata.zip"
|
---|
599 | dest="${collect.dir}/gs2mgdemo"/>
|
---|
600 | <unzip src="${collect.dir}/gs2mgdemo/index/index.zip"
|
---|
601 | dest="${collect.dir}/gs2mgdemo/index"/>
|
---|
602 | <delete file="${collect.dir}/gs2mgdemo/import.zip"/>
|
---|
603 | <delete file="${collect.dir}/gs2mgdemo/metadata.zip"/>
|
---|
604 | <delete file="${collect.dir}/gs2mgdemo/index/index.zip"/>
|
---|
605 |
|
---|
606 | <unzip src="${collect.dir}/gs2mgppdemo/import.zip"
|
---|
607 | dest="${collect.dir}/gs2mgppdemo"/>
|
---|
608 | <unzip src="${collect.dir}/gs2mgppdemo/metadata.zip"
|
---|
609 | dest="${collect.dir}/gs2mgppdemo"/>
|
---|
610 | <unzip src="${collect.dir}/gs2mgppdemo/index/index.zip"
|
---|
611 | dest="${collect.dir}/gs2mgppdemo/index"/>
|
---|
612 | <delete file="${collect.dir}/gs2mgppdemo/import.zip"/>
|
---|
613 | <delete file="${collect.dir}/gs2mgppdemo/metadata.zip"/>
|
---|
614 | <delete file="${collect.dir}/gs2mgppdemo/index/index.zip"/>
|
---|
615 |
|
---|
616 | <unzip src="${collect.dir}/gberg/index/index.zip"
|
---|
617 | dest="${collect.dir}/gberg/index"/>
|
---|
618 | <delete file="${collect.dir}/gberg/index/index.zip"/>
|
---|
619 | </target>
|
---|
620 | -->
|
---|
621 |
|
---|
622 |
|
---|
623 |
|
---|
624 | <target name="configure-web" depends="init"
|
---|
625 | description="Configure only the web app config files">
|
---|
626 | <!-- we want a unix path in the global.properties file -->
|
---|
627 | <pathconvert targetos="unix" property="src.gsdl3.home.unix">
|
---|
628 | <path path="${web.home}"/>
|
---|
629 | </pathconvert>
|
---|
630 | <filter token="gsdl3home" value="${src.gsdl3.home.unix}"/>
|
---|
631 | <filter token="gsdl3version" value="${app.version}"/>
|
---|
632 | <filter token="tomcat.server" value="${tomcat.server}"/>
|
---|
633 | <filter token="tomcat.port" value="${tomcat.port}"/>
|
---|
634 | <copy file="${basedir}/resources/java/global.properties.in" tofile="${web.classes}/global.properties" filtering="true" overwrite="true"/>
|
---|
635 | <copy file="${basedir}/resources/java/log4j.properties.in" tofile="${web.classes}/log4j.properties" filtering="true" overwrite="true"/>
|
---|
636 | <chmod file="${web.classes}/global.properties" perm="600"/>
|
---|
637 | <chmod file="${web.classes}/log4j.properties" perm="600"/>
|
---|
638 | </target>
|
---|
639 |
|
---|
640 | <target name="compile-web" depends="init">
|
---|
641 | <javac srcdir="${web.classes}"
|
---|
642 | destdir="${web.classes}"
|
---|
643 | debug="${compile.debug}"
|
---|
644 | deprecation="${compile.deprecation}"
|
---|
645 | optimize="${compile.optimize}">
|
---|
646 | <classpath>
|
---|
647 | <path refid="compile.classpath"/>
|
---|
648 | </classpath>
|
---|
649 | </javac>
|
---|
650 | </target>
|
---|
651 |
|
---|
652 | <target name="svnupdate-web" unless="nosvn.mode">
|
---|
653 | <svn>
|
---|
654 | <update dir="${web.home}" revision="${branch.revision}"/>
|
---|
655 | </svn>
|
---|
656 | </target>
|
---|
657 |
|
---|
658 | <target name="update-web" depends="init,svnupdate-web,configure-web"
|
---|
659 | description="update only the web stuff (config files)"/>
|
---|
660 |
|
---|
661 |
|
---|
662 | <!-- ======================= Tomcat Targets ========================== -->
|
---|
663 |
|
---|
664 | <!-- this target downloads and installs Tomcat -->
|
---|
665 | <!-- we download tomcat and the compat module - its needed for 1.4, and doesn't seem to harm 1.5 -->
|
---|
666 | <target name="prepare-tomcat" depends="init,setup-proxy" if="tomcat.islocal">
|
---|
667 |
|
---|
668 | <!-- check that packages dir is there -->
|
---|
669 | <mkdir dir="${packages.home}"/>
|
---|
670 | <get src="http://www.greenstone.org/gs3files/${tomcat.version}.zip"
|
---|
671 | dest="${packages.home}/${tomcat.version}.zip"
|
---|
672 | usetimestamp="true"/>
|
---|
673 | <unzip src="${packages.home}/${tomcat.version}.zip"
|
---|
674 | dest="${packages.home}"/>
|
---|
675 | <get src="http://www.greenstone.org/gs3files/${tomcat.version}-compat.zip"
|
---|
676 | dest="${packages.home}/${tomcat.version}-compat.zip"
|
---|
677 | usetimestamp="true"/>
|
---|
678 | <unzip src="${packages.home}/${tomcat.version}-compat.zip"
|
---|
679 | dest="${packages.home}"/>
|
---|
680 | <!-- delete any existing tomcat -->
|
---|
681 | <delete dir="${packages.home}/tomcat"/>
|
---|
682 | <move todir="${packages.home}/tomcat">
|
---|
683 | <fileset dir="${packages.home}/${tomcat.version}"/>
|
---|
684 | </move>
|
---|
685 | <copy file="${basedir}/resources/tomcat/setclasspath.bat"
|
---|
686 | tofile="${packages.home}/tomcat/bin/setclasspath.bat"
|
---|
687 | overwrite="true"/>
|
---|
688 | <copy file="${basedir}/resources/tomcat/setclasspath.sh"
|
---|
689 | tofile="${packages.home}/tomcat/bin/setclasspath.sh"
|
---|
690 | overwrite="true"/>
|
---|
691 | <!-- make sure we have execute permission for the .sh files -->
|
---|
692 | <chmod dir="${packages.home}/tomcat/bin" perm="ugo+rx"
|
---|
693 | includes="*.sh"/>
|
---|
694 | </target>
|
---|
695 |
|
---|
696 | <target name="configure-tomcat" depends="init,configure-tomcat-local,configure-tomcat-external"/>
|
---|
697 |
|
---|
698 | <target name="configure-tomcat-local" depends="init" if="tomcat.islocal">
|
---|
699 | <!-- re-setup the server.xml file -->
|
---|
700 | <copy file="${basedir}/resources/tomcat/server.xml" tofile="${packages.home}/tomcat/conf/server.xml" overwrite="true">
|
---|
701 | <filterset>
|
---|
702 | <filter token="port" value="${tomcat.port}"/>
|
---|
703 | <filter token="shutdown-port" value="${tomcat.shutdown.port}"/>
|
---|
704 | </filterset>
|
---|
705 | </copy>
|
---|
706 | <!-- set up the greenstone3 context -->
|
---|
707 | <copy file="${basedir}/resources/tomcat/greenstone3.xml" tofile="${packages.home}/tomcat/conf/Catalina/localhost/greenstone3.xml" overwrite="true">
|
---|
708 | <filterset>
|
---|
709 | <filter token="gsdl3webhome" value="${web.home}"/>
|
---|
710 | </filterset>
|
---|
711 | </copy>
|
---|
712 | </target>
|
---|
713 |
|
---|
714 | <target name="configure-tomcat-external" depends="init" unless="tomcat.islocal">
|
---|
715 | <!-- re-setup the server.xml file -->
|
---|
716 | <!-- need to edit the config file, or do we get the user to do this???-->
|
---|
717 | </target>
|
---|
718 |
|
---|
719 | <target name="start-tomcat" description="Startup only Tomcat" depends="init,configure-java-version" if="tomcat.islocal">
|
---|
720 | <property name="tomcat.classpath" refid="local.tomcat.classpath"/>
|
---|
721 | <property name="tomcat.path" refid="local.tomcat.path"/>
|
---|
722 | <property name="catalina.opts" value="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx400M"/>
|
---|
723 | <exec executable="${catalina.home}/bin/startup.sh" os="${os.unix}" dir="${catalina.home}/bin" spawn="false">
|
---|
724 | <!--<env key="GSDLOS" value="linux"/> do we need this?? -->
|
---|
725 | <env key="GSDL3HOME" value="${basedir}"/>
|
---|
726 | <env key="PATH" path="${tomcat.path}"/>
|
---|
727 | <env key="CATALINA_OPTS" value="${catalina.opts}"/>
|
---|
728 | <env key="CATALINA_HOME" value="${catalina.home}"/>
|
---|
729 | <env key="CLASSPATH" path="${tomcat.classpath}"/>
|
---|
730 | <env key="LD_LIBRARY_PATH" path="${env.LD_LIBRARY_PATH}:${lib.jni}"/>
|
---|
731 | <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${lib.jni}:${gdbm.installed.path}/lib"/> <!-- for mac os -->
|
---|
732 | <env key="WNHOME" path="${wn.home}"/>
|
---|
733 | </exec>
|
---|
734 | <exec executable="${catalina.home}/bin/startup.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="true">
|
---|
735 | <env key="GSDLOS" value="windows"/>
|
---|
736 | <env key="GSDL3HOME" value="${basedir}"/>
|
---|
737 | <env key="Path" path="${tomcat.path}"/>
|
---|
738 | <env key="PATH" path="${tomcat.path}"/>
|
---|
739 | <env key="CATALINA_OPTS" value="${catalina.opts}"/>
|
---|
740 | <env key="CLASSPATH" path="${tomcat.classpath}"/>
|
---|
741 | </exec>
|
---|
742 | <!-- wait for the server to startup in case other targets need it running -->
|
---|
743 | <waitfor maxwait="5" maxwaitunit="second">
|
---|
744 | <and>
|
---|
745 | <socket server="${tomcat.server}" port="${tomcat.port}"/>
|
---|
746 | <http url="http://${tomcat.server}:${tomcat.port}${app.path}/index.html"/>
|
---|
747 | </and>
|
---|
748 | </waitfor>
|
---|
749 | </target>
|
---|
750 |
|
---|
751 | <!-- windows: do we want to launch a webrowser?? -->
|
---|
752 | <!-- shouldn't this test whether anything is running first? -->
|
---|
753 | <target name="stop-tomcat" description="Shutdown only Tomcat" depends="init" if="tomcat.islocal">
|
---|
754 | <exec executable="${catalina.home}/bin/shutdown.sh" os="${os.unix}" dir="${catalina.home}/bin" spawn="false">
|
---|
755 | <env key="CATALINA_HOME" value="${catalina.home}"/>
|
---|
756 | </exec>
|
---|
757 | <exec executable="${catalina.home}/bin/shutdown.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="false"/>
|
---|
758 | </target>
|
---|
759 |
|
---|
760 | <target name="restart-tomcat" description="Shutdown and restart only Tomcat" depends="init,stop-tomcat,start-tomcat"/>
|
---|
761 |
|
---|
762 | <target name="setup-catalina-ant-tasks">
|
---|
763 | <!-- Configure the custom Ant tasks for the Tomcat Manager application -->
|
---|
764 | <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"
|
---|
765 | classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
|
---|
766 | <taskdef name="list" classname="org.apache.catalina.ant.ListTask"
|
---|
767 | classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
|
---|
768 | <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"
|
---|
769 | classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
|
---|
770 | <taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"
|
---|
771 | classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
|
---|
772 | <taskdef name="roles" classname="org.apache.catalina.ant.RolesTask"
|
---|
773 | classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
|
---|
774 | <taskdef name="start" classname="org.apache.catalina.ant.StartTask"
|
---|
775 | classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
|
---|
776 | <taskdef name="stop" classname="org.apache.catalina.ant.StopTask"
|
---|
777 | classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
|
---|
778 | <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"
|
---|
779 | classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
|
---|
780 | </target>
|
---|
781 |
|
---|
782 |
|
---|
783 |
|
---|
784 |
|
---|
785 |
|
---|
786 |
|
---|
787 | <!-- ======================= ant Targets ============================ -->
|
---|
788 | <target name="prepare-ant" depends="init">
|
---|
789 | <get src="http://www.greenstone.org/gs3files/apache-ant-1.7.0-bin.zip"
|
---|
790 | dest="${packages.home}/apache-ant-1.7.0-bin.zip"
|
---|
791 | usetimestamp="true"/>
|
---|
792 | <unzip src="${packages.home}/apache-ant-1.7.0-bin.zip"
|
---|
793 | dest="${packages.home}"/>
|
---|
794 | <move todir="${packages.home}/ant">
|
---|
795 | <fileset dir="${packages.home}/apache-ant-1.7.0"/>
|
---|
796 | </move>
|
---|
797 | </target>
|
---|
798 |
|
---|
799 | <!-- ======================= Axis Targets ============================ -->
|
---|
800 |
|
---|
801 | <target name="prepare-axis" depends="init">
|
---|
802 | <get src="http://www.greenstone.org/gs3files/${axis.zip.version}"
|
---|
803 | dest="${packages.home}/${axis.zip.version}"
|
---|
804 | usetimestamp="true"/>
|
---|
805 | <unzip src="${packages.home}/${axis.zip.version}"
|
---|
806 | dest="${packages.home}"/>
|
---|
807 | <move todir="${packages.home}/axis">
|
---|
808 | <fileset dir="${packages.home}/${axis.dir.version}"/>
|
---|
809 | </move>
|
---|
810 | <!-- install axis into greenstone web app -->
|
---|
811 | <copy todir="${web.lib}">
|
---|
812 | <fileset dir="${packages.home}/axis/webapps/axis/WEB-INF/lib">
|
---|
813 | <include name="*.jar"/>
|
---|
814 | </fileset>
|
---|
815 | </copy>
|
---|
816 | <copy todir="${web.home}">
|
---|
817 | <fileset dir="${packages.home}/axis/webapps/axis/">
|
---|
818 | <include name="*.jsp"/>
|
---|
819 | <include name="*.jws"/>
|
---|
820 | </fileset>
|
---|
821 | </copy>
|
---|
822 | <copy tofile="${web.home}/axis.html" file="${packages.home}/axis/webapps/axis/index.html"/>
|
---|
823 | <copy todir="${web.classes}">
|
---|
824 | <fileset dir="${packages.home}/axis/webapps/axis/WEB-INF/classes">
|
---|
825 | <include name="*.properties"/>
|
---|
826 | </fileset>
|
---|
827 | </copy>
|
---|
828 | </target>
|
---|
829 |
|
---|
830 | <target name="soap-deploy-site" depends="init,get-sitename,get-siteuri,get-webservices,create-deployment-files,deploy-site"
|
---|
831 | description="Deploy a SOAP web service for a local Greenstone site. Tomcat must be running for this to work."/>
|
---|
832 |
|
---|
833 | <target name="deploy-site">
|
---|
834 | <java classname="org.apache.axis.client.AdminClient">
|
---|
835 | <classpath refid="compile.classpath"/>
|
---|
836 | <arg value="-l"/>
|
---|
837 | <arg value="http://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/>
|
---|
838 | <arg file="${basedir}/resources/soap/deploy.wsdd"/>
|
---|
839 | </java>
|
---|
840 | <delete file="${basedir}/resources/soap/deploy.wsdd"/> <!--clean up, no longer used-->
|
---|
841 | </target>
|
---|
842 |
|
---|
843 | <target name="soap-undeploy-site" depends="get-undeploy-service-name"
|
---|
844 | description="Undeploy a SOAP web service for a local Greenstone site. Tomcat must be running for this to work.">
|
---|
845 | <filter token="servicesname" value="${axis.undeploy.servicename}"/>
|
---|
846 | <copy file="${basedir}/resources/soap/undeploy-site.wsdd.template"
|
---|
847 | tofile="${basedir}/resources/soap/undeploy.wsdd"
|
---|
848 | filtering="true"
|
---|
849 | overwrite="true"/>
|
---|
850 | <java classname="org.apache.axis.client.AdminClient">
|
---|
851 | <classpath refid="compile.classpath"/>
|
---|
852 | <arg value="-l"/>
|
---|
853 | <arg value="http://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/>
|
---|
854 | <arg file="${basedir}/resources/soap/undeploy.wsdd"/>
|
---|
855 | </java>
|
---|
856 | <delete file="${basedir}/resources/soap/undeploy.wsdd"/> <!--clean up, no longer used-->
|
---|
857 | </target>
|
---|
858 |
|
---|
859 | <!-- this target used to deploy the default web service SOAPServer (base.webservice.name) on the localsite server
|
---|
860 | with the default servicename of localsite-->
|
---|
861 | <target name="deploy-localsite" depends="init"
|
---|
862 | description="Deploy the SOAP server for localsite. Will start and stop Tomcat.">
|
---|
863 | <antcall target="start-tomcat"/>
|
---|
864 | <echo>Deploying ${base.webservice.name} web services for localsite under service name: localsite</echo>
|
---|
865 | <antcall target="create-deployment-files">
|
---|
866 | <param name="axis.sitename" value="localsite"/>
|
---|
867 | <param name="axis.servicesname" value="${base.webservice.name}"/>
|
---|
868 | <param name="axis.siteuri" value="localsite"/>
|
---|
869 | </antcall>
|
---|
870 | <antcall target="deploy-site">
|
---|
871 | <param name="axis.sitename" value="localsite"/>
|
---|
872 | <param name="axis.servicesname" value="${base.webservice.name}"/>
|
---|
873 | <param name="axis.siteuri" value="localsite"/>
|
---|
874 | </antcall>
|
---|
875 | <echo>The Greenstone server has been started up. If you do not want it running, please type: ant stop.</echo>
|
---|
876 | </target>
|
---|
877 |
|
---|
878 | <target name="get-sitename" unless="axis.sitename">
|
---|
879 | <input addproperty="axis.sitename" defaultvalue="localsite">What site do you want to deploy services for?
|
---|
880 | Press Enter for default:localsite</input>
|
---|
881 | </target>
|
---|
882 |
|
---|
883 | <target name="get-undeploy-service-name" unless="axis.undeploy.servicename">
|
---|
884 | <input addproperty="axis.undeploy.servicename" defaultvalue="localsite">Please enter the full name of the service you wish to undeploy.
|
---|
885 | To find out which web services you've got deployed, point your browser to http://HOST:PORT/greenstone3/services
|
---|
886 | Or press Enter for undeploying the default:localsite /></input>
|
---|
887 | <echo>Name of service to undeploy: ${axis.undeploy.servicename}</echo>
|
---|
888 | </target>
|
---|
889 |
|
---|
890 | <target name="get-webservices" unless="axis.servicesname">
|
---|
891 | <input addproperty="axis.servicesname" defaultvalue="${base.webservice.name}">Which set of web services do you want to deploy?
|
---|
892 | Choose from: ${web.services.list}
|
---|
893 | Or press Enter for default:${base.webservice.name} /></input>
|
---|
894 | <echo>${axis.servicesname}</echo>
|
---|
895 | </target>
|
---|
896 |
|
---|
897 | <target name="get-siteuri" depends="get-sitename,get-webservices" unless="axis.siteuri">
|
---|
898 | <input addproperty="axis.siteuri" defaultvalue="${axis.servicesname}${axis.sitename}">What name do you want the service to have? (Press Enter for default:${axis.servicesname}${axis.sitename})</input>
|
---|
899 | <echo>Site: ${axis.sitename}, services: ${axis.servicesname}, servicesname: ${axis.siteuri}</echo>
|
---|
900 | </target>
|
---|
901 |
|
---|
902 | <target name="set-soapmethod" description="Determines whether the service in the wsdd should have the style attribute set to message or the provider attribute set to java:RPC" if="axis.servicesname">
|
---|
903 | <condition property="soap.method" value="provider='java:MSG' style='message' use='literal'">
|
---|
904 | <equals arg1="${axis.servicesname}" arg2="${base.webservice.name}"/>
|
---|
905 | </condition>
|
---|
906 |
|
---|
907 | <!--everything else defaults to java:RPC at present-->
|
---|
908 | <condition property="soap.method" value="provider='java:RPC'">
|
---|
909 | <not>
|
---|
910 | <equals arg1="${axis.servicesname}" arg2="${base.webservice.name}"/>
|
---|
911 | </not>
|
---|
912 | </condition>
|
---|
913 | </target>
|
---|
914 |
|
---|
915 | <target name="create-deployment-files" depends="set-soapmethod" if="axis.sitename">
|
---|
916 | <filter token="sitename" value="${axis.sitename}"/>
|
---|
917 | <filter token="siteuri" value="${axis.siteuri}"/>
|
---|
918 | <filter token="servicesname" value="${axis.servicesname}"/>
|
---|
919 | <filter token="soapmethod" value="${soap.method}"/>
|
---|
920 | <copy file="${basedir}/resources/soap/site.wsdd.template"
|
---|
921 | tofile="${basedir}/resources/soap/deploy.wsdd"
|
---|
922 | filtering="true"
|
---|
923 | overwrite="true"/>
|
---|
924 | <!-- create the java files and compile them -->
|
---|
925 | <copy file="${basedir}/resources/java/${axis.servicesname}.java.in"
|
---|
926 | tofile="${src.gsdl3.home}/${axis.servicesname}${axis.sitename}.java"
|
---|
927 | filtering="true"
|
---|
928 | overwrite="true"/>
|
---|
929 | <mkdir dir="${build.home}"/>
|
---|
930 | <javac srcdir="${src.home}"
|
---|
931 | destdir="${build.home}"
|
---|
932 | debug="${compile.debug}"
|
---|
933 | deprecation="${compile.deprecation}"
|
---|
934 | optimize="${compile.optimize}">
|
---|
935 | <classpath refid="compile.classpath"/>
|
---|
936 | <include name="org/greenstone/gsdl3/${axis.servicesname}${axis.sitename}.java" />
|
---|
937 | </javac>
|
---|
938 | <mkdir dir="${web.classes}/org/greenstone/gsdl3"/>
|
---|
939 | <copy file="${build.home}/org/greenstone/gsdl3/${axis.servicesname}${axis.sitename}.class"
|
---|
940 | tofile="${web.classes}/org/greenstone/gsdl3/${axis.servicesname}${axis.sitename}.class"
|
---|
941 | overwrite="true" />
|
---|
942 | </target>
|
---|
943 |
|
---|
944 |
|
---|
945 | <!-- ====================== Core targets ============================== -->
|
---|
946 | <!-- core targets refer to the core gsdl3 java src -->
|
---|
947 |
|
---|
948 | <target name="prepare-core" unless="nosvn.mode">
|
---|
949 | <!-- just get rid of empty directories-->
|
---|
950 | <svn>
|
---|
951 | <update dir="." revision="${branch.revision}"/>
|
---|
952 | </svn>
|
---|
953 | </target>
|
---|
954 |
|
---|
955 | <target name="configure-core"/>
|
---|
956 |
|
---|
957 | <target name="update-core" depends="init,svnupdate-core,clean-core,compile-core"
|
---|
958 | description="Update only the Greenstone core" />
|
---|
959 |
|
---|
960 | <target name="svnupdate-core" unless="nosvn.mode">
|
---|
961 |
|
---|
962 | <svn>
|
---|
963 | <update dir="." recurse="false" revision="${branch.revision}"/>
|
---|
964 | </svn>
|
---|
965 |
|
---|
966 | <svn>
|
---|
967 | <update dir="bin" revision="${branch.revision}"/>
|
---|
968 | <update dir="comms" revision="${branch.revision}"/>
|
---|
969 | <update dir="dist-resources" revision="${branch.revision}"/>
|
---|
970 | <update dir="docs" revision="${branch.revision}"/>
|
---|
971 | <update dir="lib" revision="${branch.revision}"/>
|
---|
972 | <update dir="resources" revision="${branch.revision}"/>
|
---|
973 | <update dir="src" revision="${branch.revision}"/>
|
---|
974 | <update dir="winutil" revision="${branch.revision}"/>
|
---|
975 | </svn>
|
---|
976 |
|
---|
977 | </target>
|
---|
978 |
|
---|
979 | <target name="clean-core"
|
---|
980 | description="Clean only the Greenstone core">
|
---|
981 | <delete dir="${build.home}"/>
|
---|
982 | </target>
|
---|
983 |
|
---|
984 | <target name="compile-core" depends="init"
|
---|
985 | description="Compile only the Greenstone core">
|
---|
986 | <mkdir dir="${build.home}"/>
|
---|
987 | <javac srcdir="${src.home}"
|
---|
988 | destdir="${build.home}"
|
---|
989 | debug="${compile.debug}"
|
---|
990 | deprecation="${compile.deprecation}"
|
---|
991 | optimize="${compile.optimize}">
|
---|
992 | <classpath>
|
---|
993 | <path refid="compile.classpath"/>
|
---|
994 | </classpath>
|
---|
995 | </javac>
|
---|
996 | <jar destfile="${build.home}/gsdl3.jar">
|
---|
997 | <fileset dir="${build.home}">
|
---|
998 | <include name="org/greenstone/gsdl3/**"/>
|
---|
999 | <include name="org/flax/**"/>
|
---|
1000 | <exclude name="**/Test.class"/>
|
---|
1001 | </fileset>
|
---|
1002 | <manifest>
|
---|
1003 | <attribute name="Built-By" value="${user.name}" />
|
---|
1004 | </manifest>
|
---|
1005 | </jar>
|
---|
1006 | <copy file="${build.home}/gsdl3.jar" todir="${web.lib}"/>
|
---|
1007 | <!-- copy the localsite server in case we need it -->
|
---|
1008 | <copy file="${build.home}/org/greenstone/gsdl3/${base.webservice.name}localsite.class" tofile="${web.classes}/org/greenstone/gsdl3/${base.webservice.name}localsite.class" />
|
---|
1009 |
|
---|
1010 | <jar destfile="${build.home}/GAI.jar">
|
---|
1011 | <fileset dir="${build.home}">
|
---|
1012 | <include name="org/greenstone/admin/**"/>
|
---|
1013 | </fileset>
|
---|
1014 | <manifest>
|
---|
1015 | <attribute name="Built-By" value="${user.name}" />
|
---|
1016 | </manifest>
|
---|
1017 | </jar>
|
---|
1018 |
|
---|
1019 | <jar destfile="${build.home}/phind.jar">
|
---|
1020 | <fileset dir="${build.home}">
|
---|
1021 | <include name="org/greenstone/applet/phind/**"/>
|
---|
1022 | </fileset>
|
---|
1023 | <manifest>
|
---|
1024 | <attribute name="Built-By" value="${user.name}" />
|
---|
1025 | </manifest>
|
---|
1026 | </jar>
|
---|
1027 | <mkdir dir="${web.applet}"/>
|
---|
1028 | <copy file="${build.home}/phind.jar" todir="${web.applet}"/>
|
---|
1029 | <!-- phind also needs xercesImpl.jar and xml-apis.jar to be in web/applet -->
|
---|
1030 | <copy file="${packages.home}/tomcat/common/endorsed/xercesImpl.jar" todir="${web.applet}"/>
|
---|
1031 | <copy file="${packages.home}/tomcat/common/endorsed/xml-apis.jar" todir="${web.applet}"/>
|
---|
1032 | <jar destfile="${build.home}/anttasks.jar">
|
---|
1033 | <fileset dir="${build.home}">
|
---|
1034 | <include name="org/greenstone/anttasks/**"/>
|
---|
1035 | </fileset>
|
---|
1036 | <manifest>
|
---|
1037 | <attribute name="Built-By" value="${user.name}" />
|
---|
1038 | </manifest>
|
---|
1039 | </jar>
|
---|
1040 | <copy file="${build.home}/anttasks.jar" todir="${basedir}/lib/java"/>
|
---|
1041 | <jar destfile="${build.home}/gsdl3test.jar">
|
---|
1042 | <fileset dir="${build.home}">
|
---|
1043 | <include name="org/greenstone/gsdl3/**/*Test.class"/>
|
---|
1044 | <include name="org/greenstone/testing/**"/>
|
---|
1045 | </fileset>
|
---|
1046 | <manifest>
|
---|
1047 | <attribute name="Built-By" value="${user.name}" />
|
---|
1048 | </manifest>
|
---|
1049 | </jar>
|
---|
1050 | <jar destfile="${build.home}/server.jar">
|
---|
1051 | <fileset dir="${build.home}">
|
---|
1052 | <include name="org/greenstone/server/**"/>
|
---|
1053 | </fileset>
|
---|
1054 | <fileset file="${basedir}/resources/java/server.properties"/>
|
---|
1055 | <manifest>
|
---|
1056 | <attribute name="Built-By" value="${user.name}"/>
|
---|
1057 | </manifest>
|
---|
1058 | </jar>
|
---|
1059 | <copy file="${build.home}/server.jar" todir="${basedir}"/>
|
---|
1060 | </target>
|
---|
1061 |
|
---|
1062 | <!-- ================== Packages targets ================================ -->
|
---|
1063 | <!-- these targets refer to the greenstone source packages - these need
|
---|
1064 | updating less often, so are in separate targets to the core -->
|
---|
1065 | <target name="prepare-packages" depends="init,prepare-indexers"/>
|
---|
1066 |
|
---|
1067 | <target name="checkout-indexers" depends="init" if="independent-indexers" unless="nosvn.mode">
|
---|
1068 | <svn>
|
---|
1069 | <checkout url="${svn.root}/indexers/${branch.path}" dest="${src.packages.home}/indexers" revision="${branch.revision}"/>
|
---|
1070 | </svn>
|
---|
1071 | </target>
|
---|
1072 |
|
---|
1073 | <target name="prepare-indexers" depends="init" if="independent-indexers" unless="indexers.present">
|
---|
1074 | <antcall target="checkout-indexers"/>
|
---|
1075 | </target>
|
---|
1076 |
|
---|
1077 | <target name="update-packages" depends="init,svnupdate-packages,configure-packages,clean-packages,compile-packages"
|
---|
1078 | description="Update only the source packages"/>
|
---|
1079 |
|
---|
1080 | <target name="svnupdate-packages" unless="nosvn.mode">
|
---|
1081 | <svn>
|
---|
1082 | <update dir="${src.packages.home}" revision="${branch.revision}"/>
|
---|
1083 | </svn>
|
---|
1084 | </target>
|
---|
1085 |
|
---|
1086 | <target name="configure-packages" depends="init,configure-javagdbm,configure-indexers"
|
---|
1087 | description="Configure only the packages."/>
|
---|
1088 |
|
---|
1089 | <target name="configure-javagdbm">
|
---|
1090 | <echo>
|
---|
1091 | Configuring JavaGDBM
|
---|
1092 | </echo>
|
---|
1093 | <exec executable="${javagdbm.home}/configure" os="${os.linux},${os.solaris}"
|
---|
1094 | dir="${javagdbm.home}">
|
---|
1095 | <arg value="--prefix=${basedir}"/>
|
---|
1096 | <arg value="--libdir=${lib.jni}"/>
|
---|
1097 | </exec>
|
---|
1098 | <exec executable="${javagdbm.home}/configure" os="${os.mac}"
|
---|
1099 | dir="${javagdbm.home}">
|
---|
1100 | <arg value="--prefix=${basedir}"/>
|
---|
1101 | <arg value="--libdir=${lib.jni}"/>
|
---|
1102 | <arg value="--with-gdbm=${gdbm.installed.path}"/>
|
---|
1103 | </exec>
|
---|
1104 | </target>
|
---|
1105 |
|
---|
1106 | <!-- Message from oran. I removed the condition from this line becuase it meant
|
---|
1107 | the indexers would only be configured if collection building was DISabled.
|
---|
1108 | Shouldn't they be configured when collection building is ENabled? -->
|
---|
1109 |
|
---|
1110 | <!-- <target name="configure-indexers" depends="init" if="independent-indexers"> -->
|
---|
1111 | <target name="configure-indexers" depends="init">
|
---|
1112 | <echo>Configuring Indexers</echo>
|
---|
1113 | <exec executable="${indexers.home}/configure" os="${os.unix}" dir="${indexers.home}">
|
---|
1114 | <arg value="--prefix=${basedir}"/>
|
---|
1115 | <arg value="--libdir=${lib.jni}"/>
|
---|
1116 | </exec>
|
---|
1117 | </target>
|
---|
1118 |
|
---|
1119 | <target name="clean-packages" depends="init,clean-javagdbm,clean-indexers" description="Clean only the packages"/>
|
---|
1120 |
|
---|
1121 | <target name="clean-javagdbm" depends="init">
|
---|
1122 | <exec executable="make" os="${os.unix}"
|
---|
1123 | dir="${javagdbm.home}">
|
---|
1124 | <arg value="clean"/>
|
---|
1125 | </exec>
|
---|
1126 | </target>
|
---|
1127 |
|
---|
1128 | <target name="clean-indexers" depends="init" if="independent-indexers">
|
---|
1129 | <exec executable="make" os="${os.unix}"
|
---|
1130 | dir="${indexers.home}">
|
---|
1131 | <arg value="clean"/>
|
---|
1132 | </exec>
|
---|
1133 | <exec executable="${indexers.home}/winMake.bat" os="${os.windows}"
|
---|
1134 | dir="${indexers.home}">
|
---|
1135 | <arg value="clean"/>
|
---|
1136 | </exec>
|
---|
1137 |
|
---|
1138 | </target>
|
---|
1139 | <target name="distclean-packages" depends="init,distclean-javagdbm,distclean-indexers" description="Distclean only the packages"/>
|
---|
1140 |
|
---|
1141 | <target name="distclean-javagdbm" depends="init">
|
---|
1142 | <exec executable="make" os="${os.unix}"
|
---|
1143 | dir="${javagdbm.home}">
|
---|
1144 | <arg value="distclean"/>
|
---|
1145 | </exec>
|
---|
1146 | </target>
|
---|
1147 |
|
---|
1148 | <target name="distclean-indexers" depends="init" if="independent-indexers">
|
---|
1149 | <exec executable="make" os="${os.unix}"
|
---|
1150 | dir="${indexers.home}">
|
---|
1151 | <arg value="distclean"/>
|
---|
1152 | </exec>
|
---|
1153 | <exec executable="${indexers.home}/winMake.bat" os="${os.windows}"
|
---|
1154 | dir="${indexers.home}">
|
---|
1155 | <arg value="clean"/>
|
---|
1156 | </exec>
|
---|
1157 |
|
---|
1158 | </target>
|
---|
1159 |
|
---|
1160 | <target name="compile-packages" description="Compile only the source packages">
|
---|
1161 |
|
---|
1162 | <!-- javagdbm -->
|
---|
1163 | <echo>compile javagdbm</echo>
|
---|
1164 | <exec executable="make" os="${os.unix}" dir="${javagdbm.home}"/>
|
---|
1165 | <exec executable="make" os="${os.unix}" dir="${javagdbm.home}">
|
---|
1166 | <arg value="install"/>
|
---|
1167 | </exec>
|
---|
1168 |
|
---|
1169 | <!-- windows: just the java stuff. -->
|
---|
1170 | <echo>Windows: compile javagdbm (java only)</echo>
|
---|
1171 | <exec executable="${javagdbm.home}/winMake.bat" os="${os.windows}" dir="${javagdbm.home}">
|
---|
1172 | <arg value="compile"/>
|
---|
1173 | <arg value="javaonly"/>
|
---|
1174 | </exec>
|
---|
1175 |
|
---|
1176 | <!-- install the jar file -->
|
---|
1177 | <echo>Install the javagdbm jar file</echo>
|
---|
1178 | <copy file="${javagdbm.home}/javagdbm.jar" todir="${lib.jni}"/>
|
---|
1179 |
|
---|
1180 | <!-- Indexers -->
|
---|
1181 |
|
---|
1182 | <!-- this may be in gs2build - we will be recompiling, but never mind -->
|
---|
1183 | <echo>Indexers: make (from ${indexers.home})</echo>
|
---|
1184 | <exec executable="make" os="${os.unix}" dir="${indexers.home}"/>
|
---|
1185 | <echo>Indexers: make install</echo>
|
---|
1186 | <exec executable="make" os="${os.unix}" dir="${indexers.home}">
|
---|
1187 | <arg value="install"/>
|
---|
1188 | </exec>
|
---|
1189 |
|
---|
1190 | <echo>Indexers: make</echo>
|
---|
1191 | <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" dir="${indexers.home}">
|
---|
1192 | <arg value="all"/>
|
---|
1193 | </exec>
|
---|
1194 | <echo>Indexers: make install</echo>
|
---|
1195 | <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" dir="${indexers.home}">
|
---|
1196 | <arg value="install"/>
|
---|
1197 | </exec>
|
---|
1198 |
|
---|
1199 | <!-- install the jar and jni files -->
|
---|
1200 | <echo>Install the indexers' jar and jni files</echo>
|
---|
1201 | <copy file="${mg.home}/mg.jar" todir="${lib.jni}"/>
|
---|
1202 | <copy file="${mgpp.home}/mgpp.jar" todir="${lib.jni}"/>
|
---|
1203 | <copy file="${lucene.home}/LuceneWrapper.jar" todir="${web.lib}"/>
|
---|
1204 | <antcall target="install-jni-files"/>
|
---|
1205 | </target>
|
---|
1206 |
|
---|
1207 | <target name="install-jni-files" depends="init,install-jni-files-linux,install-jni-files-windows,install-jni-files-macos"/>
|
---|
1208 |
|
---|
1209 | <target name="install-jni-files-linux" depends="init" if="current.os.isunixnotmac">
|
---|
1210 | <copy file="${mg.home}/jni/libmgretrievejni.so" todir="${lib.jni}"/>
|
---|
1211 | <copy file="${mg.home}/jni/libmgsearchjni.so" todir="${lib.jni}"/>
|
---|
1212 | <copy file="${mg.home}/jni/libmgpassjni.so" todir="${lib.jni}"/>
|
---|
1213 | <copy file="${mgpp.home}/jni/libmgppretrievejni.so" todir="${lib.jni}"/>
|
---|
1214 | <copy file="${mgpp.home}/jni/libmgppsearchjni.so" todir="${lib.jni}"/>
|
---|
1215 | <copy file="${mgpp.home}/jni/libmgpppassjni.so" todir="${lib.jni}"/>
|
---|
1216 | </target>
|
---|
1217 | <target name="install-jni-files-windows" depends="init" if="current.os.iswindows">
|
---|
1218 | <copy file="${mg.home}/jni/mgretrievejni.dll" todir="${lib.jni}"/>
|
---|
1219 | <copy file="${mg.home}/jni/mgsearchjni.dll" todir="${lib.jni}"/>
|
---|
1220 | <copy file="${mg.home}/jni/mgpassjni.dll" todir="${lib.jni}"/>
|
---|
1221 | <copy file="${mgpp.home}/jni/mgppretrievejni.dll" todir="${lib.jni}"/>
|
---|
1222 | <copy file="${mgpp.home}/jni/mgppsearchjni.dll" todir="${lib.jni}"/>
|
---|
1223 | <copy file="${mgpp.home}/jni/mgpppassjni.dll" todir="${lib.jni}"/>
|
---|
1224 | </target>
|
---|
1225 | <target name="install-jni-files-macos" depends="init" if="current.os.ismac">
|
---|
1226 | <copy file="${mg.home}/jni/libmgretrievejni.jnilib" todir="${lib.jni}"/>
|
---|
1227 | <copy file="${mg.home}/jni/libmgsearchjni.jnilib" todir="${lib.jni}"/>
|
---|
1228 | <copy file="${mg.home}/jni/libmgpassjni.jnilib" todir="${lib.jni}"/>
|
---|
1229 | <copy file="${mgpp.home}/jni/libmgppretrievejni.jnilib" todir="${lib.jni}"/>
|
---|
1230 | <copy file="${mgpp.home}/jni/libmgppsearchjni.jnilib" todir="${lib.jni}"/>
|
---|
1231 | <copy file="${mgpp.home}/jni/libmgpppassjni.jnilib" todir="${lib.jni}"/>
|
---|
1232 | </target>
|
---|
1233 |
|
---|
1234 | <!-- ================== gs2building targets ===============-->
|
---|
1235 |
|
---|
1236 |
|
---|
1237 | <target name="update-gs2building" if="collection.building.enabled"
|
---|
1238 | depends="init,svnupdate-gs2building,rename-gs2build-files,configure-gs2building,clean-gs2building,compile-gs2building"
|
---|
1239 | description="Update only the Greenstone 2 building components"/>
|
---|
1240 |
|
---|
1241 | <target name="svnupdate-gs2building" if="collection.building.enabled" depends="init,svnupdate-gs2build,svnupdate-gli" unless="nosvn.mode">
|
---|
1242 | </target>
|
---|
1243 |
|
---|
1244 | <target name="svnupdate-gs2build" if="collection.building.enabled" depends="init" unless="nosvn.mode">
|
---|
1245 | <!-- please keep this function in sync with checkout-gs2build -->
|
---|
1246 |
|
---|
1247 | <echo>updating gs2build</echo>
|
---|
1248 | <!-- svn updates -->
|
---|
1249 | <svn>
|
---|
1250 | <!-- perllib -->
|
---|
1251 | <update dir="gs2build/perllib" revision="${branch.revision}"/>
|
---|
1252 |
|
---|
1253 | <!-- selected packages -->
|
---|
1254 | <update dir="gs2build/packages/cpan" revision="${branch.revision}" />
|
---|
1255 | <update dir="gs2build/packages/expat" revision="${branch.revision}" />
|
---|
1256 | <update dir="gs2build/packages/html-tidy" revision="${branch.revision}" />
|
---|
1257 | <update dir="gs2build/packages/isis-gdl" revision="${branch.revision}" />
|
---|
1258 | <update dir="gs2build/packages/kea" revision="${branch.revision}" />
|
---|
1259 | <update dir="gs2build/packages/pdftohtml" revision="${branch.revision}" />
|
---|
1260 | <update dir="gs2build/packages/rtftohtml" revision="${branch.revision}" />
|
---|
1261 | <update dir="gs2build/packages/w3mir" revision="${branch.revision}" />
|
---|
1262 | <update dir="gs2build/packages/wget" revision="${branch.revision}" />
|
---|
1263 | <update dir="gs2build/packages/windows" revision="${branch.revision}" />
|
---|
1264 | <update dir="gs2build/packages/wv" revision="${branch.revision}" />
|
---|
1265 | <update dir="gs2build/packages/xlhtml" revision="${branch.revision}" />
|
---|
1266 | <update dir="gs2build/packages/yaz" revision="${branch.revision}" />
|
---|
1267 |
|
---|
1268 | <!-- some of src (db2txt hashfile phind txt2db) -->
|
---|
1269 | <update dir="gs2build/src/gdbmedit/db2txt" revision="${branch.revision}" />
|
---|
1270 | <update dir="gs2build/src/hashfile" revision="${branch.revision}" />
|
---|
1271 | <update dir="gs2build/src/phind" revision="${branch.revision}" />
|
---|
1272 | <update dir="gs2build/src/gdbmedit/txt2db" revision="${branch.revision}" />
|
---|
1273 |
|
---|
1274 | <!-- bin -->
|
---|
1275 | <update dir="gs2build/bin/script" revision="${branch.revision}" />
|
---|
1276 |
|
---|
1277 | <!-- mappings -->
|
---|
1278 | <update dir="gs2build/mappings" revision="${branch.revision}"/>
|
---|
1279 |
|
---|
1280 | <!-- etc/packages -->
|
---|
1281 | <update dir="gs2build/etc/packages" revision="${branch.revision}"/>
|
---|
1282 |
|
---|
1283 | <!-- collect -->
|
---|
1284 | <update dir="gs2build/collect/modelcol" revision="${branch.revision}"/>
|
---|
1285 |
|
---|
1286 | <!-- gs2build-extra -->
|
---|
1287 | <update dir="gs2build/gs2build-extra" revision="${branch.revision}"/>
|
---|
1288 |
|
---|
1289 | <!-- indexers -->
|
---|
1290 | <update dir="gs2build/indexers" revision="${branch.revision}"/>
|
---|
1291 |
|
---|
1292 | <!-- single files -->
|
---|
1293 |
|
---|
1294 | <!-- some files from lib -->
|
---|
1295 | <export srcUrl="${svn.root}/gsdl/${branch.path}/src/lib/text_t.h" destPath="gs2build/src/lib/text_t.h" revision="${branch.revision}"/>
|
---|
1296 | <export srcUrl="${svn.root}/gsdl/${branch.path}/src/lib/text_t.cpp" destPath="gs2build/src/lib/text_t.cpp" revision="${branch.revision}"/>
|
---|
1297 | <export srcUrl="${svn.root}/gsdl/${branch.path}/src/lib/gsdlconf.h" destPath="gs2build/src/lib/gsdlconf.h" revision="${branch.revision}"/>
|
---|
1298 |
|
---|
1299 | <!-- some files from etc -->
|
---|
1300 | <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/marctodc.txt" destPath="gs2build/etc/marctodc.txt" revision="${branch.revision}"/>
|
---|
1301 | <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/dc2marc-mapping.xml" destPath="gs2build/etc/dc2marc-mapping.xml" revision="${branch.revision}"/>
|
---|
1302 | <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/dc2marc.xsl" destPath="gs2build/etc/dc2marc.xsl" revision="${branch.revision}"/>
|
---|
1303 | <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/qdc2marc-mapping.xml" destPath="gs2build/etc/qdc2marc-mapping.xml" revision="${branch.revision}"/>
|
---|
1304 |
|
---|
1305 | <!-- some files from cgi-bin: necessary for remote GLI server -->
|
---|
1306 | <export srcUrl="${svn.root}/gsdl/${branch.path}/cgi-bin/gliserver.pl" destPath="${web.home}/WEB-INF/cgi/gliserver.pl" revision="${branch.revision}"/>
|
---|
1307 | <export srcUrl="${svn.root}/gsdl/${branch.path}/cgi-bin/gsdlCGI.pm" destPath="${web.home}/WEB-INF/cgi/gsdlCGI.pm" revision="${branch.revision}"/>
|
---|
1308 |
|
---|
1309 | <!-- some files from the gsdl root directory -->
|
---|
1310 | <export srcUrl="${svn.root}/gsdl/${branch.path}/setup.bash" destPath="gs2build/setup.bash" revision="${branch.revision}"/>
|
---|
1311 | <export srcUrl="${svn.root}/gsdl/${branch.path}/config.sub" destPath="gs2build/config.sub" revision="${branch.revision}"/>
|
---|
1312 | <export srcUrl="${svn.root}/gsdl/${branch.path}/config.guess" destPath="gs2build/config.guess" revision="${branch.revision}"/>
|
---|
1313 | <export srcUrl="${svn.root}/gsdl/${branch.path}/config.h.in" destPath="gs2build/config.h.in" revision="${branch.revision}"/>
|
---|
1314 | <export srcUrl="${svn.root}/gsdl/${branch.path}/configtest.pl" destPath="gs2build/configtest.pl" revision="${branch.revision}"/>
|
---|
1315 | <export srcUrl="${svn.root}/gsdl/${branch.path}/install-sh" destPath="gs2build/install-sh" revision="${branch.revision}"/>
|
---|
1316 | <export srcUrl="${svn.root}/gsdl/${branch.path}/acconfig.h" destPath="gs2build/acconfig.h" revision="${branch.revision}"/>
|
---|
1317 | <export srcUrl="${svn.root}/gsdl/${branch.path}/aclocal.m4" destPath="gs2build/aclocal.m4" revision="${branch.revision}"/>
|
---|
1318 | <export srcUrl="${svn.root}/gsdl/${branch.path}/WIN32cfg.h" destPath="gs2build/WIN32cfg.h" revision="${branch.revision}"/>
|
---|
1319 | </svn>
|
---|
1320 | </target>
|
---|
1321 |
|
---|
1322 | <target name="svnupdate-gli" if="collection.building.enabled" depends="init" unless="nosvn.mode">
|
---|
1323 | <svn>
|
---|
1324 | <update dir="${gli.home}" revision="${branch.revision}"/>
|
---|
1325 | </svn>
|
---|
1326 | </target>
|
---|
1327 |
|
---|
1328 | <target name="prepare-gs2building" depends="init,prepare-gs2build,prepare-gli" if="collection.building.enabled">
|
---|
1329 | </target>
|
---|
1330 | <target name="checkout-gs2build" depends="init" if="collection.building.enabled" unless="nosvn.mode">
|
---|
1331 | <!-- please keep this function in sync with update-gs2build -->
|
---|
1332 | <echo>checking out gs2build</echo>
|
---|
1333 |
|
---|
1334 | <!-- this has to be created first to avoid errors when trying to export to it later -->
|
---|
1335 | <mkdir dir="${basedir}/gs2build/src/lib"/>
|
---|
1336 |
|
---|
1337 | <!-- svn checkouts -->
|
---|
1338 | <svn>
|
---|
1339 | <!-- perllib -->
|
---|
1340 | <checkout url="${svn.root}/gsdl/${branch.path}/perllib" destPath="gs2build/perllib" revision="${branch.revision}"/>
|
---|
1341 |
|
---|
1342 | <!-- selected packages -->
|
---|
1343 | <checkout url="${svn.root}/gsdl/${branch.path}/packages/cpan" destPath="gs2build/packages/cpan" revision="${branch.revision}" />
|
---|
1344 | <checkout url="${svn.root}/gsdl/${branch.path}/packages/expat" destPath="gs2build/packages/expat" revision="${branch.revision}" />
|
---|
1345 | <checkout url="${svn.root}/gsdl/${branch.path}/packages/html-tidy" destPath="gs2build/packages/html-tidy" revision="${branch.revision}" />
|
---|
1346 | <checkout url="${svn.root}/gsdl/${branch.path}/packages/isis-gdl" destPath="gs2build/packages/isis-gdl" revision="${branch.revision}" />
|
---|
1347 | <checkout url="${svn.root}/gsdl/${branch.path}/packages/kea" destPath="gs2build/packages/kea" revision="${branch.revision}" />
|
---|
1348 | <checkout url="${svn.root}/gsdl/${branch.path}/packages/pdftohtml" destPath="gs2build/packages/pdftohtml" revision="${branch.revision}" />
|
---|
1349 | <checkout url="${svn.root}/gsdl/${branch.path}/packages/rtftohtml" destPath="gs2build/packages/rtftohtml" revision="${branch.revision}" />
|
---|
1350 | <checkout url="${svn.root}/gsdl/${branch.path}/packages/w3mir" destPath="gs2build/packages/w3mir" revision="${branch.revision}" />
|
---|
1351 | <checkout url="${svn.root}/gsdl/${branch.path}/packages/wget" destPath="gs2build/packages/wget" revision="${branch.revision}" />
|
---|
1352 | <checkout url="${svn.root}/gsdl/${branch.path}/packages/windows" destPath="gs2build/packages/windows" revision="${branch.revision}" />
|
---|
1353 | <checkout url="${svn.root}/gsdl/${branch.path}/packages/wv" destPath="gs2build/packages/wv" revision="${branch.revision}" />
|
---|
1354 | <checkout url="${svn.root}/gsdl/${branch.path}/packages/xlhtml" destPath="gs2build/packages/xlhtml" revision="${branch.revision}" />
|
---|
1355 | <checkout url="${svn.root}/gsdl/${branch.path}/packages/yaz" destPath="gs2build/packages/yaz" revision="${branch.revision}" />
|
---|
1356 |
|
---|
1357 | <!-- some of src (db2txt hashfile phind txt2db) -->
|
---|
1358 | <checkout url="${svn.root}/gsdl/${branch.path}/src/gdbmedit/db2txt" destPath="gs2build/src/gdbmedit/db2txt" revision="${branch.revision}" />
|
---|
1359 | <checkout url="${svn.root}/gsdl/${branch.path}/src/hashfile" destPath="gs2build/src/hashfile" revision="${branch.revision}" />
|
---|
1360 | <checkout url="${svn.root}/gsdl/${branch.path}/src/phind" destPath="gs2build/src/phind" revision="${branch.revision}" />
|
---|
1361 | <checkout url="${svn.root}/gsdl/${branch.path}/src/gdbmedit/txt2db" destPath="gs2build/src/gdbmedit/txt2db" revision="${branch.revision}" />
|
---|
1362 |
|
---|
1363 | <!-- bin -->
|
---|
1364 | <checkout url="${svn.root}/gsdl/${branch.path}/bin/script" destPath="gs2build/bin/script" revision="${branch.revision}" />
|
---|
1365 |
|
---|
1366 | <!-- mappings -->
|
---|
1367 | <checkout url="${svn.root}/gsdl/${branch.path}/mappings" destPath="gs2build/mappings" revision="${branch.revision}"/>
|
---|
1368 |
|
---|
1369 | <!-- etc/packages -->
|
---|
1370 | <checkout url="${svn.root}/gsdl/${branch.path}/etc/packages" destPath="gs2build/etc/packages" revision="${branch.revision}"/>
|
---|
1371 |
|
---|
1372 | <!-- collect -->
|
---|
1373 | <checkout url="${svn.root}/gsdl/${branch.path}/collect/modelcol" destPath="gs2build/collect/modelcol" revision="${branch.revision}"/>
|
---|
1374 |
|
---|
1375 | <!-- gs2build-extra -->
|
---|
1376 | <checkout url="${svn.root}/other-projects/trunk/gs2build-extra" destPath="gs2build/gs2build-extra" revision="${branch.revision}"/>
|
---|
1377 |
|
---|
1378 | <!-- indexers -->
|
---|
1379 | <checkout url="${svn.root}/indexers/${branch.path}" destPath="gs2build/indexers" revision="${branch.revision}"/>
|
---|
1380 |
|
---|
1381 | <!-- single files -->
|
---|
1382 |
|
---|
1383 | <!-- some files from lib -->
|
---|
1384 | <export srcUrl="${svn.root}/gsdl/${branch.path}/src/lib/text_t.h" destPath="gs2build/src/lib/text_t.h" revision="${branch.revision}"/>
|
---|
1385 | <export srcUrl="${svn.root}/gsdl/${branch.path}/src/lib/text_t.cpp" destPath="gs2build/src/lib/text_t.cpp" revision="${branch.revision}"/>
|
---|
1386 | <export srcUrl="${svn.root}/gsdl/${branch.path}/src/lib/gsdlconf.h" destPath="gs2build/src/lib/gsdlconf.h" revision="${branch.revision}"/>
|
---|
1387 |
|
---|
1388 | <!-- some files from etc -->
|
---|
1389 | <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/marctodc.txt" destPath="gs2build/etc/marctodc.txt" revision="${branch.revision}"/>
|
---|
1390 | <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/dc2marc-mapping.xml" destPath="gs2build/etc/dc2marc-mapping.xml" revision="${branch.revision}"/>
|
---|
1391 | <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/dc2marc.xsl" destPath="gs2build/etc/dc2marc.xsl" revision="${branch.revision}"/>
|
---|
1392 | <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/qdc2marc-mapping.xml" destPath="gs2build/etc/qdc2marc-mapping.xml" revision="${branch.revision}"/>
|
---|
1393 |
|
---|
1394 | <!-- some files from the gsdl root directory -->
|
---|
1395 | <export srcUrl="${svn.root}/gsdl/${branch.path}/setup.bash" destPath="gs2build/setup.bash" revision="${branch.revision}"/>
|
---|
1396 | <export srcUrl="${svn.root}/gsdl/${branch.path}/config.sub" destPath="gs2build/config.sub" revision="${branch.revision}"/>
|
---|
1397 | <export srcUrl="${svn.root}/gsdl/${branch.path}/config.guess" destPath="gs2build/config.guess" revision="${branch.revision}"/>
|
---|
1398 | <export srcUrl="${svn.root}/gsdl/${branch.path}/config.h.in" destPath="gs2build/config.h.in" revision="${branch.revision}"/>
|
---|
1399 | <export srcUrl="${svn.root}/gsdl/${branch.path}/configtest.pl" destPath="gs2build/configtest.pl" revision="${branch.revision}"/>
|
---|
1400 | <export srcUrl="${svn.root}/gsdl/${branch.path}/install-sh" destPath="gs2build/install-sh" revision="${branch.revision}"/>
|
---|
1401 | <export srcUrl="${svn.root}/gsdl/${branch.path}/acconfig.h" destPath="gs2build/acconfig.h" revision="${branch.revision}"/>
|
---|
1402 | <export srcUrl="${svn.root}/gsdl/${branch.path}/aclocal.m4" destPath="gs2build/aclocal.m4" revision="${branch.revision}"/>
|
---|
1403 | <export srcUrl="${svn.root}/gsdl/${branch.path}/WIN32cfg.h" destPath="gs2build/WIN32cfg.h" revision="${branch.revision}"/>
|
---|
1404 | </svn>
|
---|
1405 | </target>
|
---|
1406 |
|
---|
1407 | <target name="prepare-gs2build" depends="init" if="collection.building.enabled" unless="gs2build.present">
|
---|
1408 | <antcall target="checkout-gs2build"/>
|
---|
1409 | <antcall target="rename-gs2build-files"/>
|
---|
1410 | <antcall target="unzip-windows-packages"/>
|
---|
1411 | <antcall target="checkout-winbin"/>
|
---|
1412 | <antcall target="get-windows-binaries"/>
|
---|
1413 | <antcall target="delete-winbin"/>
|
---|
1414 | <antcall target="get-macos-extra"/>
|
---|
1415 | </target>
|
---|
1416 |
|
---|
1417 | <target name="checkout-winbin" depends="init" if="current.os.iswindows"
|
---|
1418 | unless="nosvn.mode">
|
---|
1419 | <svn>
|
---|
1420 | <checkout url="${svn.root}/other-projects/trunk/winbin" destPath="${basedir}/winbin" revision="${branch.revision}"/>
|
---|
1421 | </svn>
|
---|
1422 | </target>
|
---|
1423 |
|
---|
1424 | <target name="update-winbin" depends="init" if="current.os.iswindows" unless="nosvn.mode">
|
---|
1425 | <svn>
|
---|
1426 | <update dir="winbin" revision="${branch.revision}"/>
|
---|
1427 | </svn>
|
---|
1428 | </target>
|
---|
1429 |
|
---|
1430 | <target name="get-windows-binaries" depends="init" if="collection.building.enabled.windows">
|
---|
1431 | <move todir="${gs2build.home}/bin/windows" failonerror="false">
|
---|
1432 | <fileset dir="${basedir}/winbin/bin"/>
|
---|
1433 | </move>
|
---|
1434 | </target>
|
---|
1435 | <target name="delete-winbin" depends="init" if="collection.building.enabled.windows">
|
---|
1436 | <delete dir="${basedir}/winbin"/>
|
---|
1437 | </target>
|
---|
1438 |
|
---|
1439 | <target name="unzip-windows-packages" depends="init" if="collection.building.enabled.windows">
|
---|
1440 | <unzip src="${gs2build.home}/packages/windows/gdbm/gdbm.zip"
|
---|
1441 | dest="${gs2build.home}/packages/windows/gdbm"/>
|
---|
1442 | <unzip src="${gs2build.home}/packages/windows/crypt/crypt.zip"
|
---|
1443 | dest="${gs2build.home}/packages/windows/crypt"/>
|
---|
1444 | <unzip src="${gs2build.home}/packages/windows/expat/expat.zip"
|
---|
1445 | dest="${gs2build.home}/packages/windows/expat"/>
|
---|
1446 | </target>
|
---|
1447 |
|
---|
1448 | <!-- downloads a good XML-Parser -->
|
---|
1449 | <target name="get-macos-extra" depends="init" if="need.macos.extra">
|
---|
1450 | <!--
|
---|
1451 | <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz"
|
---|
1452 | dest="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"
|
---|
1453 | usetimestamp="true"/>
|
---|
1454 | -->
|
---|
1455 | <echo>Nothing extra currently needed for MacOs prepare</echo>
|
---|
1456 | </target>
|
---|
1457 |
|
---|
1458 | <!-- untars the XML-Parser. need to do this after compiling in gs2build-->
|
---|
1459 | <target name="install-macos-extra" depends="init,get-macos-extra" if="need.macos.extra">
|
---|
1460 | <!-- make sure these directories are present, otherwise chmod craps out
|
---|
1461 | this chmod is needed in case we are unpacking for a second time -->
|
---|
1462 | <!--
|
---|
1463 | <mkdir dir="${gs2build.home}/perllib/cpan/perl-5.8"/>
|
---|
1464 | <mkdir dir="${gs2build.home}/perllib/cpan/perl-5.6"/>
|
---|
1465 | <chmod dir="${gs2build.home}/perllib/cpan/perl-5.8" perm="ug+w" includes="**"/>
|
---|
1466 | <chmod dir="${gs2build.home}/perllib/cpan/perl-5.6" perm="ug+w" includes="**"/>
|
---|
1467 | <untar src="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"
|
---|
1468 | dest="${gs2build.home}/perllib/cpan/"
|
---|
1469 | compression="gzip"/>
|
---|
1470 | -->
|
---|
1471 | <echo>Nothing extra currently needed for MacOs install</echo>
|
---|
1472 | </target>
|
---|
1473 |
|
---|
1474 | <target name="install-indexer-files" depends="init" unless="indexers.present">
|
---|
1475 | <copy todir="${indexers.home}">
|
---|
1476 | <fileset dir="${gs2build.home}/indexers" />
|
---|
1477 | </copy>
|
---|
1478 | <chmod file="${indexers.home}/configure" perm="a+x"/>
|
---|
1479 | </target>
|
---|
1480 |
|
---|
1481 | <target name="rename-gs2build-files" depends="rename-gs2build-files-unix,rename-gs2build-files-windows,gs2build-edit-setup-bat" if="collection.building.enabled"/>
|
---|
1482 |
|
---|
1483 | <target name="gs2build-edit-setup-bat" if="collection.building.enabled.windows">
|
---|
1484 | <!-- we want a windows path in the setup.bat file -->
|
---|
1485 | <pathconvert targetos="windows" property="gs2build.home.windows">
|
---|
1486 | <path path="${gs2build.home}"/>
|
---|
1487 | </pathconvert>
|
---|
1488 | <move file="${gs2build.home}/setup.bat" tofile="${gs2build.home}/setup-tmp.bat">
|
---|
1489 | <filterset>
|
---|
1490 | <filter token="gsdlhome" value="${gs2build.home.windows}"/>
|
---|
1491 | </filterset>
|
---|
1492 | </move>
|
---|
1493 | <move file="${gs2build.home}/setup-tmp.bat" tofile="${gs2build.home}/setup.bat" />
|
---|
1494 | </target>
|
---|
1495 |
|
---|
1496 | <target name="rename-gs2build-files-windows" if="collection.building.enabled.windows">
|
---|
1497 | <property name="gs2build-extra.home" value="${gs2build.home}/gs2build-extra"/>
|
---|
1498 | <copy file="${gs2build-extra.home}/lib.win32.mak" tofile="${gs2build.home}/src/lib/win32.mak"/>
|
---|
1499 | <copy file="${gs2build-extra.home}/win32.mak" tofile="${gs2build.home}/win32.mak"/>
|
---|
1500 | <copy file="${gs2build-extra.home}/setup.bat" tofile="${gs2build.home}/setup.bat"/>
|
---|
1501 | </target>
|
---|
1502 |
|
---|
1503 | <target name="rename-gs2build-files-unix" if="collection.building.enabled.unix">
|
---|
1504 | <property name="gs2build-extra.home" value="${gs2build.home}/gs2build-extra"/>
|
---|
1505 | <copy file="${gs2build-extra.home}/configure" tofile="${gs2build.home}/configure"/>
|
---|
1506 | <chmod file="${gs2build.home}/configure" perm="a+x"/>
|
---|
1507 | <copy file="${gs2build-extra.home}/configure.in" tofile="${gs2build.home}/configure.in"/>
|
---|
1508 | <copy file="${gs2build-extra.home}/Makefile.in" tofile="${gs2build.home}/Makefile.in"/>
|
---|
1509 | <copy file="${gs2build-extra.home}/packages.configure" tofile="${gs2build.home}/packages/configure"/>
|
---|
1510 | <chmod file="${gs2build.home}/packages/configure" perm="a+x"/>
|
---|
1511 | <copy file="${gs2build-extra.home}/packages.Makefile.in" tofile="${gs2build.home}/packages/Makefile.in"/>
|
---|
1512 | <copy file="${gs2build-extra.home}/lib.Makefile.in" tofile="${gs2build.home}/src/lib/Makefile.in"/>
|
---|
1513 | </target>
|
---|
1514 |
|
---|
1515 | <target name="prepare-gli" depends="init" if="collection.building.enabled" unless="gli.present">
|
---|
1516 | <antcall target="checkout-gli"/>
|
---|
1517 | </target>
|
---|
1518 |
|
---|
1519 | <target name="checkout-gli" depends="init" if="collection.building.enabled" unless="nosvn.mode">
|
---|
1520 | <echo>checking out gli</echo>
|
---|
1521 | <svn>
|
---|
1522 | <checkout url="${svn.root}/gli/${branch.path}" destPath="gli" revision="${branch.revision}"/>
|
---|
1523 | </svn>
|
---|
1524 | </target>
|
---|
1525 |
|
---|
1526 | <target name="configure-gs2building" depends="init" if="collection.building.enabled"
|
---|
1527 | description="Configure only the Greenstone 2 building components">
|
---|
1528 | <exec executable="${gs2build.home}/configure" os="${os.linux},${os.solaris}"
|
---|
1529 | dir="${gs2build.home}">
|
---|
1530 | <arg value="--prefix=${gs2build.home}"/>
|
---|
1531 | </exec>
|
---|
1532 | <exec executable="${gs2build.home}/configure" os="${os.mac}"
|
---|
1533 | dir="${gs2build.home}">
|
---|
1534 | <arg value="--prefix=${gs2build.home}"/>
|
---|
1535 | <arg value="--with-gdbm=${gdbm.installed.path}"/>
|
---|
1536 | </exec>
|
---|
1537 | </target>
|
---|
1538 |
|
---|
1539 | <target name="clean-gs2building" depends="init,clean-gli,clean-gs2build"
|
---|
1540 | description="Clean only the Greenstone 2 building components"
|
---|
1541 | if="collection.building.enabled"/>
|
---|
1542 |
|
---|
1543 | <target name="clean-gli" depends="init" if="collection.building.enabled">
|
---|
1544 | <!-- gli -->
|
---|
1545 | <property name="gli.home" value="${basedir}/gli"/>
|
---|
1546 | <!-- linux -->
|
---|
1547 | <exec executable="clean.sh" os="${os.unix}" dir="${gli.home}"
|
---|
1548 | resolveExecutable="true"/>
|
---|
1549 | <!-- windows -->
|
---|
1550 | <exec executable="clean.bat" os="${os.windows}" dir="${gli.home}"
|
---|
1551 | resolveExecutable="true"/>
|
---|
1552 | </target>
|
---|
1553 |
|
---|
1554 | <target name="clean-gs2build" depends="init" if="collection.building.enabled">
|
---|
1555 | <!-- gs2build -->
|
---|
1556 | <!--linux: -->
|
---|
1557 | <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
|
---|
1558 | <arg value="clean"/>
|
---|
1559 | </exec>
|
---|
1560 | <!-- windows: -->
|
---|
1561 | <!-- run the setup script -->
|
---|
1562 | <!--<exec executable="${compile.windows.c++.setup}" os="${os.windows}" />-->
|
---|
1563 | <!--Above does not work: even though vcvars.bat executes, the env changes it makes don't get saved. Need user to run vcvars.bat first before calling ant-->
|
---|
1564 | <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}" >
|
---|
1565 | <arg value="/f"/>
|
---|
1566 | <arg value="win32.mak"/>
|
---|
1567 | <arg value="clean"/>
|
---|
1568 | </exec>
|
---|
1569 | </target>
|
---|
1570 |
|
---|
1571 | <target name="distclean-gs2building" depends="init,clean-gli,clean-gs2build,distclean-gs2build"
|
---|
1572 | description="Distclean only the Greenstone 2 building components"
|
---|
1573 | if="collection.building.enabled"/>
|
---|
1574 |
|
---|
1575 | <target name="distclean-gs2build" depends="init" if="collection.building.enabled">
|
---|
1576 | <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
|
---|
1577 | <arg value="distclean"/>
|
---|
1578 | </exec>
|
---|
1579 | </target>
|
---|
1580 |
|
---|
1581 | <target name="compile-gs2building" depends="init,compile-gs2build,compile-gli" if="collection.building.enabled"
|
---|
1582 | description="Compile only the Greenstone 2 building components">
|
---|
1583 | </target>
|
---|
1584 |
|
---|
1585 | <target name="compile-gli" depends="init" if="collection.building.enabled">
|
---|
1586 | <!-- gli -->
|
---|
1587 | <property name="gli.home" value="${basedir}/gli"/>
|
---|
1588 |
|
---|
1589 | <!-- change the version number -->
|
---|
1590 | <rsr file="${gli.home}/src/org/greenstone/gatherer/Gatherer.java" pattern="^(.*)String\s*PROGRAM_VERSION\s*=\s*"(.*)"" replacement="$1String PROGRAM_VERSION = "${app.version}""/>
|
---|
1591 | <!-- linux -->
|
---|
1592 | <exec executable="makegli.sh" os="${os.unix}" dir="${gli.home}" resolveExecutable="true"/>
|
---|
1593 | <!--remote gli-->
|
---|
1594 | <exec executable="makejar.sh" os="${os.unix}" dir="${gli.home}"
|
---|
1595 | resolveExecutable="true"/>
|
---|
1596 | <!-- windows -->
|
---|
1597 | <exec executable="makegli.bat" os="${os.windows}" dir="${gli.home}" resolveExecutable="true"/>
|
---|
1598 | <!--remote gli-->
|
---|
1599 | <exec executable="makejar.bat" os="${os.windows}" dir="${gli.home}"
|
---|
1600 | resolveExecutable="true"/>
|
---|
1601 | <copy file="${gli.home}/GLIServer.jar" todir="${gs2build.home}/bin/java" />
|
---|
1602 | </target>
|
---|
1603 |
|
---|
1604 | <target name="compile-gs2build" depends="init" if="collection.building.enabled">
|
---|
1605 | <!-- gs2build -->
|
---|
1606 | <!--linux: make, make install -->
|
---|
1607 | <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
|
---|
1608 | </exec>
|
---|
1609 | <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
|
---|
1610 | <arg value="install"/>
|
---|
1611 | </exec>
|
---|
1612 | <!-- run the setup script -->
|
---|
1613 | <!-- <exec executable="${compile.windows.c++.setup}" os="${os.windows}"/>-->
|
---|
1614 | <!--Above does not work: even though vcvars.bat executes, the env changes it makes don't get saved. Need user to run vcvars.bat first before calling ant-->
|
---|
1615 | <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}">
|
---|
1616 | <arg value="/f"/>
|
---|
1617 | <arg value="win32.mak"/>
|
---|
1618 | </exec>
|
---|
1619 | <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}">
|
---|
1620 | <arg value="/f"/>
|
---|
1621 | <arg value="win32.mak"/>
|
---|
1622 | <arg value="install"/>
|
---|
1623 | </exec>
|
---|
1624 | <!-- LuceneWrapper jar file not installed by default -->
|
---|
1625 | <mkdir dir="${gs2build.home}/bin/java"/>
|
---|
1626 | <copy file="${lucene.home}/LuceneWrapper.jar" todir="${gs2build.home}/bin/java"/>
|
---|
1627 | <antcall target="install-gs2build-indexers-windows"/>
|
---|
1628 | <antcall target="install-macos-extra"/>
|
---|
1629 | </target>
|
---|
1630 |
|
---|
1631 | <target name="install-gs2build-indexers-windows" depends="init" if="collection.building.enabled.windows">
|
---|
1632 | <copy todir="${gs2build.home}/bin/windows">
|
---|
1633 | <fileset dir="${gs2build.home}/indexers/bin">
|
---|
1634 | <include name="*.*"/>
|
---|
1635 | </fileset>
|
---|
1636 | </copy>
|
---|
1637 | </target>
|
---|
1638 |
|
---|
1639 | <target name="gli" description="Run the Greenstone Librarian Interface" depends="init" if="collection.building.enabled">
|
---|
1640 | <exec executable="${basedir}/gli/gli4gs3.sh" os="${os.linux},${os.solaris}" dir="${basedir}/gli" spawn="true">
|
---|
1641 | <env key="gsdl3path" path="${basedir}"/>
|
---|
1642 | <env key="gsdlpath" path="${basedir}/gs2build"/>
|
---|
1643 | </exec>
|
---|
1644 | <exec executable="${basedir}/gli/gli4gs3.sh" os="${os.mac}" dir="${basedir}/gli" spawn="true">
|
---|
1645 | <env key="gsdl3path" path="${basedir}"/>
|
---|
1646 | <env key="gsdlpath" path="${basedir}/gs2build"/>
|
---|
1647 | <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${gdbm.installed.path}/lib"/>
|
---|
1648 | </exec>
|
---|
1649 | <exec executable="${basedir}/gli/gli4gs3.bat" os="${os.windows}" dir="${basedir}/gli" spawn="true">
|
---|
1650 | <env key="GSDL3PATH" path="${basedir}"/>
|
---|
1651 | <env key="GSDLPATH" path="${basedir}/gs2build"/>
|
---|
1652 | </exec>
|
---|
1653 | <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.
|
---|
1654 | </echo>
|
---|
1655 | </target>
|
---|
1656 |
|
---|
1657 |
|
---|
1658 | <!-- ======================== TESTING Targets ========================= -->
|
---|
1659 |
|
---|
1660 | <target name="test" description="Run the (incomplete) JUnit test suite "
|
---|
1661 | depends="init">
|
---|
1662 | <mkdir dir="${basedir}/test"/>
|
---|
1663 | <junit printsummary="withOutAndErr"
|
---|
1664 | errorproperty="test.failed"
|
---|
1665 | failureproperty="test.failed"
|
---|
1666 | fork="${junit.fork}">
|
---|
1667 | <formatter type="plain"/>
|
---|
1668 | <classpath>
|
---|
1669 | <pathelement location="${build.home}/gsdl3test.jar"/>
|
---|
1670 | <path refid="compile.classpath"/>
|
---|
1671 | </classpath>
|
---|
1672 | <test name="${testcase}" if="testcase"/>
|
---|
1673 | <batchtest todir="${basedir}/test" unless="testcase">
|
---|
1674 | <fileset dir="${build.home}"
|
---|
1675 | includes="**/*Test.class"
|
---|
1676 | />
|
---|
1677 | </batchtest>
|
---|
1678 | </junit>
|
---|
1679 | <echo>
|
---|
1680 | *********************************************
|
---|
1681 | Test output can be found in directory 'test'
|
---|
1682 | *********************************************
|
---|
1683 | </echo>
|
---|
1684 | </target>
|
---|
1685 |
|
---|
1686 | <!-- ======================== FLAX Targets ========================= -->
|
---|
1687 | <target name="prepare-flax" description="check out flax source code from another repository" if="install.flax">
|
---|
1688 | <echo>checking out flax ...</echo>
|
---|
1689 | <mkdir dir="${basedir}/src/java/org/flax"/>
|
---|
1690 | <mkdir dir="${basedir}/src/java/org/greenstone/gsdl3/flax"/>
|
---|
1691 | <mkdir dir="${web.home}/WEB-INF/classes/flax"/>
|
---|
1692 | <mkdir dir="${web.home}/interfaces/flax"/>
|
---|
1693 | <mkdir dir="${web.home}/sites/flax"/>
|
---|
1694 | <mkdir dir="${basedir}/flax-resources"/>
|
---|
1695 | <mkdir dir="${basedir}/flax-lib"/>
|
---|
1696 | <svn>
|
---|
1697 | <checkout url="${flax.checkout.path}/src/java/org/flax/"
|
---|
1698 | destPath="${basedir}/src/java/org/flax"/>
|
---|
1699 | <checkout url="${flax.checkout.path}/src/java/org/greenstone/gsdl3/flax/"
|
---|
1700 | destPath="${basedir}/src/java/org/greenstone/gsdl3/flax"/>
|
---|
1701 | <checkout url="${flax.checkout.path}/web/WEB-INF/classes/flax/"
|
---|
1702 | destPath="${web.home}/WEB-INF/classes/flax"/>
|
---|
1703 | <checkout url="${flax.checkout.path}/web/interfaces/flax/"
|
---|
1704 | destPath="${web.home}/interfaces/flax"/>
|
---|
1705 | <checkout url="${flax.checkout.path}/web/sites/flax/"
|
---|
1706 | destPath="${web.home}/sites/flax"/>
|
---|
1707 | <checkout url="${flax.checkout.path}/flax-resources"
|
---|
1708 | destPath="${basedir}/flax-resources"/>
|
---|
1709 | <checkout url="${flax.checkout.path}/lib"
|
---|
1710 | destPath="${basedir}/flax-lib"/>
|
---|
1711 | </svn>
|
---|
1712 | <echo>prepare flax files...</echo>
|
---|
1713 | <move file="${web.home}/WEB-INF/web.xml" tofile="${web.home}/WEB-INF/web.xml.greenstone3backup"/>
|
---|
1714 | <antcall target="flax-copy-files" />
|
---|
1715 | <antcall target="unzip-flax-collections" />
|
---|
1716 | <antcall target="unzip-flax-resources" />
|
---|
1717 | </target>
|
---|
1718 |
|
---|
1719 | <target name="update-flax" description="update flax from repository">
|
---|
1720 | <echo>updating flax ...</echo>
|
---|
1721 | <svn>
|
---|
1722 | <update dir="${basedir}/src/java/org/flax"/>
|
---|
1723 | <update dir="${basedir}/src/java/org/greenstone/gsdl3/flax"/>
|
---|
1724 | <update dir="${web.home}/WEB-INF/classes/flax"/>
|
---|
1725 | <update dir="${web.home}/interfaces/flax"/>
|
---|
1726 | <update dir="${web.home}/sites/flax"/>
|
---|
1727 | </svn>
|
---|
1728 | <antcall target="flax-copy-files" />
|
---|
1729 | <antcall target="unzip-flax-collections" />
|
---|
1730 | </target>
|
---|
1731 |
|
---|
1732 | <target name="unzip-flax-collections" >
|
---|
1733 | <property name="coll.dir" value="${web.home}/sites/flax/collect"/>
|
---|
1734 | <unzip dest="${coll.dir}">
|
---|
1735 | <fileset dir="${coll.dir}">
|
---|
1736 | <include name="*.zip"/>
|
---|
1737 | </fileset>
|
---|
1738 | </unzip>
|
---|
1739 | <delete>
|
---|
1740 | <fileset dir="${coll.dir}" includes="*.zip"/>
|
---|
1741 | </delete>
|
---|
1742 | </target>
|
---|
1743 |
|
---|
1744 | <target name="unzip-flax-resources" >
|
---|
1745 | <property name="classes.dir" value="${web.home}/WEB-INF/classes/flax"/>
|
---|
1746 | <unzip dest="${classes.dir}">
|
---|
1747 | <fileset dir="${classes.dir}">
|
---|
1748 | <include name="*.zip"/>
|
---|
1749 | </fileset>
|
---|
1750 | </unzip>
|
---|
1751 | <delete>
|
---|
1752 | <fileset dir="${classes.dir}" includes="*.zip"/>
|
---|
1753 | </delete>
|
---|
1754 | </target>
|
---|
1755 |
|
---|
1756 | <target name="flax-copy-files" description="copy some flax files into the appropriate greenstone3 directories">
|
---|
1757 | <echo>copying flax files ...</echo>
|
---|
1758 | <copy file="${web.home}/WEB-INF/classes/flax/web.xml" todir="${web.home}/WEB-INF" overwrite="true" />
|
---|
1759 | <!-- A configuration file containing web service binding information for the axis engine -->
|
---|
1760 | <copy file="${web.home}/WEB-INF/classes/flax/server-config.wsdd" todir="${web.home}/WEB-INF" overwrite="true" />
|
---|
1761 | <copy file="${basedir}/flax-resources/flax-build.xml" todir="${basedir}" overwrite="true" />
|
---|
1762 | <copy file="${basedir}/flax-lib/opennlp-tools-1.3.0.jar" todir="${web.home}/WEB-INF/lib" overwrite="true" />
|
---|
1763 | </target>
|
---|
1764 |
|
---|
1765 |
|
---|
1766 | <!-- ======================== GDBM Targets ========================= -->
|
---|
1767 |
|
---|
1768 | <target name="prepare-gdbm" depends="init" if="install.gdbm">
|
---|
1769 | <get src="http://www.greenstone.org/gs3files/${gdbm.version}.tar.gz"
|
---|
1770 | dest="${src.packages.home}/${gdbm.version}.tar.gz" usetimestamp="true"/>
|
---|
1771 | <untar compression= "gzip" src="${src.packages.home}/${gdbm.version}.tar.gz" dest="${src.packages.home}" />
|
---|
1772 | <chmod dir="${src.packages.home}/${gdbm.version}" perm="ugo+wrx" includes="**" />
|
---|
1773 | <antcall target="configure-gdbm" />
|
---|
1774 | <antcall target="compile-gdbm" />
|
---|
1775 | </target>
|
---|
1776 |
|
---|
1777 | <target name="configure-gdbm" if="install.gdbm">
|
---|
1778 | <echo>
|
---|
1779 | Configuring GDBM
|
---|
1780 | </echo>
|
---|
1781 | <exec executable="${gdbm.home}/configure" os="${os.mac},${os.unix}"
|
---|
1782 | dir="${gdbm.home}">
|
---|
1783 | <arg value="--prefix=${gdbm.home}"/>
|
---|
1784 | </exec>
|
---|
1785 | </target>
|
---|
1786 |
|
---|
1787 | <target name="clean-gdbm" depends="init" if="install.gdbm">
|
---|
1788 | <echo>clean GDBM</echo>
|
---|
1789 | <exec executable="make" os="${os.unix}" dir="${gdbm.home}" >
|
---|
1790 | <arg value="clean"/>
|
---|
1791 | </exec>
|
---|
1792 | </target>
|
---|
1793 |
|
---|
1794 |
|
---|
1795 | <target name="distclean-gdbm" depends="init" if="install.gdbm">
|
---|
1796 | <echo>distclean GDBM</echo>
|
---|
1797 | <exec executable="make" os="${os.unix}" dir="${gdbm.home}" >
|
---|
1798 | <arg value="distclean"/>
|
---|
1799 | </exec>
|
---|
1800 | </target>
|
---|
1801 |
|
---|
1802 | <target name="compile-gdbm" depends="init" if="install.gdbm">
|
---|
1803 | <echo>compile GDBM</echo>
|
---|
1804 | <exec executable="groups" os="${os.unix}" outputproperty="usergroups"/>
|
---|
1805 | <exec executable="awk" os="${os.unix}" inputstring="${usergroups}" outputproperty="firstgroup">
|
---|
1806 | <arg line="'{print $1}'"/>
|
---|
1807 | </exec>
|
---|
1808 |
|
---|
1809 | <exec executable="make" os="${os.unix}" dir="${gdbm.home}"/>
|
---|
1810 | <exec executable="make" os="${os.unix}" dir="${gdbm.home}">
|
---|
1811 | <arg value="BINOWN=${env.USER}"/>
|
---|
1812 | <arg value="BINGRP=${firstgroup}"/>
|
---|
1813 | <arg value="install"/>
|
---|
1814 | </exec>
|
---|
1815 | </target>
|
---|
1816 |
|
---|
1817 | </project>
|
---|
1818 |
|
---|
1819 |
|
---|