source: release-kits/shared/ant-scripts/init.xml@ 16623

Last change on this file since 16623 was 16623, checked in by oranfry, 16 years ago

dont check resume mode as there is no such thing anymore

File size: 8.1 KB
Line 
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
7 <!-- CONSTANTS (overridable in build.properties) -->
8
9 <!-- svn root -->
10 <property name="svn.root" value="http://svn.greenstone.org" />
11
12 <!-- default revision and branch path -->
13 <property name="branch.path" value="trunk" />
14 <property name="branch.revision" value="HEAD" />
15
16 <!-- the minimum version of java which the installer should be run with (this gets used in search4j) -->
17 <property name="java.min.version" value="1.4.0_00"/>
18
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
24 <!-- BUNDLED JAVA INFO -->
25 <!-- the bundled javas are kept in shared/linux/wrapper and shared/windows/wrapper in the repository -->
26 <!-- change this info when the bundled version changes -->
27 <!-- linux -->
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"/>
32 <!-- windows -->
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"/>
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"/>
64 <taskdef name="math" classname="ise.antelope.tasks.MathTask" classpathref="project.classpath"/>
65 <typedef name="addressedcall" classname="TreeCallTarget" classpathref="project.classpath"/>
66 <typedef name="rsr" classname="RegexSearchReplace" classpathref="project.classpath"/>
67 <typedef name="rsplit" classname="SplitResource" classpathref="project.classpath"/>
68 <typedef name="get-property-value" classname="GetPropertyValue" classpathref="project.classpath"/>
69 <taskdef name="installer" classname="org.tp23.antinstaller.taskdefs.Installer" classpathref="project.classpath"/>
70
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 -->
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 <!-- check descend down -->
141 <echo level="info">Checking if we are descending a given target...</echo>
142 <if>
143 <bool><not><isset property="resume.descend"/></not></bool>
144 <echo level="info">No, execute the whole tree</echo>
145 <else>
146 <echo level="info">Yes, descending down ${resume.descend}</echo>
147 </else>
148 </if>
149 <echo level="info"/>
150
151 <!-- execute target code or just show the tree -->
152 <echo level="info">Determining execute mode...</echo>
153 <if>
154 <bool>
155 <not><isset property="execute"/></not>
156 </bool>
157 <echo level="info">Execute not set, defaulting to 'true'</echo>
158 <property name="execute" value="true"/>
159 <else>
160 <echo level="info">Execute set to ${execute}</echo>
161 <if>
162 <bool>
163 <and>
164 <not><equals arg1="${execute}" arg2="true"/></not>
165 <not><equals arg1="${execute}" arg2="false"/></not>
166 </and>
167 </bool>
168 <echo level="error">You have not specified a valid value for execute.</echo>
169 <echo level="error">Valid values are 'true' and 'false'.</echo>
170 <fail>You have not specified a valid value for execute.</fail>
171 </if>
172 </else>
173 </if>
174 <echo level="info"/>
175
176
177 <!-- check branch.path -->
178 <echo level="info">Determining the branch path...</echo>
179 <if>
180 <bool><equals arg1="trunk" arg2="${version}"/></bool>
181 <property name="branch.path" value="trunk"/>
182 </if>
183
184 <if>
185 <bool><not><isset property="branch.path"/></not></bool>
186 <fail>You have not specified a branch path where code will come from in the repository</fail>
187 </if>
188
189 <echo level="info">Branch Path: ${branch.path}</echo>
190 <echo level="info"/>
191
192 </target>
193
194</project>
Note: See TracBrowser for help on using the repository browser.