1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
2 | <!--
|
---|
3 | ..........................................................
|
---|
4 | August 2008
|
---|
5 | Targets for Greenstone3 release kits
|
---|
6 | Oran Fry
|
---|
7 | ..........................................................
|
---|
8 | -->
|
---|
9 |
|
---|
10 | <project name="greenstone3-targets">
|
---|
11 |
|
---|
12 | <property name="version.major" value="3"/>
|
---|
13 | <target name="gs3-init">
|
---|
14 |
|
---|
15 | <!-- show the property set to be forwarded to greenstone3 -->
|
---|
16 | <echo>Properties to be forwarded to greenstone3 build</echo>
|
---|
17 | <echoproperties><propertyset refid="forward.properties"/></echoproperties>
|
---|
18 |
|
---|
19 | </target>
|
---|
20 |
|
---|
21 | <target name="gs3-properties">
|
---|
22 | <echo>forward.* (eg, forward.proxy.host) (optional) any property to forward to greenstone3 during build</echo>
|
---|
23 | </target>
|
---|
24 |
|
---|
25 | <target name="greenstone3-set-version-numbers">
|
---|
26 | <rsr
|
---|
27 | file="${greenstone3basedir}/resources/web/global.properties.in"
|
---|
28 | pattern="@gsdl3version@"
|
---|
29 | replacement="${version}" />
|
---|
30 | <rsr
|
---|
31 | file="${greenstone3basedir}/resources/java/server.properties"
|
---|
32 | pattern="^(Server3Control\.Version=).*$"
|
---|
33 | replacement="$1${version}" />
|
---|
34 |
|
---|
35 | </target>
|
---|
36 |
|
---|
37 | <!--
|
---|
38 | unused. might need to find a way to get the system ant into the release, as ant no longer comes with the release kits
|
---|
39 | -->
|
---|
40 | <target name="insert-ant">
|
---|
41 |
|
---|
42 | <!-- remove any existing ant -->
|
---|
43 | <delete dir="compiled/packages/ant"/>
|
---|
44 |
|
---|
45 | <!-- windows copy -->
|
---|
46 | <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
47 | <copy todir="compiled/packages">
|
---|
48 | <fileset dir="${rk.home}/core" includes="ant/**/*"/>
|
---|
49 | </copy>
|
---|
50 |
|
---|
51 | <!-- linux, mac copy-->
|
---|
52 | <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
|
---|
53 | <exec executable="cp">
|
---|
54 | <arg value="-r"/>
|
---|
55 | <arg value="${rk.home}/core/ant"/>
|
---|
56 | <arg value="compiled/packages"/>
|
---|
57 | </exec>
|
---|
58 |
|
---|
59 | <!-- otherwise fail -->
|
---|
60 | <else>
|
---|
61 | <fail>this target does not support the current os</fail>
|
---|
62 |
|
---|
63 | </else></if></else></if>
|
---|
64 |
|
---|
65 | </target>
|
---|
66 |
|
---|
67 | <target name="persist-forwarded-properties">
|
---|
68 | <echoproperties prefix="forward." destfile="${greenstone3basedir}/forward.properties"/>
|
---|
69 | <replaceregexp file="${greenstone3basedir}/forward.properties" match="forward\.(.*)" replace="\1" byline="true"/>
|
---|
70 | <copy file="${greenstone3basedir}/build.properties.svn" tofile="${greenstone3basedir}/build.properties"/>
|
---|
71 | <concat destfile="${greenstone3basedir}/build.properties" append="true" fixlastline="yes">
|
---|
72 | <fileset file="${greenstone3basedir}/forward.properties"/>
|
---|
73 | </concat>
|
---|
74 | </target>
|
---|
75 |
|
---|
76 | <!-- create the property set to be forwarded to greenstone3 -->
|
---|
77 | <propertyset id="forward.properties">
|
---|
78 | <propertyref prefix="forward."/>
|
---|
79 | <mapper type="glob" from="forward.*" to="*"/>
|
---|
80 | <propertyref name="app.version"/>
|
---|
81 | <propertyref name="branch.path"/>
|
---|
82 | <propertyref name="branch.revision"/>
|
---|
83 | </propertyset>
|
---|
84 |
|
---|
85 | </project>
|
---|