[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 |
|
---|
| 23 |
|
---|
[16174] | 24 | <!-- BUNDLED JAVA INFO -->
|
---|
[16199] | 25 | <!-- the bundled javas are kept in shared/linux/wrapper and shared/windows/wrapper in the repository -->
|
---|
[16174] | 26 | <!-- change this info when the bundled version changes -->
|
---|
[16199] | 27 | <!-- linux -->
|
---|
[16174] | 28 | <property name="bundled.version.linux-java" value="1.6.0_05"/>
|
---|
| 29 | <property name="linux-java.installer" value="jre_6u5_tar_gz"/>
|
---|
| 30 | <property name="linux-java.extracted" value="jre1.6.0_05"/> <!-- set this to the name of the top level directory in the above archive -->
|
---|
| 31 | <property name="component.size.linux-java" value="97Mb"/>
|
---|
[16199] | 32 | <!-- windows -->
|
---|
[16174] | 33 | <property name="bundled.version.windows-java" value="1.6.0_03"/>
|
---|
| 34 | <property name="windows-java.installer" value="jre-6u3-windows-i586-p-s.exe"/>
|
---|
| 35 | <property name="component.size.windows-java" value="?Mb"/>
|
---|
[16173] | 36 |
|
---|
| 37 | <!-- CLASSPATH -->
|
---|
| 38 | <path id="project.classpath">
|
---|
| 39 |
|
---|
| 40 | <!-- our classes -->
|
---|
| 41 | <fileset dir="${rk.home}/ant-scripts/tasks">
|
---|
| 42 | <include name="**/*.jar"/>
|
---|
| 43 | </fileset>
|
---|
| 44 | <pathelement path="${rk.home}/ant-scripts/tasks/orans"/>
|
---|
| 45 |
|
---|
| 46 | <!-- jars in lib directory -->
|
---|
| 47 | <fileset dir="${rk.home}/lib">
|
---|
| 48 | <include name="*.jar"/>
|
---|
| 49 | </fileset>
|
---|
| 50 |
|
---|
| 51 | <!-- a few ant-installer jars -->
|
---|
| 52 | <fileset dir="${rk.home}/packages/ant-installer/lib">
|
---|
| 53 | <include name="ant-installer-ext.jar"/>
|
---|
| 54 | <include name="ant-installer.jar"/>
|
---|
| 55 | </fileset>
|
---|
| 56 |
|
---|
| 57 | </path>
|
---|
| 58 |
|
---|
| 59 | <!-- SELF DEFINED TASKS AND TYPES -->
|
---|
| 60 | <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
|
---|
| 61 | <taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/>
|
---|
| 62 | <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
|
---|
| 63 | <taskdef name="setloglevel" classname="SetLogLevel" classpathref="project.classpath"/>
|
---|
[16452] | 64 | <taskdef name="math" classname="ise.antelope.tasks.MathTask" classpathref="project.classpath"/>
|
---|
[16173] | 65 | <typedef name="addressedcall" classname="TreeCallTarget" classpathref="project.classpath"/>
|
---|
| 66 | <typedef name="rsr" classname="RegexSearchReplace" classpathref="project.classpath"/>
|
---|
[16199] | 67 | <typedef name="rsplit" classname="SplitResource" classpathref="project.classpath"/>
|
---|
[16231] | 68 | <typedef name="get-property-value" classname="GetPropertyValue" classpathref="project.classpath"/>
|
---|
[16173] | 69 | <taskdef name="installer" classname="org.tp23.antinstaller.taskdefs.Installer" classpathref="project.classpath"/>
|
---|
| 70 |
|
---|
[16242] | 71 | <!-- DATES IN DIFFERENT LANGUAGES -->
|
---|
| 72 | <!-- relies on ${current.month} being set by the release kits build.xml file -->
|
---|
| 73 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ar.Dates.${current.month}" outputProperty="month.ar"/>
|
---|
| 74 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ca.Dates.${current.month}" outputProperty="month.ca"/>
|
---|
| 75 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="el.Dates.${current.month}" outputProperty="month.el"/>
|
---|
| 76 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="es.Dates.${current.month}" outputProperty="month.es"/>
|
---|
| 77 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="fr.Dates.${current.month}" outputProperty="month.fr"/>
|
---|
| 78 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="lv.Dates.${current.month}" outputProperty="month.lv"/>
|
---|
| 79 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="mr.Dates.${current.month}" outputProperty="month.mr"/>
|
---|
| 80 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ro.Dates.${current.month}" outputProperty="month.ro"/>
|
---|
| 81 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ru.Dates.${current.month}" outputProperty="month.ru"/>
|
---|
| 82 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="vi.Dates.${current.month}" outputProperty="month.vi"/>
|
---|
| 83 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="zh.Dates.${current.month}" outputProperty="month.zh"/>
|
---|
| 84 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="default.Dates.${current.month}" outputProperty="month.default"/>
|
---|
| 85 | <!--
|
---|
| 86 | <echo level="info">Current Date</echo>
|
---|
| 87 | <echo level="info">ar: ${month.ar} ${current.year}</echo>
|
---|
| 88 | <echo level="info">ca: ${month.el} ${current.year}</echo>
|
---|
| 89 | <echo level="info">el: ${month.el} ${current.year}</echo>
|
---|
| 90 | <echo level="info">es: ${month.es} ${current.year}</echo>
|
---|
| 91 | <echo level="info">fr: ${month.fr} ${current.year}</echo>
|
---|
| 92 | <echo level="info">lv: ${month.lv} ${current.year}</echo>
|
---|
| 93 | <echo level="info">mr: ${month.mr} ${current.year}</echo>
|
---|
| 94 | <echo level="info">ro: ${month.ro} ${current.year}</echo>
|
---|
| 95 | <echo level="info">ru: ${month.ru} ${current.year}</echo>
|
---|
| 96 | <echo level="info">vi: ${month.vi} ${current.year}</echo>
|
---|
| 97 | <echo level="info">zh: ${month.zh} ${current.year}</echo>
|
---|
| 98 | <echo level="info">default: (${month.default} ${current.year})</echo>
|
---|
| 99 | -->
|
---|
[16173] | 100 |
|
---|
| 101 | <!-- CHECKS PRE-CONDITIONS -->
|
---|
| 102 | <target name="init">
|
---|
| 103 |
|
---|
| 104 | <!-- version number -->
|
---|
| 105 | <echo level="info">Version number...</echo>
|
---|
| 106 | <if>
|
---|
| 107 | <bool>
|
---|
| 108 | <not><isset property="version"/></not>
|
---|
| 109 | </bool>
|
---|
| 110 | <fail>Version number not set</fail>
|
---|
| 111 | </if>
|
---|
| 112 |
|
---|
| 113 | <echo level="info">Version number: ${version}</echo>
|
---|
| 114 | <property name="app.version" value="${version}"/>
|
---|
| 115 | <echo level="info"/>
|
---|
| 116 |
|
---|
| 117 |
|
---|
| 118 | <!-- resume from -->
|
---|
| 119 | <echo level="info">Checking if we are resuming from a given target...</echo>
|
---|
| 120 | <if>
|
---|
| 121 | <bool><not><isset property="resume.from"/></not></bool>
|
---|
| 122 | <echo level="info">No, start from the beginning</echo>
|
---|
| 123 | <else>
|
---|
| 124 | <echo level="info">Yes, resuming from ${resume.from}</echo>
|
---|
| 125 | </else>
|
---|
| 126 | </if>
|
---|
| 127 | <echo level="info"/>
|
---|
| 128 |
|
---|
| 129 | <!-- check resume to -->
|
---|
| 130 | <echo level="info">Checking if we are resuming up to a given target...</echo>
|
---|
| 131 | <if>
|
---|
| 132 | <bool><not><isset property="resume.to"/></not></bool>
|
---|
| 133 | <echo level="info">No, stop at the end</echo>
|
---|
| 134 | <else>
|
---|
| 135 | <echo level="info">Yes, resuming from ${resume.to}</echo>
|
---|
| 136 | </else>
|
---|
| 137 | </if>
|
---|
| 138 | <echo level="info"/>
|
---|
| 139 |
|
---|
| 140 |
|
---|
| 141 | <!-- check resume mode-->
|
---|
| 142 | <echo level="info">Determining resume mode...</echo>
|
---|
| 143 | <if>
|
---|
| 144 | <bool>
|
---|
| 145 | <not><isset property="resume.mode"/></not>
|
---|
| 146 | </bool>
|
---|
| 147 | <echo level="info">Mode not set, just fall through</echo>
|
---|
| 148 | <else>
|
---|
| 149 | <echo level="info">Mode set to ${resume.mode}</echo>
|
---|
| 150 | <if>
|
---|
| 151 | <bool>
|
---|
| 152 | <not><equals arg1="${resume.mode}" arg2="descend"/></not>
|
---|
| 153 | </bool>
|
---|
| 154 | <echo level="error">You have not specified a valid resume mode.</echo>
|
---|
| 155 | <echo level="error">Valid modes are 'descend' and null.</echo>
|
---|
| 156 | <fail>You have not specified a valid resume mode.</fail>
|
---|
| 157 | </if>
|
---|
| 158 | </else>
|
---|
| 159 | </if>
|
---|
| 160 | <echo level="info"/>
|
---|
| 161 |
|
---|
| 162 | <!-- execute target code or just traverse tree -->
|
---|
| 163 | <echo level="info">Determining execute mode...</echo>
|
---|
| 164 | <if>
|
---|
| 165 | <bool>
|
---|
| 166 | <not><isset property="execute"/></not>
|
---|
| 167 | </bool>
|
---|
| 168 | <echo level="info">Execute not set, defaulting to 'true'</echo>
|
---|
| 169 | <property name="execute" value="true"/>
|
---|
| 170 | <else>
|
---|
| 171 | <echo level="info">Execute set to ${execute}</echo>
|
---|
| 172 | <if>
|
---|
| 173 | <bool>
|
---|
| 174 | <and>
|
---|
| 175 | <not><equals arg1="${execute}" arg2="true"/></not>
|
---|
| 176 | <not><equals arg1="${execute}" arg2="false"/></not>
|
---|
| 177 | </and>
|
---|
| 178 | </bool>
|
---|
| 179 | <echo level="error">You have not specified a valid value for execute.</echo>
|
---|
| 180 | <echo level="error">Valid values are 'true' and 'false'.</echo>
|
---|
| 181 | <fail>You have not specified a valid value for execute.</fail>
|
---|
| 182 | </if>
|
---|
| 183 | </else>
|
---|
| 184 | </if>
|
---|
| 185 | <echo level="info"/>
|
---|
| 186 |
|
---|
| 187 |
|
---|
| 188 | <!-- check branch.path -->
|
---|
| 189 | <echo level="info">Determining the branch path...</echo>
|
---|
| 190 | <if>
|
---|
| 191 | <bool><equals arg1="trunk" arg2="${version}"/></bool>
|
---|
| 192 | <property name="branch.path" value="trunk"/>
|
---|
| 193 | </if>
|
---|
| 194 |
|
---|
| 195 | <if>
|
---|
| 196 | <bool><not><isset property="branch.path"/></not></bool>
|
---|
| 197 | <fail>You have not specified a branch path where code will come from in the repository</fail>
|
---|
| 198 | </if>
|
---|
| 199 |
|
---|
| 200 | <echo level="info">Branch Path: ${branch.path}</echo>
|
---|
| 201 | <echo level="info"/>
|
---|
| 202 |
|
---|
| 203 | </target>
|
---|
| 204 |
|
---|
| 205 | </project>
|
---|