root/releases/bedework-3.6/build/buildsh.xml

Revision 2972 (checked in by douglm, 3 years ago)

We weren't filtering the options file for services so there was no token replacement.

Line 
1 <?xml version="1.0"?>
2
3 <!-- ===================================================================
4      This file builds a runnable application wrapped up as a zip file.
5      Unpacking the zip should result in a directory containing a shell
6      script, a set of jars and any other resources needed.
7
8      Properties we need:
9        app.core.env.pname     core properties source
10        app.run.shellscr       location of the skeleton shell script.
11        app.run.jar.file       application jar file
12        app.run.main.class     main class for application.
13
14      Authors: Mike Douglass   douglm rpi.edu
15      =================================================================== -->
16
17 <project name="bw.buildsh" default="build">
18   <import file="${build.dir}/buildfilters.xml" />
19
20   <import file="${build.dir}/platforms/${org.bedework.global.deploy.platform}Service.xml" />
21
22   <target name="init">
23     <!-- Destinations - where we build stuff -->
24     <property name="app.dest.home"
25               location="${org.bedework.temp.shellscr.home}/${propval.app.zip.name}" />
26     <property name="app.dest.lib"
27               location="${app.dest.home}/lib" />
28     <property name="app.dest.classes"
29               location="${app.dest.home}/classes" />
30     <property name="app.dest.properties"
31               location="${app.dest.classes}/properties/calendar" />
32     <property name="app.dest.data"
33               location="${app.dest.home}/data" />
34
35     <property name="app.zip.file"
36               location="${dist.home}/${propval.app.zip.name}.zip" />
37   </target>
38
39   <!-- ================================================================
40        build target
41        ================================================================ -->
42
43   <target name="build" depends="init">
44     <delete dir="${app.dest.home}" />
45
46     <!-- Library stuff -->
47
48     <mkdir dir="${app.dest.lib}" />
49
50     <!-- Platform specific -->
51     <antcall target="addLibs" inheritRefs="true" />
52
53     <copy todir="${app.dest.classes}">
54       <fileset dir="${org.bedework.project.calendarapi}/calCore/resources/properties" />
55       <filterset refid="property.filters" />
56     </copy>
57
58     <copy todir="${app.dest.classes}">
59       <fileset dir="${org.bedework.project.calendarapi}/calCore/resources/hbms" />
60       <filterset refid="property.filters" />
61     </copy>
62
63     <copy tofile="${app.dest.classes}/sysevents.properties"
64           file="${org.bedework.config.sysevents.properties}" />
65
66     <if>
67       <isreference refid="org.bedework.extra.resources" />
68       <then>
69         <copy todir="${app.dest.classes}" overwrite="yes" >
70           <fileset refid="org.bedework.extra.resources" />
71           <filterset refid="property.filters" />
72         </copy>
73       </then>
74     </if>
75
76     <!-- Platform specific hibernate properties -->
77     <antcall target="doHibProps" inheritRefs="true" />
78
79     <!-- Create the env.properties file -->
80     <mkdir dir="${app.dest.properties}" />
81
82     <copy tofile="${app.dest.properties}/options.xml"
83           file="${org.bedework.config.options}" >
84       <filterset>
85         <filter token="RPI-DEBUG" value="${app.debug.val}"/>
86       </filterset>
87       <filterset refid="property.filters" />
88     </copy>
89
90     <!-- ===============================================================
91                        Add any resource files
92          =============================================================== -->
93
94     <!-- Platform specific -->
95     <antcall target="addResources" inheritRefs="true" />
96
97     <!-- ===============================================================
98                        Add any data files
99          =============================================================== -->
100
101     <if>
102       <istrue value="${org.bedework.shellscr.copy.data}" />
103       <then>
104         <mkdir dir="${app.dest.data}" />
105    
106         <copy todir="${app.dest.data}" overwrite="yes" >
107           <fileset refid="org.bedework.shellscr.data" />
108           <filterset refid="property.filters" />
109         </copy>
110       </then>
111     </if>
112
113     <!-- ===============================================================
114                        Add any extra stuff
115          =============================================================== -->
116
117     <!-- Platform specific -->
118     <antcall target="addExtras" inheritRefs="true" />
119    
120     <!-- ================================================================
121          Build the zip file
122          ================================================================ -->
123
124     <mkdir dir="${dist.home}" />
125     <delete file="${app.zip.file}" />
126
127     <zip destfile="${app.zip.file}" >
128       <zipfileset prefix="${propval.app.zip.name}" dir="${app.dest.home}" />
129     </zip>
130   </target>
131 </project>
Note: See TracBrowser for help on using the browser.