root/releases/bedework-3.5/build/buildwar.xml

Revision 2141 (checked in by douglm, 4 years ago)

Noticed tha event annotations were getting updated even when no actual updates were taking place. Determined it was hibernate bug

http://opensource.atlassian.com/projects/hibernate/browse/HHH-2606

Upgraded to hibernate 3.3.1 - not a bad thing anyway.

Discovered the hadn't fixed the bug even though it's about 2years old now.

Modified annotation class to use String fro the emptyFlags property instead of the more appropriate char[].

XMl schema changed but not the db schema.

Line 
1 <?xml version="1.0"?>
2
3 <!-- ===================================================================
4      This file is called by other build files to create web applications.
5
6      It is assumed that no changes will be made to this file. It should be
7      possible to make all changes needed by modifying the configuration
8      properties or a bedework.build.proeprties file
9
10      An unwrapped web application will be built in the temp directory
11      and a war and ear file will be left in the dist directory.
12
13      Properties which must be defined on entry, apart from those described
14      in the main build file are:
15     app.root.dir       Location of the root directory for the apps
16     app.sou.dir        Location of the application skeleton,
17     app.name           Name of the application. This wil be used to determine
18                        the name of the file containing the rest of the
19                        application properties, the directory we build in
20                        and the name of war and ear files.
21      These should be defined in the build properties for the application.
22
23      It is possible to define any of the app.dest properties below to override
24      the location of destination files.
25
26      In the directory
27         ${apps.sou.dir}
28      we expect an application skeleton formatted like a web-application
29      For the purposes of this build it should contain a
30      structure like
31               war - docs    (contains jsp and html for this app)
32                     WEB-INF - struts-config.xml
33                               web.xml
34                               jboss-web.xml (for jboss only)
35
36      Authors: Mike Douglass
37      =================================================================== -->
38
39 <project name="bedework.buildwar" default="build" >
40   <import file="${build.dir}/buildfilters.xml" />
41
42   <if>
43     <isset property="org.bedework.global.portal.platform" />
44     <then>
45       <import file="${build.dir}/portals/${org.bedework.global.portal.platform}War.xml" />
46     </then>
47   </if>
48
49   <import file="${build.dir}/platforms/${org.bedework.global.deploy.platform}War.xml" />
50
51   <target name="init" depends="init.common">
52     <if>
53       <isset property="org.bedework.global.build.ear" />
54       <then>
55         <!-- Common library in ear file -->
56         <property name="app.dest.lib"
57                   location="${org.bedework.ear.templib}" />
58
59         <!-- Properties all go into a single jar file at termination -->
60         <property name="app.dest.classes"
61                   location="${org.bedework.ear.properties.dir}" />
62       </then>
63       <else>
64         <!-- Library in war file -->
65         <property name="app.dest.lib"
66                   location="${app.dest.webinf}/lib" />
67
68         <!-- Properties in the war file -->
69         <property name="app.dest.classes"
70                   location="${app.dest.webinf}/classes" />
71       </else>
72     </if>
73     <property name="app.dest.properties"
74               location="${app.dest.classes}/properties/calendar" />
75   </target>
76
77   <target name="init.common">
78     <!-- Destinations - where we build an unwrapped war -->
79     <property name="app.dest.war"
80               location="${org.bedework.temp.wars.home}/${propval.app.war.name}.war" />
81     <property name="app.dest.docs"
82               location="${app.dest.war}/docs" />
83     <property name="app.dest.webinf"
84               location="${app.dest.war}/WEB-INF" />
85     <property name="app.dest.metainf"
86               location="${app.dest.war}/META-INF" />
87
88     <!--temp web.xml location  -->
89     <property name="app.temp.web.xml"
90               location="${app.dest.webinf}/tempweb.xml" />
91
92     <!--final web.xml location  -->
93     <property name="app.dest.web.xml"
94               location="${app.dest.webinf}/web.xml" />
95
96     <property name="app.war.file"
97               location="${dist.home}/${propval.app.war.name}.war" />
98
99     <!-- default web.xml -->
100     <property name="propval.app.web.xml"
101               value="war/WEB-INF/web.xml" />
102
103               <!--
104     <property name="app.web.xml"
105               location="${propval.app.web.xml}" />
106               -->
107     <resolveFile name="app.web.xml"
108                  file="${propval.app.web.xml}"
109                  base="${app.sou.dir}"/>
110
111     <property name="app.sou.properties"
112               location="${app.sou.dir}/war/WEB-INF/classes/servlet.properties" />
113   </target>
114
115   <target name="build" depends="init">
116     <echo message="**************************************************" />
117     <echo message=" * Building war ${propval.app.war.name}"/>
118     <echo message="**************************************************" />
119
120     <delete dir="${app.dest.war}" />
121
122     <!-- Add modifed login pages -->
123     <copy todir="${app.dest.docs}/login" failonerror="false" >
124       <fileset dir="${org.bedework.common.resources}/login" />
125       <filterset>
126         <filter token="DISPLAY-NAME" value="${propval.app.display.name}"/>
127       </filterset>
128     </copy>
129
130     <!-- ===============================================================
131          We copy 3 sets of properties.
132
133          First (for struts) are the servlet properties which ends up as
134               classes/servlet.properties
135          Next we copy in a set of generic property files and then with
136          overwrite we copy in a set of base specific files.
137
138          All are updated with new values.
139          =============================================================== -->
140
141     <if>
142       <available file="${app.sou.dir}/war/docs" type="dir" />
143       <then>
144         <copy todir="${app.dest.docs}">
145           <fileset dir="${app.sou.dir}/war/docs" />
146         </copy>
147       </then>
148     </if>
149
150     <!-- ===============================================================
151          Any property files we need for configuration, other than the
152          standard struts file, should be in the "${app.sou.dir}/properties
153          directory. They will be copied into the appropriate place for the
154          war and transformed by the above filter.
155          =============================================================== -->
156     <if>
157       <available file="${app.sou.dir}/properties" type="dir" />
158       <then>
159         <copy todir="${app.dest.properties}" overwrite="yes" >
160           <fileset dir="${app.sou.dir}/properties"
161                    includes="*.properties"/>
162           <filterset refid="property.filters" />
163         </copy>
164       </then>
165     </if>
166
167     <copy todir="${app.dest.classes}">
168       <fileset dir="${app.sou.dir}/war/WEB-INF/classes"
169                includes="*"/>
170       <filterset refid="property.filters" />
171     </copy>
172
173     <!-- Create the runtime options file -->
174     <mkdir dir="${app.dest.properties}" />
175
176     <copy tofile="${app.dest.properties}/options.xml"
177           file="${org.bedework.config.options}" >
178       <filterset>
179         <filter token="RPI-DEBUG" value="${app.debug.val}"/>
180       </filterset>
181       <filterset refid="property.filters" />
182     </copy>
183
184     <copy tofile="${app.dest.classes}/servlet.properties" file="${app.sou.properties}">
185       <filterset refid="property.filters" />
186     </copy>
187
188     <!-- ===============================================================
189          Add hibernate jars and property files from calendar api.
190          =============================================================== -->
191
192     <copy todir="${app.dest.classes}">
193       <fileset dir="${org.bedework.project.calendarapi}/calCore/resources/properties" />
194       <filterset refid="property.filters" />
195     </copy>
196
197     <copy todir="${app.dest.classes}">
198       <fileset dir="${org.bedework.project.calendarapi}/calCore/resources/hbms" />
199       <filterset refid="property.filters" />
200     </copy>
201
202     <!-- Make a temp copy of the web.xml file -->
203     <copy tofile="${app.temp.web.xml}" file="${app.web.xml}"
204           overwrite="yes" />
205
206     <antcall target="struts-stuff" inheritRefs="true" />
207
208     <!-- Filter the temp copy of the web.xml file -->
209     <copy tofile="${app.dest.web.xml}"
210           file="${app.temp.web.xml}"
211           overwrite="yes" >
212       <filterset>
213         <filter token="RPI-DEBUG" value="${app.debug.val}"/>
214       </filterset>
215       <filterset refid="property.filters" />
216     </copy>
217
218     <delete file="${app.temp.web.xml}" />
219
220     <!-- Add the contex root to the file. Note that newline is required -->
221     <echo file="${org.bedework.global.context.roots}" append="yes">
222 ${propval.app.war.name}.context=${propval.app.context.root}
223     </echo>
224
225     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.antlr}" />
226     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.asm-attrs}" />
227     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.asm}" />
228     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.cglib}" />
229     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.dom4j}" />
230     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.ehcache}" />
231     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.hibernate}" />
232     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.javassist}" />
233     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.jgroups}" />
234     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.jta}" />
235     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.slf4j-api}" />
236     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.slf4j-log4j12}" />
237
238     <antcall target="bexchange-stuff" inheritRefs="true" />
239     <antcall target="domino-stuff" inheritRefs="true" />
240     <antcall target="google-stuff" inheritRefs="true" />
241
242     <!-- ===============================================================
243          Any jar files required
244          =============================================================== -->
245
246     <echo message="+++++++++++  bw-logging at ${org.bedework.appjar.bw-logging}" />
247     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-annotations}" />
248     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.rpiaccess}" />
249     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.rpiutil}" />
250     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-davio}" />
251     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-apiutil}" />
252     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calcore}" />
253     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calcorei}" />
254     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calfacade}" />
255     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calsvc}" />
256     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calsvci}" />
257     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-client}" />
258     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-icalendar}" />
259     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-logging}" />
260     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-mail}" />
261     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-sysevents}" />
262     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-appcommon}" />
263
264     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.lucene-core}"/>
265     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.lucene-misc}"/>
266     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.ical4j}"/>
267     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-codec}"/>
268     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-collections}"/>
269     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-httpclient}"/>
270     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-lang}"/>
271     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-ssl}"/>
272
273     <!-- Mail related stuff -->
274     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.activation}" />
275     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.dsn}" />
276     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.imap}" />
277     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.mailapi}" />
278     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.pop3}" />
279     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.smtp}" />
280
281     <!-- any extra files-->
282     <copy todir="${app.dest.lib}" >
283       <fileset dir="${org.bedework.temp.extrajars.dir}" />
284     </copy>
285
286     <!-- Platform specific -->
287     <antcall target="doPlatform" inheritRefs="true" />
288
289     <!-- build the war file -->
290     <mkdir dir="${dist.home}" />
291     <delete file="${app.war.file}" />
292
293     <war warfile="${app.war.file}"
294          webxml="${app.dest.web.xml}"
295          basedir="${app.dest.war}"
296          excludes="WEB-INF/web.xml" />
297   </target>
298
299   <target name="bexchange-stuff" if="org.bedework.build.caldav.bexchange">
300     <copy tofile="${app.dest.properties}/timezones.xml"
301           file="${org.bedework.project.bedework}/docs/bwtimezones.xml" />
302   </target>
303
304   <target name="domino-stuff" if="org.bedework.build.caldav.domino">
305     <copy tofile="${app.dest.properties}/timezones.xml"
306           file="${org.bedework.project.bedework}/docs/bwtimezones.xml" />
307   </target>
308
309   <target name="google-stuff" if="org.bedework.build.caldav.google">
310     <copy todir="${app.dest.lib}">
311       <fileset dir="${google.dir}">
312         <include name="*.jar"/>
313       </fileset>
314     </copy>
315
316     <copy tofile="${app.dest.properties}/timezones.xml"
317           file="${org.bedework.project.bedework}/docs/bwtimezones.xml" />
318   </target>
319
320   <!-- =================================================================
321        If this is a struts app the following gets executed.
322        We create an updated struts-config.xml file and add some jars.
323        ================================================================= -->
324
325   <target name="struts-stuff" if="org.bedework.strutsapp">
326     <!-- Copy a dummy startup file into the war. -->
327     <copy todir="${app.dest.war}">
328       <fileset dir="${app.sou.dir}/war/" includes="setup.do" />
329     </copy>
330
331     <copy todir="${app.dest.webinf}"
332           file="${app.sou.dir}/war/WEB-INF/struts-config.xml"/>
333
334     <mkdir  dir="${app.dest.webinf}/tlds"/>
335     <copy todir="${app.dest.webinf}/tlds" >
336       <fileset dir="${org.bedework.struts.tlds}">
337         <include name="*"/>
338       </fileset>
339     </copy>
340
341     <if>
342       <isset property="org.bedework.global.portal.platform" />
343       <then>
344         <antcall target="doPortal" inheritRefs="true" />
345       </then>
346     </if>
347
348     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.serializer}"/>
349     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.xalan}"/>
350     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.struts}"/>
351
352     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.antlr}"/>
353     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-beanutils}"/>
354     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-digester}"/>
355     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-fileupload}"/>
356     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-logging}"/>
357     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-validator}"/>
358     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.jakarta-oro}"/>
359     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.jstl}"/>
360     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.jstl-standard}"/>
361   </target>
362 </project>
Note: See TracBrowser for help on using the browser.