[16173] | 1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
| 2 | <project name="rk-init">
|
---|
| 3 |
|
---|
| 4 | <!-- load in static properties from build.properties -->
|
---|
| 5 | <property file="build.properties" />
|
---|
| 6 |
|
---|
[16199] | 7 | <!-- CONSTANTS (overridable in build.properties) -->
|
---|
| 8 |
|
---|
[16173] | 9 | <!-- svn root -->
|
---|
[16199] | 10 | <property name="svn.root" value="http://svn.greenstone.org" />
|
---|
[16173] | 11 |
|
---|
[16199] | 12 | <!-- default revision and branch path -->
|
---|
| 13 | <property name="branch.path" value="trunk" />
|
---|
| 14 | <property name="branch.revision" value="HEAD" />
|
---|
| 15 |
|
---|
[16174] | 16 | <!-- the minimum version of java which the installer should be run with (this gets used in search4j) -->
|
---|
[16173] | 17 | <property name="java.min.version" value="1.4.0_00"/>
|
---|
| 18 |
|
---|
[16199] | 19 | <!-- create a localised basedir property -->
|
---|
| 20 | <path id="basedir.path"><pathelement location="${basedir}"/></path>
|
---|
| 21 | <property name="basedir.local" refid="basedir.path"/>
|
---|
| 22 |
|
---|
[16681] | 23 | <!-- current date and time -->
|
---|
| 24 | <tstamp>
|
---|
| 25 | <format property="current.month" pattern="MMM"/>
|
---|
| 26 | <format property="current.year" pattern="yyyy"/>
|
---|
| 27 | </tstamp>
|
---|
[16199] | 28 |
|
---|
[16174] | 29 | <!-- BUNDLED JAVA INFO -->
|
---|
[16199] | 30 | <!-- the bundled javas are kept in shared/linux/wrapper and shared/windows/wrapper in the repository -->
|
---|
[16174] | 31 | <!-- change this info when the bundled version changes -->
|
---|
[16199] | 32 | <!-- linux -->
|
---|
[16174] | 33 | <property name="linux-java.installer" value="jre_6u5_tar_gz"/>
|
---|
[17297] | 34 | <property name="bundled.version.linux-java" value="1.6.0_05"/> <!-- set this to the version number of java in the above archive -->
|
---|
[16174] | 35 | <property name="linux-java.extracted" value="jre1.6.0_05"/> <!-- set this to the name of the top level directory in the above archive -->
|
---|
[17297] | 36 | <property name="component.size.linux-java" value="97 MB"/> <!-- set this to the size of the extract archive -->
|
---|
[16199] | 37 | <!-- windows -->
|
---|
[17276] | 38 | <property name="windows-java.installer" value="jre.exe"/>
|
---|
[17297] | 39 | <property name="bundled.version.windows-java" value="1.6.0_07"/> <!-- set this to the version number of java in the above archive -->
|
---|
[17272] | 40 | <property name="windows-java.extracted" value="jre"/> <!-- set this to the name of the top level directory in the above archive -->
|
---|
[17297] | 41 | <property name="component.size.windows-java" value="75 MB"/> <!-- set this to the size of the extract archive -->
|
---|
[16173] | 42 |
|
---|
| 43 | <!-- CLASSPATH -->
|
---|
| 44 | <path id="project.classpath">
|
---|
| 45 |
|
---|
| 46 | <!-- our classes -->
|
---|
| 47 | <fileset dir="${rk.home}/ant-scripts/tasks">
|
---|
| 48 | <include name="**/*.jar"/>
|
---|
| 49 | </fileset>
|
---|
| 50 |
|
---|
| 51 | <!-- jars in lib directory -->
|
---|
| 52 | <fileset dir="${rk.home}/lib">
|
---|
| 53 | <include name="*.jar"/>
|
---|
| 54 | </fileset>
|
---|
| 55 |
|
---|
| 56 | <!-- a few ant-installer jars -->
|
---|
| 57 | <fileset dir="${rk.home}/packages/ant-installer/lib">
|
---|
| 58 | <include name="ant-installer-ext.jar"/>
|
---|
| 59 | <include name="ant-installer.jar"/>
|
---|
| 60 | </fileset>
|
---|
| 61 |
|
---|
| 62 | </path>
|
---|
| 63 |
|
---|
| 64 | <!-- SELF DEFINED TASKS AND TYPES -->
|
---|
| 65 | <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
|
---|
| 66 | <taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/>
|
---|
[17098] | 67 | <taskdef name="math" classname="ise.antelope.tasks.MathTask" classpathref="project.classpath"/>
|
---|
[16173] | 68 | <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
|
---|
| 69 | <taskdef name="installer" classname="org.tp23.antinstaller.taskdefs.Installer" classpathref="project.classpath"/>
|
---|
[17098] | 70 | <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
|
---|
[17278] | 71 | <typedef name="dcff" classname="org.greenstone.anttasks.DeleteChunkFromFile" classpathref="project.classpath"/>
|
---|
[17098] | 72 | <typedef name="rsplit" classname="org.greenstone.anttasks.SplitResource" classpathref="project.classpath"/>
|
---|
| 73 | <typedef name="get-property-value" classname="org.greenstone.anttasks.GetPropertyValue" classpathref="project.classpath"/>
|
---|
[16173] | 74 |
|
---|
[16242] | 75 | <!-- DATES IN DIFFERENT LANGUAGES -->
|
---|
| 76 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ar.Dates.${current.month}" outputProperty="month.ar"/>
|
---|
| 77 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ca.Dates.${current.month}" outputProperty="month.ca"/>
|
---|
| 78 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="el.Dates.${current.month}" outputProperty="month.el"/>
|
---|
| 79 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="es.Dates.${current.month}" outputProperty="month.es"/>
|
---|
| 80 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="fr.Dates.${current.month}" outputProperty="month.fr"/>
|
---|
| 81 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="lv.Dates.${current.month}" outputProperty="month.lv"/>
|
---|
| 82 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="mr.Dates.${current.month}" outputProperty="month.mr"/>
|
---|
| 83 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ro.Dates.${current.month}" outputProperty="month.ro"/>
|
---|
| 84 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ru.Dates.${current.month}" outputProperty="month.ru"/>
|
---|
| 85 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="vi.Dates.${current.month}" outputProperty="month.vi"/>
|
---|
| 86 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="zh.Dates.${current.month}" outputProperty="month.zh"/>
|
---|
| 87 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="default.Dates.${current.month}" outputProperty="month.default"/>
|
---|
| 88 | <!--
|
---|
| 89 | <echo level="info">Current Date</echo>
|
---|
| 90 | <echo level="info">ar: ${month.ar} ${current.year}</echo>
|
---|
| 91 | <echo level="info">ca: ${month.el} ${current.year}</echo>
|
---|
| 92 | <echo level="info">el: ${month.el} ${current.year}</echo>
|
---|
| 93 | <echo level="info">es: ${month.es} ${current.year}</echo>
|
---|
| 94 | <echo level="info">fr: ${month.fr} ${current.year}</echo>
|
---|
| 95 | <echo level="info">lv: ${month.lv} ${current.year}</echo>
|
---|
| 96 | <echo level="info">mr: ${month.mr} ${current.year}</echo>
|
---|
| 97 | <echo level="info">ro: ${month.ro} ${current.year}</echo>
|
---|
| 98 | <echo level="info">ru: ${month.ru} ${current.year}</echo>
|
---|
| 99 | <echo level="info">vi: ${month.vi} ${current.year}</echo>
|
---|
| 100 | <echo level="info">zh: ${month.zh} ${current.year}</echo>
|
---|
| 101 | <echo level="info">default: (${month.default} ${current.year})</echo>
|
---|
| 102 | -->
|
---|
[16173] | 103 |
|
---|
| 104 | <!-- CHECKS PRE-CONDITIONS -->
|
---|
| 105 | <target name="init">
|
---|
| 106 |
|
---|
| 107 | <!-- version number -->
|
---|
| 108 | <if>
|
---|
| 109 | <bool>
|
---|
| 110 | <not><isset property="version"/></not>
|
---|
| 111 | </bool>
|
---|
| 112 | <fail>Version number not set</fail>
|
---|
| 113 | </if>
|
---|
| 114 | <property name="app.version" value="${version}"/>
|
---|
| 115 |
|
---|
[16623] | 116 | <!-- execute target code or just show the tree -->
|
---|
[16173] | 117 | <if>
|
---|
| 118 | <bool>
|
---|
| 119 | <not><isset property="execute"/></not>
|
---|
| 120 | </bool>
|
---|
| 121 | <property name="execute" value="true"/>
|
---|
| 122 | <else>
|
---|
| 123 | <if>
|
---|
| 124 | <bool>
|
---|
| 125 | <and>
|
---|
| 126 | <not><equals arg1="${execute}" arg2="true"/></not>
|
---|
| 127 | <not><equals arg1="${execute}" arg2="false"/></not>
|
---|
| 128 | </and>
|
---|
| 129 | </bool>
|
---|
| 130 | <echo level="error">You have not specified a valid value for execute.</echo>
|
---|
| 131 | <echo level="error">Valid values are 'true' and 'false'.</echo>
|
---|
| 132 | <fail>You have not specified a valid value for execute.</fail>
|
---|
| 133 | </if>
|
---|
| 134 | </else>
|
---|
| 135 | </if>
|
---|
| 136 |
|
---|
[16681] | 137 | <!-- show important properties -->
|
---|
| 138 | <echo level="info">Version (version): ${version}</echo>
|
---|
| 139 | <echo level="info">Branch Path (branch.path): ${branch.path}</echo>
|
---|
| 140 | <echo level="info">Current Month (current.month): ${current.month}</echo>
|
---|
| 141 | <echo level="info">Current Year (current.year): ${current.year}</echo>
|
---|
[16173] | 142 |
|
---|
| 143 | </target>
|
---|
| 144 |
|
---|
| 145 | </project>
|
---|