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 | <!-- current date and time -->
|
---|
24 | <tstamp>
|
---|
25 | <format property="current.month" pattern="MMM"/>
|
---|
26 | <format property="current.year" pattern="yyyy"/>
|
---|
27 | </tstamp>
|
---|
28 |
|
---|
29 | <!-- BUNDLED JAVA INFO -->
|
---|
30 | <!-- the bundled javas are kept in shared/linux/wrapper and shared/windows/wrapper in the repository -->
|
---|
31 | <!-- change this info when the bundled version changes -->
|
---|
32 | <!-- linux -->
|
---|
33 | <property name="bundled.version.linux-java" value="1.6.0_05"/>
|
---|
34 | <property name="linux-java.installer" value="jre_6u5_tar_gz"/>
|
---|
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 -->
|
---|
36 | <property name="component.size.linux-java" value="97 MB"/>
|
---|
37 | <!-- windows -->
|
---|
38 | <property name="bundled.version.windows-java" value="1.6.0_03"/>
|
---|
39 | <property name="windows-java.installer" value="jre-6u3-windows-i586-p-s.exe"/>
|
---|
40 | <property name="component.size.windows-java" value="? MB"/>
|
---|
41 |
|
---|
42 | <!-- CLASSPATH -->
|
---|
43 | <path id="project.classpath">
|
---|
44 |
|
---|
45 | <!-- our classes -->
|
---|
46 | <fileset dir="${rk.home}/ant-scripts/tasks">
|
---|
47 | <include name="**/*.jar"/>
|
---|
48 | </fileset>
|
---|
49 | <pathelement path="${rk.home}/ant-scripts/tasks/orans"/>
|
---|
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"/>
|
---|
67 | <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
|
---|
68 | <taskdef name="setloglevel" classname="SetLogLevel" classpathref="project.classpath"/>
|
---|
69 | <taskdef name="math" classname="ise.antelope.tasks.MathTask" classpathref="project.classpath"/>
|
---|
70 | <typedef name="rsr" classname="RegexSearchReplace" classpathref="project.classpath"/>
|
---|
71 | <typedef name="rsplit" classname="SplitResource" classpathref="project.classpath"/>
|
---|
72 | <typedef name="get-property-value" classname="GetPropertyValue" classpathref="project.classpath"/>
|
---|
73 | <taskdef name="installer" classname="org.tp23.antinstaller.taskdefs.Installer" classpathref="project.classpath"/>
|
---|
74 |
|
---|
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 | -->
|
---|
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 |
|
---|
116 | <!-- execute target code or just show the tree -->
|
---|
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 |
|
---|
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>
|
---|
142 |
|
---|
143 | </target>
|
---|
144 |
|
---|
145 | </project>
|
---|