root/trunk/build/buildsh.xml

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

Apply fix to restore from 3.0 code

Allow adding/removing event categories in admin and user client. Needs ui changes
Add system property to limit max date of recurring events.
Changed config to set it

Change events code to fix adding of recurring events with Date type dates (as against Date/Time).
Use limits to allow adding of infinite events.

Add code to bulk upload from ics file in admin and user client.

Many Java5 changes - all Collection stuff and nearly done. Down to 80+ eclipse warnings (from 460).

Schema change:
add int columns "bwmax_instances" , "bwmax_years" to Bedework_Settings

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-apiutil*.jar"/>
99         <include name="bw-calcore*.jar"/>
100         <include name="bw-calcorei*.jar"/>
101         <include name="bw-calenv*.jar"/>
102         <include name="bw-calfacade*.jar"/>
103         <include name="bw-calsvc*.jar"/>
104         <include name="bw-calsvci*.jar"/>
105         <include name="bw-icalendar*.jar"/>
106         <include name="bw-locale*.jar"/>
107         <include name="bw-logging*.jar"/>
108       </fileset>
109     </copy>
110
111      <!-- any extra bin files-->
112     <copy todir="${app.dest.lib}" >
113       <fileset refid="app.bin.files" />
114     </copy>
115
116     <!-- Some more standard libs -->
117     <copy todir="${app.dest.lib}" file="${log4j.jar}"/>
118     <copy todir="${app.dest.lib}" file="${ical4j.jar}"/>
119     <copy todir="${app.dest.lib}" file="${commons-digester.jar}"/>
120     <copy todir="${app.dest.lib}" file="${commons-httpclient.jar}"/>
121     <copy todir="${app.dest.lib}" file="${commons-ssl.jar}"/>
122     <copy todir="${app.dest.lib}" file="${commons-codec.jar}"/>
123
124     <!-- Extra libraries specified in calling build file -->
125     <copy todir="${app.dest.lib}" flatten="yes" >
126       <fileset refid="org.bedework.run.jars" />
127       <fileset refid="org.bedework.run.lib.jars" />
128
129       <!-- local jdbc drivers -->
130       <fileset dir="${org.bedework.jdbc.lib}">
131         <include name="*.jar"/>
132       </fileset>
133     </copy>
134
135     <!-- Include the quickstart jdbc driver -->
136     <copy todir="${app.dest.lib}" file="${hsqldb.jdbcdriver.jar}"/>
137
138     <copy todir="${app.dest.classes}">
139       <fileset dir="${org.bedework.project.calendarapi}/calCore/resources/properties" />
140       <filterset refid="property.filters" />
141     </copy>
142
143     <copy todir="${app.dest.classes}">
144       <fileset dir="${org.bedework.project.calendarapi}/calCore/resources/hbms" />
145       <filterset refid="property.filters" />
146     </copy>
147
148     <copy todir="${app.dest.classes}" overwrite="yes" >
149       <fileset refid="org.bedework.extra.resources" />
150       <filterset refid="property.filters" />
151     </copy>
152
153     <!-- add the jdbcdriver if defined -->
154     <antcall target="add.jdbcdriver" inheritRefs="true" />
155
156     <!-- Create the env.properties file -->
157     <mkdir dir="${app.dest.properties}" />
158
159     <copy tofile="${app.dest.properties}/env.properties"
160           file="${org.bedework.config.properties}" />
161
162     <copy tofile="${app.dest.properties}/options.xml"
163           file="${org.bedework.config.options}" />
164
165     <!-- ===============================================================
166                        Add any resource files
167          =============================================================== -->
168
169     <copy tofile="${app.dest.resources}/log4j.xml"
170           file="${org.bedework.runsh.log4j.xml}"
171           failonerror="false" />
172
173     <!-- ===============================================================
174                        Add any data files
175          =============================================================== -->
176
177     <mkdir dir="${app.dest.data}" />
178
179     <copy todir="${app.dest.data}" overwrite="yes" >
180       <fileset refid="org.bedework.shellscr.data" />
181       <filterset refid="property.filters" />
182     </copy>
183
184     <!-- ===============================================================
185                        Build the classpath
186          =============================================================== -->
187
188     <path id="app.run.path">
189       <fileset dir="${app.dest.lib}">
190         <include name="*.jar"/>
191       </fileset>
192       <pathelement location="${app.dest.resources}" />
193     </path>
194     <pathconvert property="app.run.cp" refid="app.run.path"
195                  targetos="unix" >
196       <map from="${app.dest.lib}" to="./lib"/>
197       <map from="${app.dest.resources}" to="./resources"/>
198     </pathconvert>
199     <pathconvert property="app.run.wincp" refid="app.run.path"
200                  targetos="windows" >
201       <map from="${app.dest.lib}" to="./lib"/>
202       <map from="${app.dest.resources}" to="./resources"/>
203     </pathconvert>
204
205     <!-- ===============================================================
206                        Copy and modify the shell script
207          =============================================================== -->
208
209     <copy tofile="${app.dest.home}/${propval.app.shellscr.name}"
210           file="${app.run.shellscr}" >
211       <filterset>
212         <filter token="CP"
213                 value=".:./classes:${app.run.cp}"/>
214       </filterset>
215       <filterset refid="property.filters" />
216     </copy>
217
218     <copy tofile="${app.dest.home}/${propval.app.batscr.name}"
219           file="${app.run.batscr}" >
220       <filterset>
221         <filter token="CP"
222                 value=".;./classes;${app.run.wincp}"/>
223       </filterset>
224       <filterset refid="property.filters" />
225     </copy>
226
227     <!-- build the zip file -->
228     <mkdir dir="${dist.home}" />
229     <delete file="${app.zip.file}" />
230
231     <zip destfile="${app.zip.file}" >
232       <zipfileset prefix="${propval.app.zip.name}" dir="${app.dest.home}" />
233     </zip>
234   </target>
235
236   <target name="add.jdbcdriver" if="propval.app.jdbcdriver.jar">
237     <copy todir="${app.dest.lib}" file="${propval.app.jdbcdriver.jar}"/>
238   </target>
239 </project>
240
Note: See TracBrowser for help on using the browser.