root/trunk/build/platforms/jbossService.xml

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

Fixed a build bug that caused a build failure after a clean.
Removed a lot of copying of files. There's now a definition of exactly which libraries are needed for the ears. This allows us to be more specific about which jars get loaded

Removed some geronimo stuff added a while back. It was all out of date.

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       </else>
73     </if>
74   </target>
75  
76   <!-- ================================================================
77        Add resources
78        ================================================================ -->
79
80   <target name="addResources">
81     <if>
82       <istrue value="${propval.app.runnable}" />
83       <then>
84         <antcall target="runnableAddResources" inheritRefs="true" />
85       </then>
86       <else>
87         <!-- None for this platform -->
88       </else>
89     </if>
90   </target>
91  
92   <!-- ================================================================
93        Add extras
94        ================================================================ -->
95
96   <target name="addExtras">
97     <if>
98       <istrue value="${propval.app.runnable}" />
99       <then>
100         <antcall target="runnableAddExtras" inheritRefs="true" />
101       </then>
102       <else>
103         <property name="metainf.dir"
104                   location="${app.resources.dir}/../META-INF" />
105    
106         <mkdir dir="${app.dest.home}/META-INF" />
107        
108         <echo file="${app.dest.home}/META-INF/jboss-structure.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
109 <structure>
110   <context>
111     <path name=""/>
112     <metaDataPath>
113       <path name="META-INF"/>
114     </metaDataPath>       
115     <classpath>
116       <path name="classes"/>
117       <path name="lib" suffixes=".jar" />
118     </classpath>
119   </context>
120 </structure>
121 ]]></echo>
122        
123         <copy todir="${app.dest.home}/META-INF">
124           <fileset dir="${metainf.dir}" />
125           <filterset refid="property.filters" />
126         </copy>
127       </else>
128     </if>
129   </target>
130
131   <target name="deployService">
132     <!-- copy the sar - at the moment copy the uncompressed. -->
133
134     <if>
135       <istrue value="${propval.app.runnable}" />
136       <then>
137         <antcall target="runnableDeployService" inheritRefs="true" />
138       </then>
139       <else>
140         <if>
141           <isset property="org.bedework.appserver.deploy.dir" />
142           <then>
143             <property name="app.dest.home"
144                       location="${org.bedework.temp.shellscr.home}/${propval.app.zip.name}" />
145    
146                 <delete dir="${org.bedework.appserver.deploy.dir}/${propval.app.zip.name}.sar" />
147             <mkdir dir="${org.bedework.appserver.deploy.dir}/${propval.app.zip.name}.sar" />
148             <copy todir="${org.bedework.appserver.deploy.dir}/${propval.app.zip.name}.sar">
149               <fileset dir="${app.dest.home}"/>
150             </copy>
151           </then>
152         </if>
153       </else>
154     </if>
155   </target>
156 </project>
Note: See TracBrowser for help on using the browser.