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