root/trunk/build/platforms/jbossService.xml

Revision 3148 (checked in by douglm, 2 years ago)

Small change to incorporate bedework services in ear file. Should reduce startup time and build/deploy time as well as memory usage

Line 
1 <?xml version="1.0"?>
2
3 <!-- ===================================================================
4      This file is imported by buildsh.xml and others and adds the targets:
5         doHibProps: builds a set of properties for the service
6         addLibs: add libraries for this platform
7         addResources: add anything we want in the resources directory
8         addExtras: add scripts for runnable versions and META-INF for
9                    jboss services etc.
10         deployService: deploy the service
11      =================================================================== -->
12
13 <project name="bedework.platformService" default="doHibProps" >
14   <import file="${build.dir}/platforms/runnableService.xml" />
15
16   <target name="doHibProps" >
17     <if>
18       <istrue value="${propval.app.runnable}" />
19       <then>
20         <antcall target="runnableDoHibProps" inheritRefs="true" />
21       </then>
22       <else>
23         <mkdir dir="${app.dest.classes}"/>
24        
25         <echo file="${app.dest.classes}/hibernate.properties">
26 hibernate.query.substitutions true 'T', false 'F', yes 'Y', no 'N'
27 hibernate.dialect=${org.bedework.global.hibernate.dialect}
28        
29 hibernate.connection.datasource=java:${org.bedework.jboss.datasource.jndiname}
30
31 hibernate.bytecode.use_reflection_optimizer=false
32 hibernate.cache.use_second_level_cache=false
33 #
34 # Here for better debugging
35 #
36 hibernate.jdbc.batch_size=0
37     </echo>
38       </else>
39     </if>
40   </target>
41  
42   <!-- ================================================================
43        Add libraries
44        ================================================================ -->
45
46   <target name="addLibs">
47     <if>
48       <istrue value="${propval.app.runnable}" />
49       <then>
50         <property name="app.dest.lib"
51                   location="${app.dest.home}/lib" />
52         <antcall target="runnableAddLibs" inheritRefs="true" />
53       </then>
54       <else>
55         <!-- Library in sar file -->
56         <property name="app.dest.lib"
57                   location="${app.dest.webinf}/lib" />
58        
59         <copy todir="${app.dest.lib}" >
60           <fileset dir="${org.bedework.temp.extrajars.dir}" />
61         </copy>
62        
63         <if>
64           <istrue value="${propval.app.in.ear}"/>
65           <then>
66             <!-- Preserve extra jars for later -->
67             <copy todir="${org.bedework.temp.ear.extrajars.dir}" >
68               <fileset dir="${org.bedework.temp.extrajars.dir}" />
69             </copy>
70           </then>
71         </if>
72        
73         <if>
74           <not>
75             <isset property="propval.app.no.defaultlibs" />
76           </not>
77           <then>
78             <antcall target="copyLibs" inheritRefs="true" />
79           </then>
80         </if>
81       </else>
82     </if>
83   </target>
84  
85   <!-- ================================================================
86        Add resources
87        ================================================================ -->
88
89   <target name="addResources">
90     <if>
91       <istrue value="${propval.app.runnable}" />
92       <then>
93         <antcall target="runnableAddResources" inheritRefs="true" />
94       </then>
95       <else>
96         <!-- None for this platform -->
97       </else>
98     </if>
99   </target>
100  
101   <!-- ================================================================
102        Add extras
103        ================================================================ -->
104
105   <target name="addExtras">
106     <if>
107       <istrue value="${propval.app.runnable}" />
108       <then>
109         <antcall target="runnableAddExtras" inheritRefs="true" />
110       </then>
111       <else>
112         <property name="metainf.dir"
113                   location="${app.resources.dir}/../META-INF" />
114    
115         <mkdir dir="${app.dest.home}/META-INF" />
116        
117         <echo file="${app.dest.home}/META-INF/jboss-structure.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
118 <structure>
119   <context>
120     <path name=""/>
121     <metaDataPath>
122       <path name="META-INF"/>
123     </metaDataPath>       
124     <classpath>
125       <path name="classes"/>
126       <path name="lib" suffixes=".jar" />
127     </classpath>
128   </context>
129 </structure>
130 ]]></echo>
131        
132         <copy todir="${app.dest.home}/META-INF">
133           <fileset dir="${metainf.dir}" />
134           <filterset refid="property.filters" />
135         </copy>
136       </else>
137     </if>
138   </target>
139
140   <target name="deployService">
141     <!-- copy the sar - at the moment copy the uncompressed. -->
142
143     <if>
144       <istrue value="${propval.app.runnable}" />
145       <then>
146         <antcall target="runnableDeployService" inheritRefs="true" />
147       </then>
148       <else>
149         <if>
150           <isset property="org.bedework.appserver.deploy.dir" />
151           <then>
152             <property name="app.dest.home"
153                       location="${org.bedework.temp.shellscr.home}/${propval.app.zip.name}" />
154    
155                 <delete dir="${org.bedework.appserver.deploy.dir}/${propval.app.zip.name}.sar" />
156             <mkdir dir="${org.bedework.appserver.deploy.dir}/${propval.app.zip.name}.sar" />
157             <copy todir="${org.bedework.appserver.deploy.dir}/${propval.app.zip.name}.sar">
158               <fileset dir="${app.dest.home}"/>
159             </copy>
160           </then>
161         </if>
162       </else>
163     </if>
164   </target>
165  
166   <!-- ================================================================
167        Private target to copy libraries
168        ================================================================ -->
169
170   <target name="copyLibs">
171     <!-- hibernate jars -->
172     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.antlr}" />
173     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.asm-attrs}" />
174     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.asm}" />
175     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.cglib}" />
176     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.dom4j}" />
177     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.ehcache}" />
178     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.hibernate}" />
179         <!--
180     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.javassist}" />
181     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.jgroups}" />
182     -->
183     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.jta}" />
184     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-collections}"/>
185     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.slf4j-api}" />
186     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.slf4j-log4j12}" />
187
188     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-logging}"/>
189
190     <!-- core files -->
191
192     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.rpiaccess}" />
193     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.rpiutil}" />
194     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-davio}" />
195
196     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-annotations}" />
197     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-apiutil}" />
198     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calcore}" />
199     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calcorei}" />
200     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calfacade}" />
201     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calsvc}" />
202     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calsvci}" />
203     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-icalendar}" />
204     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-logging}" />
205     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-mail}" />
206     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-sysevents}" />
207
208     <!-- any extra files-->
209    <copy todir="${app.dest.lib}" >
210      <fileset dir="${org.bedework.temp.extrajars.dir}" />
211    </copy>
212
213     <!-- Some more standard libs -->
214     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.lucene-core}"/>
215     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.lucene-misc}"/>
216     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.backport-util-concurrent}"/>
217     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.ical4j}"/>
218     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.ical4j-vcard}"/>
219     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-codec}"/>
220     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-digester}"/>
221     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-httpclient}"/>
222     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-lang}"/>
223     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-ssl}"/>
224   </target>
225 </project>
Note: See TracBrowser for help on using the browser.