Changeset 23854 for main/trunk/greenstone3/build.xml
- Timestamp:
- 2011-04-05T18:17:51+12:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/build.xml
r23853 r23854 23 23 <!--<taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>--> 24 24 <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/> 25 <taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/> 25 <taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask" classpathref="project.classpath"/> 26 26 27 27 28 <!-- ===================== Property Definitions =========================== --> … … 75 76 <!-- get properties from the environment --> 76 77 <property environment="env"/> 77 78 <!-- uses perl.path if set in build.properties, otherwise try for79 environment variable PERLPATH, and failing that assumes 'perl'80 is on environment PATH -->81 82 <if><bool><isset property="env.PERLPATH"/></bool>83 <property name="perl.path" value="${env.PERLPATH}"/>84 <else>85 <echo>86 Using PATH enviroment variable to locate Perl.87 <exec executable="which" spawn="false" outputproperty="full.perl.path">88 <arg value="perl" />89 </exec>90 <echo>91 <if><equals arg1="${full.perl.path}" arg2="/usr/bin/perl" />92 Non-standard location of Perl found: ${full.perl.path}93 Set the environment variable PERLPATH or the perl.path property in94 build.properties to explicitly control the version of Perl used.95 </echo>96 </else>97 </if>98 99 <!--100 <if><bool><isset property="perl.on.path"/></bool>101 <propertyregex property="perl.path"102 input="perl.on.path"103 regexp=".*([^\/]*)"104 select="\1" />105 </if>106 -->107 108 <!-- full.perl.path is for pretty-printing only, e.g. used in target "start" -->109 <if><bool><isset property="perl.path"/></bool>110 <property name="full.perl.path" value="${perl.path}${file.separator}perl"/>111 <else>112 <property name="full.perl.path" value="perl (will use the enviroment variable PATH to find this executable)"/>113 </else>114 </if>115 78 116 79 <!-- get the filesets defining components and executables --> … … 591 554 description="Update (thru Subversion) all the source (including common-src or collection-building, and runtime), then clean, and re-install. To do this without any SVN updates, run it like 'ant -Dnosvn.mode=yes update'"/> 592 555 593 <target name="start" depends="init,start-tomcat" 556 557 <target name="perl-for-building" depends="init"> 558 <!-- uses perl.path if set in build.properties, otherwise try for 559 environment variable PERLPATH, and failing that assumes 'perl' 560 is on environment PATH --> 561 <if><bool><available file="${build.src.home}"/></bool> 562 563 <if><bool><not><isset property="perl.path"/></not></bool> 564 565 <if> 566 <bool> 567 <and> 568 <isset property="env.PERLPATH"/> 569 <not><equals arg1="${env.PERLPATH}" arg2=""/></not> 570 </and> 571 </bool> 572 <property name="perl.path" value="${env.PERLPATH}"/> 573 <else> 574 <echo> 575 Using PATH enviroment variable to locate Perl. 576 </echo> 577 <exec executable="which" os="${os.unix}" spawn="false" outputproperty="full.perl.path"> 578 <arg value="perl" /> 579 </exec> 580 581 <stringutil string="${full.perl.path}" property="perl.path"> 582 <replace regex="\/[^\/]*$" replacement="" /> 583 </stringutil> 584 585 <if><bool><not><equals arg1="${full.perl.path}" arg2="/usr/bin/perl"/></not></bool> 586 <echo> 587 Non-standard location of Perl found: ${full.perl.path} 588 Set the environment variable PERLPATH or the perl.path property in 589 build.properties to explicitly control the version of Perl used. 590 </echo> 591 </if> 592 </else> 593 </if> 594 </if> 595 596 <!-- full.perl.path is for pretty-printing only, e.g. used in target "start" --> 597 <if><bool><isset property="perl.path"/></bool> 598 <property name="full.perl.path" value="${perl.path}${file.separator}perl"/> 599 <else> 600 <property name="full.perl.path" value="perl (will use the enviroment variable PATH to find this executable)"/> 601 </else> 602 </if> 603 </if> 604 </target> 605 606 <target name="start" depends="init,configure-web,start-tomcat" 594 607 description="Startup the Tomcat server." > 595 608 <echo>${app.name} (${app.version}) server running using Apache Tomcat and Java</echo> … … 845 858 </target> 846 859 847 <target name="configure-web" depends="init "860 <target name="configure-web" depends="init,perl-for-building" 848 861 description="Configure only the web app config files"> 849 862 <!-- we want a unix path in the global.properties file --> … … 855 868 <filter token="tomcat.server" value="${tomcat.server}"/> 856 869 <filter token="tomcat.port" value="${tomcat.port}"/> 870 <filter token="perlpath" value="${perl.path}"/> 857 871 <copy file="${basedir}/resources/java/global.properties.in" tofile="${web.classes}/global.properties" filtering="true" overwrite="true"/> 858 872 <copy file="${basedir}/resources/java/log4j.properties.in" tofile="${web.classes}/log4j.properties" filtering="true" overwrite="true"/> … … 999 1013 </target> 1000 1014 1015 1016 1001 1017 <!-- Another way: http://ptrthomas.wordpress.com/2006/03/25/how-to-start-and-stop-tomcat-from-ant/ --> 1002 1018 <target name="start-tomcat" description="Startup only Tomcat" depends="init" if="tomcat.islocal"> … … 1007 1023 <!--<env key="GSDLOS" value="linux"/> do we need this?? --> 1008 1024 <env key="GSDL3HOME" value="${basedir}"/> 1009 <env key="PERLPATH" value="${perl.path}"/>1010 1025 <env key="PATH" path="${tomcat.path}"/> 1011 1026 <env key="CATALINA_OPTS" value="${catalina.opts}"/> … … 1019 1034 <env key="GSDLOS" value="windows"/> 1020 1035 <env key="GSDL3HOME" value="${basedir}"/> 1021 <env key="PERLPATH" value="${perl.path}"/>1022 1036 <env key="Path" path="${tomcat.path}"/> 1023 1037 <env key="PATH" path="${tomcat.path}"/>
Note:
See TracChangeset
for help on using the changeset viewer.