root/releases/bedework-3.7/build/platforms/jbossWar.xml

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

Updates to handle vcard driven preferences

Add vcard to the libraries so we can process vcards from carddav
Update carddav options.
Change directory info to include new properties and link to it from the principal object
Add directory methods to get the information
Add a carddav client and provide a method to get the card for a principal
Fix to webdav - generating bad hrefs
Undo bad change to attendees.jsp

Line 
1 <?xml version="1.0"?>
2
3 <!-- ===================================================================
4      This file is imported by buildwar.xml and adds the targets
5      which will be invoked by the buildwar targets.
6         addLibs: add libraries for this platform
7         doPlatform - misc stuff
8         deployWar: deploy the war to the server
9         deployEar: deploy the ear to the server
10      =================================================================== -->
11
12 <project name="bedework.platformWar" default="doPlatform" >
13   <target name="doPlatform" >
14     <!-- ===============================================================
15          We create an updated jboss-web.xml file (for jboss) and a ear
16          =============================================================== -->
17
18     <copy todir="${app.dest.webinf}"
19           file="${app.sou.dir}/war/WEB-INF/jboss-web.xml">
20       <filterset refid="property.filters" />
21     </copy>
22
23     <if>
24       <isset property="propval.app.virtual.host" />
25       <then>
26         <replace file="${app.dest.webinf}/jboss-web.xml">
27           <replacetoken><![CDATA[<!-- Virtual host -->]]></replacetoken>
28           <replacevalue><![CDATA[<virtual-host>@VIRTUAL-HOST@</virtual-host>
29           ]]>
30           </replacevalue>
31         </replace>
32         <replace file="${app.dest.webinf}/jboss-web.xml">
33           <replacefilter token="@VIRTUAL-HOST@" value="${propval.app.virtual.host}"/>
34         </replace>
35       </then>
36     </if>
37   </target>
38  
39   <!-- ================================================================
40        Add libraries
41        ================================================================ -->
42
43   <target name="addLibs">
44     <if>
45       <not>
46         <isset property="org.bedework.global.build.ear" />
47       </not>
48       <then>
49         <!-- Library in war file -->
50         <property name="app.dest.lib"
51                   location="${app.dest.webinf}/lib" />
52         <antcall target="copyLibs" inheritRefs="true" />
53       </then>
54       <else>
55         <!-- Preserve extra jars for later -->
56         <copy todir="${org.bedework.temp.ear.extrajars.dir}" >
57           <fileset dir="${org.bedework.temp.extrajars.dir}" />
58         </copy>
59       </else>
60     </if>
61   </target>
62  
63   <!-- ================================================================
64        Deploy war
65        ================================================================ -->
66
67   <target name="deployWar">
68     <if>
69       <not>
70         <isset property="org.bedework.global.build.ear" />
71       </not>
72       <then>
73         <echo message="***************************************************************" />
74         <echo message="Deploying standalone app ${app.war.file} into ${org.bedework.appserver.dir}/${propval.app.deploy.dir}" />
75         <echo message="***************************************************************" />
76
77         <!-- copy the war file. -->
78         <copy todir="${org.bedework.appserver.dir}/${propval.app.deploy.dir}" file="${app.war.file}"
79               overwrite="yes" />
80
81         <!-- Delete expanded version -->
82         <delete dir="${org.bedework.appserver.dir}/${propval.app.deploy.dir}/${propval.app.war.name}" />
83       </then>
84     </if>
85   </target>
86    
87   <!-- ================================================================
88        Deploy ear
89        ================================================================ -->
90
91   <target name="deployEar">
92     <!-- Common library in ear file -->
93     <property name="app.dest.lib"
94               location="${org.bedework.ear.dir}" />
95     <antcall target="copyLibs" inheritRefs="true" />
96
97         <!-- And the extra jars we preserved -->
98     <copy todir="${app.dest.lib}" >
99       <fileset dir="${org.bedework.temp.ear.extrajars.dir}" />
100     </copy>
101        
102     <echo message="***************************************************************" />
103     <echo message="Building ear file for jboss deployment" />
104     <echo message="***************************************************************" />
105
106     <jar jarfile="${org.bedework.ear.properties.jar}">
107       <fileset dir="${org.bedework.ear.properties.dir}"/>
108     </jar>
109
110     <path id="app.xml.cp">
111       <pathelement location="${org.bedework.deployutil.jar}"/>
112     </path>
113
114     <taskdef name="applicationXml"
115              classname="org.bedework.deployment.ApplicationXmlTask">
116       <classpath refid="app.xml.cp"/>
117     </taskdef>
118
119     <echo message="outFile=${org.bedework.ear.dir}/META-INF/application.xml
120                     warDir=${org.bedework.temp.dir}/wars
121                     contexts=${org.bedework.global.context.roots}" />
122
123     <applicationXml displayName="Bedework calendar suite"
124                     outFile="${org.bedework.ear.dir}/META-INF/application.xml"
125                     warDir="${org.bedework.temp.dir}/wars"
126                     contexts="${org.bedework.global.context.roots}">
127       <fileset dir="${org.bedework.ear.dir}">
128         <include name="*.jar"/>
129       </fileset>
130     </applicationXml>
131        
132     <echo file="${org.bedework.ear.dir}/META-INF/jboss-app.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
133 <jboss-app>
134    <loader-repository>
135      org.bedework:archive=@EAR_NAME@
136      <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
137    </loader-repository>
138 </jboss-app>
139 ]]></echo>
140        
141     <replace file="${org.bedework.ear.dir}/META-INF/jboss-app.xml"
142                token="@EAR_NAME@"
143                value="${app.ear.file.name}"/>
144            
145     <manifest file="${org.bedework.ear.dir}/META-INF/MANIFEST.MF" />
146
147     <if>
148       <equals arg1="${org.bedework.global.ear.wars.zipped}"
149               arg2="yes" />
150       <then>
151         <copy toDir="${org.bedework.ear.dir}">
152           <fileset dir="${dist.home}"
153                    includes="*.war" />
154         </copy>
155       </then>
156       <else>
157         <copy toDir="${org.bedework.ear.dir}">
158           <fileset dir="${org.bedework.temp.wars.home}"/>
159         </copy>
160       </else>
161     </if>
162
163     <if>
164       <equals arg1="${org.bedework.global.ear.zipped}"
165               arg2="yes" />
166       <then>
167          <zip destfile="${org.bedework.ear.file}"
168              basedir="${org.bedework.ear.dir}"/>
169       </then>
170     </if>
171
172     <!-- copy the ear - at the moment copy the uncompressed. -->
173
174     <if>
175       <isset property="org.bedework.appserver.deploy.dir" />
176       <then>
177         <delete dir="${org.bedework.appserver.deploy.dir}/${app.ear.file.name}" />
178         <mkdir dir="${org.bedework.appserver.deploy.dir}/${app.ear.file.name}" />
179         <copy todir="${org.bedework.appserver.deploy.dir}/${app.ear.file.name}">
180           <fileset dir="${org.bedework.ear.dir}"/>
181         </copy>
182       </then>
183     </if>
184   </target>
185  
186   <!-- ================================================================
187        Private target to copy libraries
188        ================================================================ -->
189
190   <target name="copyLibs">
191     <!-- hibernate jars -->
192     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.antlr}" />
193     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.asm-attrs}" />
194     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.asm}" />
195     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.cglib}" />
196     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.dom4j}" />
197     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.ehcache}" />
198     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.hibernate}" />
199     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.javassist}" />
200     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.jta}" />
201     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.slf4j-api}" />
202     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.slf4j-log4j12}" />
203
204     <if>
205       <isset property="org.bedework.build.caldav.google" />
206       <then>
207         <copy todir="${app.dest.lib}">
208           <fileset dir="${google.dir}">
209             <include name="*.jar"/>
210           </fileset>
211         </copy>
212       </then>
213     </if>
214
215     <!-- ===============================================================
216          Any jar files required
217          =============================================================== -->
218
219     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-annotations}" />
220     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.rpiaccess}" />
221     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.rpiutil}" />
222     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-davio}" />
223     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-apiutil}" />
224     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calcore}" />
225     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calcorei}" />
226     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calfacade}" />
227     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calsvc}" />
228     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calsvci}" />
229     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-client}" />
230     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-icalendar}" />
231     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-logging}" />
232     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-mail}" />
233     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-sysevents}" />
234     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-appcommon}" />
235
236     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.lucene-core}"/>
237     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.lucene-misc}"/>
238     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.backport-util-concurrent}"/>
239     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.ical4j}"/>
240     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.ical4j-vcard}"/>
241     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-codec}"/>
242     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-collections}"/>
243     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-httpclient}"/>
244     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-lang}"/>
245     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-ssl}"/>
246
247     <!-- Mail related stuff -->
248     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.activation}" />
249     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.dsn}" />
250     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.imap}" />
251     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.mailapi}" />
252     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.pop3}" />
253     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.smtp}" />
254
255     <!-- any extra files-->
256     <copy todir="${app.dest.lib}" >
257       <fileset dir="${org.bedework.temp.extrajars.dir}" />
258     </copy>
259
260         <!-- Add the struts stuff -->
261     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.serializer}"/>
262     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.xalan}"/>
263     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.struts}"/>
264
265     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-beanutils}"/>
266     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-digester}"/>
267     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-fileupload}"/>
268     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-validator}"/>
269     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.jakarta-oro}"/>
270     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.jstl}"/>
271     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.jstl-standard}"/>
272   </target>
273 </project>
Note: See TracBrowser for help on using the browser.