root/main/trunk/release-kits/shared/greenstone3/ant-scripts/greenstone3-shared.xml @ 21745

Revision 21745, 3.2 KB (checked in by oranfry, 10 years ago)

moving forward property set to greenstone3 shared area

Line 
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        <!-- don't let greenstone3 block and wait for user input to accept
16            the properties for the build -->
17        <property name="forward.properties.accepted" value="true"/>
18
19        <!-- make sure all c++ compilation is done statically on linux -->
20        <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
21            <property name="forward.compile.static" value="true"/>
22        </if>
23
24        <!-- show the property set to be forwarded to greenstone3 -->
25        <echo>Properties to be forwarded to greenstone3 build</echo>
26        <echoproperties><propertyset refid="forward.properties"/></echoproperties>
27
28    </target>
29
30    <target name="gs3-properties">
31        <echo>forward.* (eg, forward.proxy.host)    (optional)  any property to forward to greenstone3 during build</echo>
32    </target>
33
34    <target name="greenstone3-set-version-numbers">
35        <rsr
36            file="${greenstone3basedir}/resources/java/global.properties.in"
37            pattern="@gsdl3version@"
38            replacement="${version}" />
39        <rsr
40            file="${greenstone3basedir}/resources/java/server.properties"
41            pattern="^(Server3Control\.Version=).*$"
42            replacement="$1${version}" />
43
44    </target>
45
46    <!--
47        unused. might need to find a way to get the system ant into the release, as ant no longer comes with the release kits
48    -->
49    <target name="insert-ant">
50
51        <!-- remove any existing ant -->
52        <delete dir="compiled/packages/ant"/>
53
54        <!-- windows copy -->
55        <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
56            <copy todir="compiled/packages">
57                <fileset dir="${rk.home}/core" includes="ant/**/*"/>
58            </copy>
59
60        <!-- linux, mac copy-->
61        <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
62            <exec executable="cp">
63                <arg value="-r"/>
64                <arg value="${rk.home}/core/ant"/>
65                <arg value="compiled/packages"/>
66            </exec>
67
68        <!-- otherwise fail -->
69        <else>
70            <fail>this target does not support the current os</fail>
71
72        </else></if></else></if>
73
74    </target>
75   
76    <!-- unused. this or something similar might need to go back in, to make the forward.properties permanent -->
77    <target name="generate-build-properties">
78        <copy file="${greenstone3.basedir}/build.properties.in" tofile="${greenstone3.basedir}/build.properties"/>
79        <if><bool><istrue value="${install.flax}"/></bool>
80            <rsr file="${greenstone3.basedir}/build.properties" pattern="^#install.flax\s*[=:].*" replacement="install.flax=true"/>
81        </if>
82        <if><bool><isset property="server.default.servlet"/></bool>
83            <rsr file="${greenstone3.basedir}/build.properties" pattern="^#?server.default.servlet\s*[=:].*" replacement="server.default.servlet=${server.default.servlet}"/>
84        </if>
85    </target>
86
87    <!-- create the property set to be forwarded to greenstone3 -->
88    <propertyset id="forward.properties">
89        <propertyref prefix="forward."/>
90        <mapper type="glob" from="forward.*" to="*"/>
91        <propertyref name="app.version"/>
92        <propertyref name="branch.path"/>
93        <propertyref name="branch.revision"/>
94    </propertyset>
95
96</project>
Note: See TracBrowser for help on using the browser.