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

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

put the vundled java info in the shared init script

File size: 5.7 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="rk-init">
3
4
5 <!-- load in static properties from build.properties -->
6 <property file="build.properties" />
7
8 <!-- CONSTANTS (overridable in build.properties) -->
9
10 <!-- svn root -->
11 <property name="svn.root" value="http://svn.greenstone.org" />
12
13 <!-- default revision and branch path -->
14 <property name="branch.path" value="trunk" />
15 <property name="branch.revision" value="HEAD" />
16
17 <!-- the minimum version of java which the installer should be run with (this gets used in search4j) -->
18 <property name="java.min.version" value="1.4.0_00"/>
19
20 <!-- create a localised basedir property -->
21 <path id="basedir.path"><pathelement location="${basedir}"/></path>
22 <property name="basedir.local" refid="basedir.path"/>
23
24
25 <!-- BUNDLED JAVA INFO -->
26 <!-- the bundled javas are kept in shared/linux/wrapper and shared/windows/wrapper in the repository -->
27 <!-- change this info when the bundled version changes -->
28 <!-- linux -->
29 <property name="bundled.version.linux-java" value="1.6.0_05"/>
30 <property name="linux-java.installer" value="jre_6u5_tar_gz"/>
31 <property name="linux-java.extracted" value="jre1.6.0_05"/> <!-- set this to the name of the top level directory in the above archive -->
32 <property name="component.size.linux-java" value="97Mb"/>
33 <!-- windows -->
34 <property name="bundled.version.windows-java" value="1.6.0_03"/>
35 <property name="windows-java.installer" value="jre-6u3-windows-i586-p-s.exe"/>
36 <property name="component.size.windows-java" value="?Mb"/>
37
38 <!-- CLASSPATH -->
39 <path id="project.classpath">
40
41 <!-- our classes -->
42 <fileset dir="${rk.home}/ant-scripts/tasks">
43 <include name="**/*.jar"/>
44 </fileset>
45 <pathelement path="${rk.home}/ant-scripts/tasks/orans"/>
46
47 <!-- jars in lib directory -->
48 <fileset dir="${rk.home}/lib">
49 <include name="*.jar"/>
50 </fileset>
51
52 <!-- a few ant-installer jars -->
53 <fileset dir="${rk.home}/packages/ant-installer/lib">
54 <include name="ant-installer-ext.jar"/>
55 <include name="ant-installer.jar"/>
56 </fileset>
57
58 </path>
59
60 <!-- SELF DEFINED TASKS AND TYPES -->
61 <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
62 <taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/>
63 <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
64 <taskdef name="setloglevel" classname="SetLogLevel" 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 <taskdef name="installer" classname="org.tp23.antinstaller.taskdefs.Installer" classpathref="project.classpath"/>
69
70
71 <!-- CHECKS PRE-CONDITIONS -->
72 <target name="init">
73
74 <!-- version number -->
75 <echo level="info">Version number...</echo>
76 <if>
77 <bool>
78 <not><isset property="version"/></not>
79 </bool>
80 <fail>Version number not set</fail>
81 </if>
82
83 <echo level="info">Version number: ${version}</echo>
84 <property name="app.version" value="${version}"/>
85 <echo level="info"/>
86
87
88 <!-- resume from -->
89 <echo level="info">Checking if we are resuming from a given target...</echo>
90 <if>
91 <bool><not><isset property="resume.from"/></not></bool>
92 <echo level="info">No, start from the beginning</echo>
93 <else>
94 <echo level="info">Yes, resuming from ${resume.from}</echo>
95 </else>
96 </if>
97 <echo level="info"/>
98
99 <!-- check resume to -->
100 <echo level="info">Checking if we are resuming up to a given target...</echo>
101 <if>
102 <bool><not><isset property="resume.to"/></not></bool>
103 <echo level="info">No, stop at the end</echo>
104 <else>
105 <echo level="info">Yes, resuming from ${resume.to}</echo>
106 </else>
107 </if>
108 <echo level="info"/>
109
110
111 <!-- check resume mode-->
112 <echo level="info">Determining resume mode...</echo>
113 <if>
114 <bool>
115 <not><isset property="resume.mode"/></not>
116 </bool>
117 <echo level="info">Mode not set, just fall through</echo>
118 <else>
119 <echo level="info">Mode set to ${resume.mode}</echo>
120 <if>
121 <bool>
122 <not><equals arg1="${resume.mode}" arg2="descend"/></not>
123 </bool>
124 <echo level="error">You have not specified a valid resume mode.</echo>
125 <echo level="error">Valid modes are 'descend' and null.</echo>
126 <fail>You have not specified a valid resume mode.</fail>
127 </if>
128 </else>
129 </if>
130 <echo level="info"/>
131
132 <!-- execute target code or just traverse tree -->
133 <echo level="info">Determining execute mode...</echo>
134 <if>
135 <bool>
136 <not><isset property="execute"/></not>
137 </bool>
138 <echo level="info">Execute not set, defaulting to 'true'</echo>
139 <property name="execute" value="true"/>
140 <else>
141 <echo level="info">Execute set to ${execute}</echo>
142 <if>
143 <bool>
144 <and>
145 <not><equals arg1="${execute}" arg2="true"/></not>
146 <not><equals arg1="${execute}" arg2="false"/></not>
147 </and>
148 </bool>
149 <echo level="error">You have not specified a valid value for execute.</echo>
150 <echo level="error">Valid values are 'true' and 'false'.</echo>
151 <fail>You have not specified a valid value for execute.</fail>
152 </if>
153 </else>
154 </if>
155 <echo level="info"/>
156
157
158 <!-- check branch.path -->
159 <echo level="info">Determining the branch path...</echo>
160 <if>
161 <bool><equals arg1="trunk" arg2="${version}"/></bool>
162 <property name="branch.path" value="trunk"/>
163 </if>
164
165 <if>
166 <bool><not><isset property="branch.path"/></not></bool>
167 <fail>You have not specified a branch path where code will come from in the repository</fail>
168 </if>
169
170 <echo level="info">Branch Path: ${branch.path}</echo>
171 <echo level="info"/>
172
173 </target>
174
175</project>
Note: See TracBrowser for help on using the repository browser.