root/trunk/build/buildsh.xml

Revision 1178 (checked in by douglm, 6 years ago)

Upgrade ical4j (requires commons-lang)

Ensure a timezone is set in the dtstart object when calling RecurUtil? so that all instances are created when UNTIL is specified

Fix webclient struts-config so that exports work again

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