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

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

a target to strip svn directories from a directory

File size: 7.4 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 <!-- 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="linux-java.installer" value="jre_6u5_tar_gz"/>
34 <property name="bundled.version.linux-java" value="1.6.0_05"/> <!-- set this to the version number of java in the above archive -->
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"/> <!-- set this to the size of the extract archive -->
37 <!-- windows -->
38 <property name="windows-java.installer" value="jre.exe"/>
39 <property name="bundled.version.windows-java" value="1.6.0_07"/> <!-- set this to the version number of java in the above archive -->
40 <property name="windows-java.extracted" value="jre"/> <!-- set this to the name of the top level directory in the above archive -->
41 <property name="component.size.windows-java" value="75 MB"/> <!-- set this to the size of the extract archive -->
42
43 <!-- CLASSPATH -->
44 <path id="project.classpath">
45
46 <!-- our classes -->
47 <fileset dir="${rk.home}/ant-scripts/tasks">
48 <include name="**/*.jar"/>
49 </fileset>
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="math" classname="ise.antelope.tasks.MathTask" classpathref="project.classpath"/>
68 <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
69 <taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
70 <taskdef name="installer" classname="org.tp23.antinstaller.taskdefs.Installer" classpathref="project.classpath"/>
71 <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
72 <typedef name="dcff" classname="org.greenstone.anttasks.DeleteChunkFromFile" classpathref="project.classpath"/>
73 <typedef name="rsplit" classname="org.greenstone.anttasks.SplitResource" classpathref="project.classpath"/>
74 <typedef name="get-property-value" classname="org.greenstone.anttasks.GetPropertyValue" classpathref="project.classpath"/>
75
76 <!-- DATES IN DIFFERENT LANGUAGES -->
77 <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ar.Dates.${current.month}" outputProperty="month.ar"/>
78 <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ca.Dates.${current.month}" outputProperty="month.ca"/>
79 <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="el.Dates.${current.month}" outputProperty="month.el"/>
80 <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="es.Dates.${current.month}" outputProperty="month.es"/>
81 <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="fr.Dates.${current.month}" outputProperty="month.fr"/>
82 <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="lv.Dates.${current.month}" outputProperty="month.lv"/>
83 <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="mr.Dates.${current.month}" outputProperty="month.mr"/>
84 <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ro.Dates.${current.month}" outputProperty="month.ro"/>
85 <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ru.Dates.${current.month}" outputProperty="month.ru"/>
86 <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="vi.Dates.${current.month}" outputProperty="month.vi"/>
87 <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="zh.Dates.${current.month}" outputProperty="month.zh"/>
88 <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="default.Dates.${current.month}" outputProperty="month.default"/>
89 <!--
90 <echo level="info">Current Date</echo>
91 <echo level="info">ar: ${month.ar} ${current.year}</echo>
92 <echo level="info">ca: ${month.el} ${current.year}</echo>
93 <echo level="info">el: ${month.el} ${current.year}</echo>
94 <echo level="info">es: ${month.es} ${current.year}</echo>
95 <echo level="info">fr: ${month.fr} ${current.year}</echo>
96 <echo level="info">lv: ${month.lv} ${current.year}</echo>
97 <echo level="info">mr: ${month.mr} ${current.year}</echo>
98 <echo level="info">ro: ${month.ro} ${current.year}</echo>
99 <echo level="info">ru: ${month.ru} ${current.year}</echo>
100 <echo level="info">vi: ${month.vi} ${current.year}</echo>
101 <echo level="info">zh: ${month.zh} ${current.year}</echo>
102 <echo level="info">default: (${month.default} ${current.year})</echo>
103 -->
104
105 <!-- CHECKS PRE-CONDITIONS -->
106 <target name="init">
107
108 <!-- version number -->
109 <if>
110 <bool>
111 <not><isset property="version"/></not>
112 </bool>
113 <fail>Version number not set</fail>
114 </if>
115 <property name="app.version" value="${version}"/>
116
117 <!-- execute target code or just show the tree -->
118 <if>
119 <bool>
120 <not><isset property="execute"/></not>
121 </bool>
122 <property name="execute" value="true"/>
123 <else>
124 <if>
125 <bool>
126 <and>
127 <not><equals arg1="${execute}" arg2="true"/></not>
128 <not><equals arg1="${execute}" arg2="false"/></not>
129 </and>
130 </bool>
131 <echo level="error">You have not specified a valid value for execute.</echo>
132 <echo level="error">Valid values are 'true' and 'false'.</echo>
133 <fail>You have not specified a valid value for execute.</fail>
134 </if>
135 </else>
136 </if>
137
138 <!-- show important properties -->
139 <echo level="info">Version (version): ${version}</echo>
140 <echo level="info">Branch Path (branch.path): ${branch.path}</echo>
141 <echo level="info">Current Month (current.month): ${current.month}</echo>
142 <echo level="info">Current Year (current.year): ${current.year}</echo>
143
144 </target>
145
146 <target name="strip-svn-dirs">
147 <delete includeemptydirs="true">
148 <fileset dir="${dir}" defaultexcludes="false">
149 <include name="**/.svn/**" />
150 <include name="**/.svn/" />
151 <include name=".svn/**" />
152 <include name=".svn/" />
153 </fileset>
154 </delete>
155 </target>
156
157</project>
Note: See TracBrowser for help on using the repository browser.