Changeset 15191
- Timestamp:
- 2008-04-14 16:20:45 (5 months ago)
- Files:
-
- greenstone3/branches/customizingGreenstone3/README-CVS.txt (deleted)
- greenstone3/branches/customizingGreenstone3/README-SVN.txt (copied) (copied from greenstone3/trunk/README-SVN.txt)
- greenstone3/branches/customizingGreenstone3/README.txt (modified) (4 diffs)
- greenstone3/branches/customizingGreenstone3/bin/script/convert_coll_from_gs2.pl (modified) (22 diffs)
- greenstone3/branches/customizingGreenstone3/bin/search4j (copied) (copied from greenstone3/trunk/bin/search4j)
- greenstone3/branches/customizingGreenstone3/build.properties (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/build.xml (copied) (copied from greenstone3/trunk/build.xml) (55 diffs)
- greenstone3/branches/customizingGreenstone3/dist-resources/convert-build-xml-source.xsl (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/dist-resources/convert-build-xml.xsl (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/docs/manual/manual.tex (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/gs3-server.bat (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/gs3-server.sh (modified) (3 diffs)
- greenstone3/branches/customizingGreenstone3/gs3-setup.bat (modified) (3 diffs)
- greenstone3/branches/customizingGreenstone3/gs3-setup.sh (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/lib/java/AntelopeTasks_3.4.2.jar (copied) (copied from greenstone3/trunk/lib/java/AntelopeTasks_3.4.2.jar)
- greenstone3/branches/customizingGreenstone3/resources/java/global.properties.in (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/resources/tomcat/setclasspath.bat (modified) (2 diffs)
- greenstone3/branches/customizingGreenstone3/resources/tomcat/setclasspath.sh (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/action/QueryAction.java (modified) (3 diffs)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/core/MessageRouter.java (modified) (29 diffs)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/core/Receptionist.java (modified) (2 diffs)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/service/AbstractGS2FieldSearch.java (modified) (2 diffs)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/service/AbstractSearch.java (modified) (2 diffs)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/service/GS2MGPPSearch.java (modified) (2 diffs)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/service/GS2MGRetrieve.java (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/service/GoogleNgramMGPPSearch.java (copied) (copied from greenstone3/trunk/src/java/org/greenstone/gsdl3/service/GoogleNgramMGPPSearch.java)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/sql (copied) (copied from greenstone3/trunk/src/java/org/greenstone/gsdl3/sql)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/sql/DatabaseFactory.java (copied) (copied from greenstone3/trunk/src/java/org/greenstone/gsdl3/sql/DatabaseFactory.java)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/sql/MetadataDBWrapper.java (copied) (copied from greenstone3/trunk/src/java/org/greenstone/gsdl3/sql/MetadataDBWrapper.java)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/sql/SQLServer.java (copied) (copied from greenstone3/trunk/src/java/org/greenstone/gsdl3/sql/SQLServer.java)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/sql/SQLStatements.java (copied) (copied from greenstone3/trunk/src/java/org/greenstone/gsdl3/sql/SQLStatements.java)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/sql/derby (copied) (copied from greenstone3/trunk/src/java/org/greenstone/gsdl3/sql/derby)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/sql/derby/DerbyDBWrapper.java (copied) (copied from greenstone3/trunk/src/java/org/greenstone/gsdl3/sql/derby/DerbyDBWrapper.java)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/sql/derby/DerbySQLServer.java (copied) (copied from greenstone3/trunk/src/java/org/greenstone/gsdl3/sql/derby/DerbySQLServer.java)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/util/GDBMWrapper.java (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/util/GSFile.java (modified) (2 diffs)
- greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/util/GSXML.java (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/web/WEB-INF/classes/AbstractGS2FieldSearch.properties (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/web/WEB-INF/classes/AbstractSearch.properties (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/web/WEB-INF/web.xml (modified) (5 diffs)
- greenstone3/branches/customizingGreenstone3/web/index.html (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/web/interfaces/classic/transform/pref.xsl (modified) (2 diffs)
- greenstone3/branches/customizingGreenstone3/web/interfaces/classic/transform/query-common.xsl (modified) (1 diff)
- greenstone3/branches/customizingGreenstone3/winutil/search4j.exe (copied) (copied from greenstone3/trunk/winutil/search4j.exe)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
greenstone3/branches/customizingGreenstone3/README.txt
r13856 r15191 21 21 See 'Installing from a Source Distribution' section below for extra notes about installing from Source. 22 22 23 See the README- CVS.txt file for extra notes about installing from CVS.23 See the README-SVN.txt file for extra notes about installing directly from SVN. 24 24 25 25 Running Greenstone: 26 26 --------------------------------------------------------- 27 27 28 To start up Greenstone, select Greenstone 2Digital Library from the Start menu (Windows), or run gs3-server.sh/bat. This launches a small server program, which starts up Tomcat and launches a browser. A small window pops up which allows you to chnage some settings for your library and restart the Tomcat server. Closing this program will stop Tomcat running.28 To start up Greenstone, select Greenstone3 Digital Library from the Start menu (Windows), or run gs3-server.sh/bat. This launches a small server program, which starts up Tomcat and launches a browser. A small window pops up which allows you to chnage some settings for your library and restart the Tomcat server. Closing this program will stop Tomcat running. 29 29 30 30 Alternatively, you can start Tomcat directly through using Ant. 'ant start', 'ant restart' and 'ant stop' starts, restarts and shuts down Tomcat, respectively. This will only start/stop a local server (one installed by Greenstone). You will need to manually start/stop an external Tomcat (see below for notes about using a version of Tomcat external to Greenstone). … … 39 39 You need to have Perl installed and on your PATH. Perl is included as part of 40 40 the Windows binary distribution. 41 run 'ant gli", or cd to greenstone3/gli and run gli4gs3.sh/bat. This is a 42 graphical tool for building collections. Once you have created and built a 43 collection, you can see it by clicking 'Preview collection' on the Build panel. 41 You can build collections using the Greenstone Librarian Interface (GLI). To start GLI, run 'ant gli", or cd to greenstone3/gli and run gli4gs3.sh/bat. 42 Once you have created and built a collection, you can see it by clicking 'Preview collection' on the Build panel. 44 43 45 44 Note that GLI doesn't start up the Greenstone Tomcat server so you should … … 141 140 Download the greenstone-3.xx-src.tar.gz package from sourceforge.net/projects/greenstone3, and unpack it. 142 141 In the greenstone3 directory, edit the build.properties file and run 143 ant prepareinstall142 ant install 144 143 145 144 Tomcat will be installed as part of the prepare process. To stop this set the tomcat.installed.path to be the root of an existing Tomcat installation. … … 181 180 To recompile your Greenstone3 installation, in the top level greenstone3 directory, run: 182 181 182 ant clean (use distclean instead if you want to regenerate the C++ Makefiles) 183 183 ant configure 184 184 ant configure-c++ 185 ant clean186 185 ant compile 187 186 greenstone3/branches/customizingGreenstone3/bin/script/convert_coll_from_gs2.pl
r13917 r15191 128 128 my $collwriter = new XML::Writer(OUTPUT => $colloutput, NEWLINES => 1); 129 129 130 $collwriter->startTag(' collectionConfig', 'xmlns:gsf'=>"http://www.greenstone.org/greenstone3/schema/ConfigFormat", 'xmlns:xsl'=>'http://www.w3.org/1999/XSL/Transform');130 $collwriter->startTag('CollectionConfig', 'xmlns:gsf'=>"http://www.greenstone.org/greenstone3/schema/ConfigFormat", 'xmlns:xsl'=>'http://www.w3.org/1999/XSL/Transform'); 131 131 132 132 #output the collection metadata to the collectionConfig file … … 134 134 135 135 my $creator = $collectcfg->{'creator'}; 136 &output_metadata($collwriter, 'creator', $creator);136 &output_metadata($collwriter,'default', 'creator', $creator); 137 137 my $public =$collectcfg->{'public'}; 138 &output_metadata($collwriter, 'public', $public); 138 &output_metadata($collwriter,'default', 'public', $public); 139 139 140 $collwriter->endTag('metadataList'); 140 141 … … 169 170 my $numdocs = $buildcfg->{'numdocs'}; 170 171 $buildwriter->startTag('metadataList'); 171 &output_metadata($buildwriter, 'numDocs', $numdocs);172 &output_metadata($buildwriter, 'buildType', $buildtype);172 &output_metadata($buildwriter,'', 'numDocs', $numdocs); 173 &output_metadata($buildwriter,'', 'buildType', $buildtype); 173 174 $buildwriter->endTag('metadataList'); 174 175 … … 191 192 $indexmap->{$k} = $v; 192 193 push @indexlist, $k; 193 if ($first ) {194 $defaultindex = $ v;194 if ($first == 1) { 195 $defaultindex = $k; 195 196 $first = 0; 196 197 } … … 202 203 if (defined $collectcfg->{'defaultindex'}) { 203 204 $defaultindex = $collectcfg->{'defaultindex'}; 204 $defaultindex = $indexmap->{$defaultindex};205 #$defaultindex = $indexmap->{$defaultindex}; 205 206 } 206 207 … … 209 210 my @levellist = (); 210 211 my $default_search_level = ""; 212 my $default_search_level_shortname = ""; 211 213 my $default_retrieve_level = "Sec"; 212 214 $first = 1; … … 219 221 push @levellist, $k; 220 222 if ($first) { 221 $default_search_level = $v; 223 $default_search_level = $k; 224 $default_search_level_shortname = $v; 222 225 $first = 0; 223 226 } … … 227 230 if (defined $collectcfg->{'defaultlevel'}) { 228 231 $default_search_level = $collectcfg->{'defaultlevel'}; 229 $default_search_level = $levelmap->{$default_search_level}; 232 #$default_search_level = $levelmap->{$default_search_level}; 233 $default_search_level_shortname = $levelmap->{$default_search_level}; 230 234 } 231 235 if (defined $buildcfg->{'textlevel'}) { … … 237 241 238 242 #output the search stuff to coll cfg 239 $collwriter->startTag('search' );243 $collwriter->startTag('search','type'=>$buildtype); 240 244 foreach my $i (keys %$indexmap) { 241 245 $collwriter->startTag('index', 'name'=>$i); … … 244 248 foreach my $lang (keys %{$collectionmeta->{$indexdisplay}}) { 245 249 my $value = $collectionmeta->{$indexdisplay}->{$lang}; 246 output_display($collwriter, 'name', $lang, $ value);250 output_display($collwriter, 'name', $lang, $i); 247 251 } 248 252 $collwriter->endTag('index'); 253 } 254 255 #output the defaultIndex to coll cfg 256 $collwriter->emptyTag('defaultIndex','name'=>$defaultindex); 257 258 #indexSubcollection 259 my $indexsubcollections = $collectcfg->{'indexsubcollections'}; 260 261 if (defined $indexsubcollections) { 262 my $indexsubcollections_t= $collectcfg->{'indexsubcollections'}; 263 foreach my $i ( @$indexsubcollections_t) { 264 $collwriter->startTag('indexSubcollection', 'name'=>$i); 265 &output_display($collwriter, 'name', $defaultlang, $i); 266 $collwriter->endTag('indexSubcollection'); 267 } 268 } 269 270 #subcollection 271 my $subcollection = $collectcfg->{'subcollection'}; 272 if (defined $subcollection){ 273 foreach my $entry (keys %$subcollection){ 274 my $value = $subcollection->{$entry}; 275 $collwriter->emptyTag('subcollection','filter'=>$value,'name'=>$entry); 276 } 277 } 278 279 #indexlanguage 280 my $languages = $collectcfg->{'languages'}; 281 if (defined $languages){ 282 my $languages_t = $collectcfg->{'languages'}; 283 foreach my $i (@$languages_t){ 284 $collwriter->startTag('indexLanguage','name'=>$i); 285 &output_display($collwriter, 'name', $defaultlang, $i); 286 $collwriter->endTag('indexLanguage'); 287 } 249 288 } 250 289 … … 261 300 $collwriter->endTag('level'); 262 301 } 263 } 302 $collwriter->emptyTag('defaultLevel', 'name'=>$default_search_level); 303 } 304 305 # add in the search type 306 if (defined $format->{'SearchTypes'}){ 307 $collwriter->startTag('format', 'name'=>"searchType"); 308 $collwriter->charactersXML($format->{'SearchTypes'}); 309 $collwriter->endTag('format'); 310 } 311 264 312 # add in the format stuff 265 313 if (defined $format->{'SearchVList'}) { … … 276 324 277 325 $collwriter->endTag('search'); 278 326 327 # import plugins 328 329 my $plugins = $collectcfg->{'plugin'}; 330 331 if (defined $plugins){ 332 $collwriter->startTag('import'); 333 $collwriter->startTag('pluginList'); 334 foreach my $pl (@$plugins) { 335 my ($pluginname) = @$pl[0]; 336 $collwriter->startTag('plugin','name'=>$pluginname); 337 338 for (my $i=1; $i<scalar(@$pl); $i++) { 339 my $arg =@$pl[$i]; 340 if ($arg =~ /^-/){ 341 my $option_name=@$pl[$i]; 342 my $option_value=@$pl[$i+1]; 343 if (defined $option_value){ 344 if ($option_value =~ /^-/){ 345 $collwriter->startTag('option','name'=>$option_name); 346 $collwriter->endTag('option'); 347 }else{ 348 $collwriter->startTag('option','name'=>$option_name,'value'=>$option_value); 349 $collwriter->endTag('option'); 350 } 351 } 352 } 353 } 354 $collwriter->endTag('plugin'); 355 } 356 $collwriter->endTag('pluginList'); 357 $collwriter->endTag('import'); 358 } 359 279 360 $buildwriter->startTag('serviceRackList'); 280 361 … … 288 369 } 289 370 371 #indexSubcollectionList 372 373 my $subcollectionmap = $buildcfg->{'subcollectionmap'}; 374 my $firstsubcollection = 1; 375 my $defaultsubcollection = ""; 376 my @subcollist; 377 my $subcolmap = {}; 378 379 if (defined $buildcfg->{'subcollectionmap'}) { 380 my $subcolmap_t = $buildcfg->{'subcollectionmap'}; 381 382 foreach my $l (@$subcolmap_t) { 383 my @pair = split(/->/, $l); 384 $subcolmap->{$pair[0]} = $pair[1]; 385 push @subcollist, $pair[0]; 386 if ($firstsubcollection==1) { 387 $defaultsubcollection = $pair[1]; 388 $firstsubcollection = 0; 389 } 390 } 391 392 } 393 394 290 395 #do the retrieve service 291 396 $buildwriter->startTag('serviceRack', 'name'=>"GS2".$service_type."Retrieve"); … … 294 399 } elsif ($buildtype eq "mg") { 295 400 $buildwriter->emptyTag('defaultIndex', 'shortname'=>$defaultindex); 296 297 } 401 } 402 403 if ((defined $defaultsubcollection) && ($defaultsubcollection ne "")) { 404 $buildwriter->emptyTag('defaultIndexSubcollection', 'shortname'=>$defaultsubcollection); 405 } 406 298 407 if (defined $indexstem) { 299 408 $buildwriter->emptyTag('indexStem', 'name'=>$indexstem); … … 362 471 if ($horizontalAtTop) { 363 472 $buildwriter->emptyTag('classifier', 'name'=>$name, 'content'=>$content, 'horizontalAtTop'=>'true'); 473 364 474 } else { 365 475 $buildwriter->emptyTag('classifier', 'name'=>$name, 'content'=>$content); … … 367 477 368 478 369 $collwriter->startTag('classifier', 'name'=>$name); 479 # $collwriter->startTag('classifier', 'name'=>$name); 480 $collwriter->startTag('classifier', 'name'=>$classname); 481 for (my $i=1; $i<scalar(@$cl); $i++) { 482 my $arg =@$cl[$i]; 483 if ($arg =~ /^-/){ 484 my $option_name=@$cl[$i]; 485 my $option_value=@$cl[$i+1]; 486 if (defined $option_value){ 487 if ($option_value=~ /^-/){ 488 $collwriter->startTag('option','name'=>$option_name); 489 $collwriter->endTag('option'); 490 }else{ 491 $collwriter->startTag('option','name'=>$option_name,'value'=>$option_value); 492 $collwriter->endTag('option'); 493 } 494 } 495 } 496 } 497 370 498 my $vlist = $name."VList"; 371 499 my $hlist = $name."HList"; … … 411 539 # do the search service 412 540 $buildwriter->startTag('serviceRack', 'name'=>'GS2'.$service_type.'Search'); 413 $buildwriter->emptyTag('defaultIndex', 'shortname'=>$defaultindex);541 #$buildwriter->emptyTag('defaultIndex', 'shortname'=>$defaultindex); 414 542 $buildwriter->startTag('indexList'); 415 543 #for each index … … 444 572 445 573 # level info 446 $buildwriter->emptyTag('defaultLevel', 'shortname'=>$default_search_level );574 $buildwriter->emptyTag('defaultLevel', 'shortname'=>$default_search_level_shortname); 447 575 $buildwriter->emptyTag('defaultGDBMLevel', 'shortname'=>$default_retrieve_level); 448 576 $buildwriter->startTag('levelList'); … … 474 602 } 475 603 476 477 604 #indexLanguageList 605 my $indexlanguages = $collectcfg->{'languages'}; 606 my $firstindexlanguage = 1; 607 my $defaultindexlanguage_shortname; 608 if (defined $indexlanguages){ 609 $buildwriter->startTag('indexLanguageList'); 610 my $languages_t = $collectcfg->{'languages'}; 611 foreach my $i (@$languages_t){ 612 $buildwriter->startTag('indexLanguage','name'=>$i); 613 &output_display($buildwriter, 'name', $i, $i); 614 $buildwriter->endTag('indexLanguage'); 615 if ($firstindexlanguage==1){ 616 $defaultindexlanguage_shortname = $i; 617 $firstindexlanguage=0; 618 } 619 } 620 $buildwriter->endTag('indexLanguageList'); 621 $buildwriter->startTag('defaultIndexLanguage', 'name'=>$defaultindexlanguage_shortname,'shortname'=>$defaultindexlanguage_shortname); 622 $buildwriter->endTag('defaultIndexLanguage'); 623 } 624 625 # my $defaultsubcollection = ""; 626 # my @subcollist; 627 628 if (scalar(@subcollist)>0){ 629 630 $buildwriter->startTag('indexSubcollectionList'); 631 foreach my $i (keys %$subcolmap){ 632 my $short_name = $subcolmap->{$i}; 633 $buildwriter->emptyTag('indexSubcollection', 'name'=>$i, 'shortname'=>$short_name); 634 } 635 636 $buildwriter->endTag('indexSubcollectionList'); 637 $buildwriter->emptyTag('defaultIndexSubcollection', 'shortname'=>$defaultsubcollection); 638 } 639 640 478 641 $buildwriter->endTag('serviceRack'); 479 642 … … 484 647 # collection 485 648 $collwriter->emptyTag('replaceListRef', 'id'=>'gs2-standard'); 486 $collwriter->endTag(' collectionConfig');649 $collwriter->endTag('CollectionConfig'); 487 650 $collwriter->end(); 488 651 $buildwriter->end(); … … 494 657 495 658 sub output_metadata { 496 my ($writer, $metaname, $metavalue) = @_; 497 $writer->startTag('metadata', 'name'=>$metaname); 659 my ($writer, $lang, $metaname, $metavalue) = @_; 660 $lang = 'en' if $lang eq 'default'; 661 if ($lang ne ""){ 662 $writer->startTag('metadata', 'lang'=>$lang, 'name'=>$metaname); 663 }else{ 664 $writer->startTag('metadata', 'name'=>$metaname); 665 } 498 666 $writer->characters($metavalue); 499 667 $writer->endTag('metadata'); … … 506 674 ($lang) = $lang =~ /\[l=(.*)\]/; 507 675 } 676 508 677 $writer->startTag('displayItem', 'name'=>$name, 'lang'=>$lang); 509 678 $writer->characters($value); greenstone3/branches/customizingGreenstone3/build.properties
r13615 r15191 50 50 ## Mac OS X specific stuff 51 51 # set the path to your GDBM here 52 gdbm.installed.path= 52 #install.gdbm=true 53 #gdbm.installed.path=${gdbm.home} 54 55 ##Flax stuff## 56 ##uncomment if you want to install flax 57 #install.flax=true greenstone3/branches/customizingGreenstone3/build.xml
r15038 r15191 1 1 <?xml version="1.0"?> 2 3 2 <!-- ====================================================================== 4 3 March 2005 5 4 6 5 Greenstone3 build and install script 7 6 8 7 kjdon 9 8 ====================================================================== --> 10 9 <project name="greenstone3" default="usage" basedir="."> 11 10 12 <!-- ============ classpath =================== --> 13 <path id="project.classpath"> 14 <fileset dir="lib/java"> 15 <include name="**/*.jar"/> 16 </fileset> 17 </path> 18 19 <!-- ============ self defined tasks =================== --> 20 21 <taskdef name="mysetproxy" classname="org.greenstone.anttasks.MySetProxy" classpath="${basedir}/lib/java/anttasks.jar"/> 22 <taskdef name="getuserandpassword" classname="org.greenstone.anttasks.MyGetUserAndPassword" classpath="${basedir}/lib/java/anttasks.jar"/> 23 <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/> 24 <taskdef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpath="${basedir}/lib/java/anttasks.jar"/> 25 26 <!-- ===================== Property Definitions =========================== --> 27 28 <!-- 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 29 30 30 Each of the following properties are used in the build script. … … 35 35 36 36 * Definitions from a "build.properties" file in the top level 37 source directory of this application.37 source directory of this application. 38 38 39 39 * Definitions from a "build.properties" file in the user's 40 home directory.40 home directory. 41 41 42 42 * Default definitions in this build.xml file. … … 48 48 "build.properties" files as well as in the "build.xml" script. 49 49 50 --> 51 50 --> 51 52 53 <!--the first two 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"/> 52 56 <property file="build.properties"/> 53 57 <property file="${user.home}/build.properties"/> … … 55 59 <!-- get properties from the environment --> 56 60 <property environment="env"/> 61 62 63 <!-- version properties for external packages --> 64 <property name="tomcat.version" value="apache-tomcat-5.5.25"/> 65 <property name="axis.zip.version" value="axis-bin-1_2_1.zip"/> 66 <property name="axis.dir.version" value="axis-1_2_1"/> 67 <property name="gdbm.version" value="gdbm-1.8.3"/> 68 57 69 <property name="build.home" value="${basedir}/build"/> 58 70 <property name="src.home" value="${basedir}/src/java"/> 59 <property name="src.packages.home" value="${basedir}/src/packages"/>60 71 <property name="packages.home" value="${basedir}/packages"/> 61 72 <!-- this may be set in build.properties, eg if you move the web dir to … … 68 79 <!-- other files needed by the servlet go here --> 69 80 <property name="web.classes" value="${web.home}/WEB-INF/classes"/> 81 <!--- flax: the WordNet home --> 82 <property name="wn.home" value="${web.home}/WEB-INF/classes/flax/WordNet"/> 83 70 84 <!-- jni libraries and java wrappers go here --> 71 85 <property name="lib.jni" value="${basedir}/lib/jni"/> 72 86 73 87 <property name="javadocs" value="${basedir}/docs/javadoc"/> 74 88 … … 77 91 78 92 79 <!-- version number stuff --> 80 81 <!-- app.version defaults to trunk --> 82 <condition property="app.version" value="trunk"> 83 <not><isset property="app.version"/></not> 84 </condition> 85 86 <!-- determine the 'branch path' --> 87 <condition property="branch.path" value="trunk"> 88 <equals arg1="${app.version}" arg2="trunk" /> 89 </condition> 90 <condition property="branch.path" value="branches/${app.version}"> 91 <not><equals arg1="${app.version}" arg2="trunk" /></not> 92 </condition> 93 94 93 <!-- defaults - set these on the command line or in build.properties or they will take these default values--> 94 <property name="app.version" value="trunk"/> 95 <property name="branch.path" value="trunk"/> 96 <property name="branch.revision" value="HEAD"/> 97 98 <!--constants --> 95 99 <property name="flax.svn.root" value="http://svn.greenstone.org/flax"/> 96 97 100 <property name="svn.root" value="http://svn.greenstone.org"/> 98 <!-- <property name="cvs.root" value=":pserver:cvs_anon@cvs.scms.waikato.ac.nz:2402/usr/local/global-cvs/gsdl-src"/> --> 101 102 <!-- <property name="cvs.root" value=":pserver:cvs_anon@cvs.scms.waikato.ac.nz:2402/usr/local/global-cvs/gsdl-src"/> --> 99 103 <!-- catalina home is set to tomcat basedir is already installed, otherwise 100 104 use greenstone's tomcat --> … … 159 163 <isset property="disable.collection.building"/> 160 164 </condition> 161 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 162 173 <!-- ============= Base dirs for each package and component ============ --> 163 174 <property name="src.applet.home" value="${src.home}/org/greenstone/applet"/> … … 167 178 <property name="gli.home" value="${basedir}/gli"/> 168 179 <property name="javagdbm.home" value="${src.packages.home}/javagdbm"/> 169 <property name="gdbm.home" value="${src.packages.home}/gdbm-1.8.3"/> 170 180 171 181 <!--<property name="indexers.home" value="${basedir}/src/packages/indexers">--> 172 182 <condition property="indexers.home" value="${basedir}/src/packages/indexers"> … … 184 194 185 195 186 <!-- ==================== Compilation Control Options ==================== -->187 188 <!--196 <!-- ==================== Compilation Control Options ==================== --> 197 198 <!-- 189 199 190 200 These properties control option settings on the Javac compiler when it … … 197 207 compile.optimize Should compilation include the optimize option? 198 208 199 -->209 --> 200 210 201 211 <property name="compile.debug" value="true"/> … … 203 213 <property name="compile.optimize" value="true"/> 204 214 205 <!--215 <!-- 206 216 207 217 Rather than relying on the CLASSPATH environment variable, Ant includes … … 212 222 that you explicitly added. 213 223 214 -->224 --> 215 225 216 226 <path id="compile.classpath"> … … 228 238 <!-- Include the axis jar files --> 229 239 <!--<fileset dir="${basedir}/comms/soap/axis/lib"> 230 <include name="*.jar"/>231 </fileset>-->240 <include name="*.jar"/> 241 </fileset>--> 232 242 233 243 <!-- include the jar files from the source packages --> … … 265 275 <pathelement path="${env.PATH}"/> 266 276 <pathelement path="${env.Path}"/> 277 <pathelement path="${wn.home}/bin"/> 267 278 </path> 268 279 … … 275 286 <echo>os.unix: ${os.unix}</echo> 276 287 </target> 277 <!-- ==================== Primary and Global Targets ============================= -->288 <!-- ==================== Primary and Global Targets ============================= --> 278 289 279 290 <!-- add comments about using xxx-core, xxx-packages if only want certain parts?? --> 280 291 281 <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections,prepare-gdbm "292 <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" 282 293 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."> 283 <!-- <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections"294 <!-- <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections" 284 295 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.">--> 285 296 … … 293 304 description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare install'."/> 294 305 295 <!-- <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web"296 description="Do a cvs update for all sources. Doesn't recompile the code. You need to be online to run this."/>-->306 <!-- <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web" 307 description="Do a cvs update for all sources. Doesn't recompile the code. You need to be online to run this."/>--> 297 308 <target name="svnupdate" depends="init,svnupdate-packages,svnupdate-core,svnupdate-gs2building,svnupdate-web" 298 309 description="Do a `svn update` for all sources. Doesn't recompile the code. You need to be online to run this."/> … … 305 316 description="Configure the installation. Includes setting up config files. Should be re-run if you change the build.properties file."/> 306 317 307 <target name="clean" depends="init,clean- gdbm,clean-packages,clean-core,clean-gs2building"318 <target name="clean" depends="init,clean-packages,clean-core,clean-gs2building,clean-gdbm" 308 319 description="Remove all old compiled code. Includes core, packages and gs2building if necessary"/> 320 321 <target name="distclean" depends="init,distclean-packages,clean-core,distclean-gs2building,distclean-gdbm" 322 description="Remove all compiled code and also any Makefiles etc generated during configure-c++. Includes core, packages, gs2building as necessary"/> 309 323 310 324 <target name="compile" depends="init,compile-web,compile-packages,compile-core,compile-gs2building" 311 325 description="Compile all the source code, includes core, packages and gs2building if necessary. Copy jar files and executables to their correct places."/> 312 326 313 327 <target name="update" depends="init,svnupdate,clean,configure,configure-c++,compile" 314 description="Update (thru Subversion) all the source (including core, packages and gs2building), then clean, configure and recompile. "/>328 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'"/> 315 329 316 330 <target name="start" depends="init,start-tomcat" 317 331 description="Startup the Tomcat server." > 318 <echo>${app.name} (${app.version}) server running using Apache Tomcat and Java</echo>319 <echo>Tomcat: ${catalina.home}</echo>320 <echo>Java: ${java.home}</echo>321 <echo>URL: http://${tomcat.server}:${tomcat.port}${app.path}/</echo>322 <!-- assuming that index.html is not needed here -->332 <echo>${app.name} (${app.version}) server running using Apache Tomcat and Java</echo> 333 <echo>Tomcat: ${catalina.home}</echo> 334 <echo>Java: ${java.home}</echo> 335 <echo>URL: http://${tomcat.server}:${tomcat.port}${app.path}/</echo> 336 <!-- assuming that index.html is not needed here --> 323 337 </target> 324 338 … … 329 343 330 344 331 <!-- =========== Help targets =================================== -->345 <!-- =========== Help targets =================================== --> 332 346 333 347 <property name="install-command" value="ant [options] prepare install"/> … … 337 351 <echo message=" Execute 'ant -help' for Ant help."/> 338 352 <echo>To install Greenstone3, run '${install-command}'. 339 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.340 To log the output, use the '-logfile build.log' option.341 The README.txt file has more information about the ant targets and install process.353 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. 354 To log the output, use the '-logfile build.log' option. 355 The README.txt file has more information about the ant targets and install process. 342 356 </echo> 343 357 </target> … … 349 363 </target> 350 364 351 <!-- ====== initialization and setup targets ================== -->365 <!-- ====== initialization and setup targets ================== --> 352 366 353 367 <target name="accept-properties" unless="properties.accepted"> 354 368 <input addproperty="properties.ok" validargs="y,n">The following properties (among others) are being used from a build.properties file found in this directory: 355 tomcat.server=${tomcat.server}356 tomcat.port=${tomcat.port}357 tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed)358 proxy.host=${proxy.host}359 proxy.port=${proxy.port}360 If these are not acceptable, please change them and rerun this target. Continue [y/n]? />369 tomcat.server=${tomcat.server} 370 tomcat.port=${tomcat.port} 371 tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed) 372 proxy.host=${proxy.host} 373 proxy.port=${proxy.port} 374 If these are not acceptable, please change them and rerun this target. Continue [y/n]? /> 361 375 </input> 362 376 <condition property="do.abort"> … … 366 380 </target> 367 381 368 <!-- <target name="check-cvsroot">369 <condition property="svnroot.notset">370 <or>371 <not>372 <isset property="env.CVSROOT"/>373 </not>374 <equals arg1="" arg2="${env.CVSROOT}"/>375 </or>376 </condition>377 <fail if="cvsroot.notset" message="You need to set the CVSROOT variable"/>378 </target> -->379 382 380 383 <!-- this sets up some initial properties --> … … 403 406 </condition> 404 407 405 <echo>tomcat.port = ${tomcat.port}</echo>406 <echo>gli.present = ${gli.present}</echo>407 <echo>gs2build.present = ${gs2build.present}</echo>408 <echo>gsdl2.installed.path = ${gsdl2.installed.path}</echo>409 <!-- gsdl2.installed.path appears not to be set? -->408 <echo>tomcat.port = ${tomcat.port}</echo> 409 <echo>gli.present = ${gli.present}</echo> 410 <echo>gs2build.present = ${gs2build.present}</echo> 411 <echo>gsdl2.installed.path = ${gsdl2.installed.path}</echo> 412 <!-- gsdl2.installed.path appears not to be set? --> 410 413 411 414 <condition property="proxy.present"> … … 438 441 <mysetproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/> 439 442 </target> 440 441 <!-- ========== Web app Targets ================================ -->443 444 <!-- ========== Web app Targets ================================ --> 442 445 443 446 <target name="prepare-web" depends="init,configure-java-version"> … … 446 449 </target> 447 450 448 <!-- 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 -->451 <!-- 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 --> 449 452 <target name="configure-java-version" depends="init" 450 description="Run this target if you have changed the default version of java since installing greenstone3"> 453 description="Activates or deactivates some jar libraries as needed depending on your java version"> 454 455 <available property="have.xalan.jar" file="${web.lib}/xalan.jar"/> 451 456 <condition property="need.xalan.jar"> 452 <equals arg1="1.5" arg2="${ant.java.version}"/> 457 <or> 458 <equals arg1="1.5" arg2="${ant.java.version}"/> 459 <equals arg1="1.6" arg2="${ant.java.version}"/> 460 </or> 453 461 </condition> 454 <antcall target="activate-xalan-jar"/> 455 <antcall target="deactivate-xalan-jar"/> 456 </target> 457 458 <target name="activate-xalan-jar" if="need.xalan.jar"> 462 463 <!-- if they have xalan.jar but dont need it --> 464 <if> 465 <bool> 466 <and> 467 <isset property="have.xalan.jar"/> 468 <not><isset property="need.xalan.jar"/></not> 469 </and> 470 </bool> 471 <antcall target="deactivate-xalan-jar"/> 472 </if> 473 474 <!-- if they need xalan.jar but dont have it --> 475 <if> 476 <bool> 477 <and> 478 <not><isset property="have.xalan.jar"/></not> 479 <isset property="need.xalan.jar"/> 480 </and> 481 </bool> 482 <antcall target="activate-xalan-jar"/> 483 </if> 484 485 </target> 486 487 <target name="activate-xalan-jar"> 488 <echo>activating xalan.jar</echo> 459 489 <copy file="${web.lib}/xalan.jar.tmp" tofile="${web.lib}/xalan.jar"/> 460 <antcall target="copy-xalan-for-mac" /> 461 </target> 462 463 <target name="copy-xalan-for-mac" if="current.os.ismac"> 464 <copy file="${web.lib}/xalan.jar.tmp" tofile="${tomcat.installed.path}/common/endorsed/xalan.jar"/> 465 </target> 466 467 <target name="deactivate-xalan-jar" unless="need.xalan.jar"> 490 <if><bool><isset property="current.os.ismac"/></bool> 491 <copy file="${web.lib}/xalan.jar.tmp" tofile="${catalina.home}/common/endorsed/xalan.jar"/>
