root/trunk/build/buildsh.xml

Revision 995 (checked in by douglm, 7 years ago)

Add class to represent translated icalendar objects. Stores method, prodid etc.
Related changes to a number of components

Support webdav-acl principal-match and principal-property-search

Add further caldav scheduling support

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="uwcal.buildsh" default="build">
18   <target name="init">
19     <!-- Load the location of the libraries -->
20     <property file="${org.bedework.project.bedework}/build/libjars.properties" />
21
22     <!-- Destinations - where we build stuff -->
23     <property name="app.dest.home"
24               location="${org.bedework.temp.shellscr.home}/${propval.app.zip.name}" />
25     <property name="app.dest.lib"
26               location="${app.dest.home}/lib" />
27     <property name="app.dest.classes"
28               location="${app.dest.home}/classes" />
29     <property name="app.dest.properties"
30               location="${app.dest.classes}/properties/calendar" />
31     <property name="app.dest.resources"
32               location="${app.dest.home}/resources" />
33     <property name="app.dest.data"
34               location="${app.dest.home}/data" />
35
36     <property name="app.zip.file"
37               location="${dist.home}/${propval.app.zip.name}.zip" />
38   </target>
39
40   <!-- ================================================================
41        build target
42        ================================================================ -->
43
44   <target name="build" depends="init">
45     <filterset id="property.filters" >
46       <filter token="BW-APP-NAME"
47               value="${org.bedework.deploy.name}"/>
48
49       <filter token="HIBERNATE-DIALECT"
50               value="${org.bedework.global.hibernate.dialect}" />
51
52       <filter token="DIRECTORY-BROWSING-DISALLOWED"
53               value="${org.bedework.global.directory.browsing.disallowed}" />
54
55       <filter token="APP-DESCRIPTION"
56               value="${propval.app.description}" />
57
58       <filter token="CALDAVTEST-CLASS"
59               value="org.bedework.caldav.test.TestCalDav"/>
60
61       <filter token="DUMP-CLASS"
62               value="org.bedework.dumprestore.dump.Dump"/>
63       <filter token="RESTORE-CLASS"
64               value="org.bedework.dumprestore.restore.Restore"/>
65
66       <filter token="APP-NAME"
67               value="${propval.app.name}"/>
68       <filter token="APP-VERSION"
69               value="${propval.app.version}"/>
70     </filterset>
71
72     <delete dir="${app.dest.home}" />
73
74     <!-- Library stuff -->
75
76     <mkdir dir="${app.dest.lib}" />
77
78     <copy todir="${app.dest.lib}">
79       <fileset dir="${hibernate.jars.dir}">
80         <include name="*.jar"/>
81       </fileset>
82     </copy>
83
84     <copy todir="${app.dest.lib}" file="${commons-collections.jar}"/>
85     <copy todir="${app.dest.lib}" file="${commons-logging.jar}"/>
86
87     <!-- core files -->
88
89     <copy todir="${app.dest.lib}" overwrite="yes">
90       <fileset dir="${bin.home}">
91         <!-- jars from sub-projects needed by all -->
92         <include name="rpiaccess*.jar"/>
93         <include name="rpiutil*.jar"/>
94         <include name="bw-davdefs*.jar"/>
95         <include name="bw-davio*.jar"/>
96
97         <!-- Calendar api jars -->
98         <include name="bw-calcore*.jar"/>
99         <include name="bw-calcorei*.jar"/>
100         <include name="bw-calenv*.jar"/>
101         <include name="bw-calfacade*.jar"/>
102         <include name="bw-calsvc*.jar"/>
103         <include name="bw-calsvci*.jar"/>
104         <include name="bw-icalendar*.jar"/>
105         <include name="bw-locale*.jar"/>
106         <include name="bw-logging*.jar"/>
107       </fileset>
108     </copy>
109
110      <!-- any extra bin files-->
111     <copy todir="${app.dest.lib}" >
112       <fileset refid="app.bin.files" />
113     </copy>
114
115     <!-- Some more standard libs -->
116     <copy todir="${app.dest.lib}" file="${log4j.jar}"/>
117     <copy todir="${app.dest.lib}" file="${ical4j.jar}"/>
118     <copy todir="${app.dest.lib}" file="${commons-digester.jar}"/>
119     <copy todir="${app.dest.lib}" file="${commons-httpclient.jar}"/>
120     <copy todir="${app.dest.lib}" file="${commons-ssl.jar}"/>
121     <copy todir="${app.dest.lib}" file="${commons-codec.jar}"/>
122
123     <!-- Extra libraries specified in calling build file -->
124     <copy todir="${app.dest.lib}" flatten="yes" >
125       <fileset refid="org.bedework.run.jars" />
126       <fileset refid="org.bedework.run.lib.jars" />
127
128       <!-- local jdbc drivers -->
129       <fileset dir="${org.bedework.jdbc.lib}">
130         <include name="*.jar"/>
131       </fileset>
132     </copy>
133
134     <!-- Include the quickstart jdbc driver -->
135     <copy todir="${app.dest.lib}" file="${hsqldb.jdbcdriver.jar}"/>
136
137     <copy todir="${app.dest.classes}">
138       <fileset dir="${org.bedework.project.calendarapi}/calCore/resources/properties" />
139       <filterset refid="property.filters" />
140     </copy>
141
142     <copy todir="${app.dest.classes}">
143       <fileset dir="${org.bedework.project.calendarapi}/calCore/resources/hbms" />
144       <filterset refid="property.filters" />
145     </copy>
146
147     <copy todir="${app.dest.classes}" overwrite="yes" >
148       <fileset refid="org.bedework.extra.resources" />
149       <filterset refid="property.filters" />
150     </copy>
151
152     <!-- add the jdbcdriver if defined -->
153     <antcall target="add.jdbcdriver" inheritRefs="true" />
154
155     <!-- Create the env.properties file -->
156     <mkdir dir="${app.dest.properties}" />
157
158     <copy tofile="${app.dest.properties}/env.properties"
159           file="${org.bedework.config.properties}" />
160
161     <copy tofile="${app.dest.properties}/options.xml"
162           file="${org.bedework.config.options}" />
163
164     <!-- ===============================================================
165                        Add any resource files
166          =============================================================== -->
167
168     <copy tofile="${app.dest.resources}/log4j.xml"
169           file="${org.bedework.runsh.log4j.xml}"
170           failonerror="false" />
171
172     <!-- ===============================================================
173                        Add any data files
174          =============================================================== -->
175
176     <mkdir dir="${app.dest.data}" />
177
178     <copy todir="${app.dest.data}" overwrite="yes" >
179       <fileset refid="org.bedework.shellscr.data" />
180       <filterset refid="property.filters" />
181     </copy>
182
183     <!-- ===============================================================
184                        Build the classpath
185          =============================================================== -->
186
187     <path id="app.run.path">
188       <fileset dir="${app.dest.lib}">
189         <include name="*.jar"/>
190       </fileset>
191       <pathelement location="${app.dest.resources}" />
192     </path>
193     <pathconvert property="app.run.cp" refid="app.run.path"
194                  targetos="unix" >
195       <map from="${app.dest.lib}" to="./lib"/>
196       <map from="${app.dest.resources}" to="./resources"/>
197     </pathconvert>
198     <pathconvert property="app.run.wincp" refid="app.run.path"
199                  targetos="windows" >
200       <map from="${app.dest.lib}" to="./lib"/>
201       <map from="${app.dest.resources}" to="./resources"/>
202     </pathconvert>
203
204     <!-- ===============================================================
205                        Copy and modify the shell script
206          =============================================================== -->
207
208     <copy tofile="${app.dest.home}/${propval.app.shellscr.name}"
209           file="${app.run.shellscr}" >
210       <filterset>
211         <filter token="CP"
212                 value=".:./classes:${app.run.cp}"/>
213       </filterset>
214       <filterset refid="property.filters" />
215     </copy>
216
217     <copy tofile="${app.dest.home}/${propval.app.batscr.name}"
218           file="${app.run.batscr}" >
219       <filterset>
220         <filter token="CP"
221                 value=".;./classes;${app.run.wincp}"/>
222       </filterset>
223       <filterset refid="property.filters" />
224     </copy>
225
226     <!-- build the zip file -->
227     <mkdir dir="${dist.home}" />
228     <delete file="${app.zip.file}" />
229
230     <zip destfile="${app.zip.file}" >
231       <zipfileset prefix="${propval.app.zip.name}" dir="${app.dest.home}" />
232     </zip>
233   </target>
234
235   <target name="add.jdbcdriver" if="propval.app.jdbcdriver.jar">
236     <copy todir="${app.dest.lib}" file="${propval.app.jdbcdriver.jar}"/>
237   </target>
238 </project>
239
Note: See TracBrowser for help on using the browser.