root/trunk/build/platforms/tomcat5Service.xml

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

JBoss support. First stage in deploying applications as services in jboss.

Restructure shell script builds to provide platform specific options. Use that feature to create jboss services (sar files) that can be deployed within the server.

All this work is based on jboss 5.1.0.GA

In addition there is some partial support for geronimo. This is not complete

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      =================================================================== -->
11
12 <project name="bedework.platformService" default="doHibProps" >
13   <target name="doHibProps" >
14     <echo file="${app.dest.classes}/hibernate.properties">
15 hibernate.query.substitutions true 'T', false 'F', yes 'Y', no 'N'
16 hibernate.dialect=${org.bedework.global.hibernate.dialect}
17 hibernate.connection.driver_class=${org.bedework.global.jdbcdriver}
18 hibernate.connection.username=${org.bedework.global.jdbcid}
19 hibernate.connection.password=${org.bedework.global.jdbcpw}
20 hibernate.connection.url=${org.bedework.global.jdbcurl}
21 hibernate.bytecode.use_reflection_optimizer=false
22 hibernate.cache.use_second_level_cache=false
23 #
24 # Here for better debugging
25 #
26 hibernate.jdbc.batch_size=0
27     </echo>
28   </target>
29        
30   <!-- ================================================================
31        Add libraries
32        ================================================================ -->
33
34   <target name="addLibs">
35     <!-- hibernate jars -->
36     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.antlr}" />
37     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.asm-attrs}" />
38     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.asm}" />
39     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.cglib}" />
40     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.dom4j}" />
41     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.ehcache}" />
42     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.hibernate}" />
43     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.javassist}" />
44     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.jgroups}" />
45     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.jta}" />
46     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-collections}"/>
47     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.slf4j-api}" />
48     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.slf4j-log4j12}" />
49
50     <!-- jms support -->
51     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.activemq-core}" />
52     <copy todir="${app.dest.lib}"
53           file="${org.bedework.appjar.geronimo-j2ee-management_1.0_spec}" />
54     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.jms}" />
55
56     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-logging}"/>
57
58     <!-- core files -->
59
60     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.rpiaccess}" />
61     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.rpiutil}" />
62     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-davio}" />
63
64     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-annotations}" />
65     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-apiutil}" />
66     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calcore}" />
67     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calcorei}" />
68     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calfacade}" />
69     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calsvc}" />
70     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-calsvci}" />
71     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-icalendar}" />
72     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-logging}" />
73     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-mail}" />
74     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.bw-sysevents}" />
75
76     <!-- any extra files-->
77    <copy todir="${app.dest.lib}" >
78      <fileset dir="${org.bedework.temp.extrajars.dir}" />
79    </copy>
80
81     <!-- Some more standard libs -->
82     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.log4j}"/>
83     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.lucene-core}"/>
84     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.lucene-misc}"/>
85     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.ical4j}"/>
86     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-codec}"/>
87     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-digester}"/>
88     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-httpclient}"/>
89     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-lang}"/>
90     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.commons-ssl}"/>
91
92     <!-- jdbc stuff -->
93
94     <if>
95       <available file="${org.bedework.global.ext.lib}/jdbc" type="dir" />
96       <then>
97         <!-- jdbc drivers -->
98         <copy todir="${app.dest.lib}" flatten="yes" >
99           <!-- local jdbc drivers -->
100           <fileset dir="${org.bedework.global.ext.lib}/jdbc">
101             <include name="*.jar"/>
102           </fileset>
103         </copy>
104       </then>
105       <else>
106         <!-- Include the quickstart jdbc driver -->
107         <copy todir="${app.dest.lib}" file="${org.bedework.appjar.hsqldb}"/>
108       </else>
109     </if>
110   </target>
111  
112   <!-- ================================================================
113        Add resources
114        ================================================================ -->
115
116   <target name="addResources">
117     <property name="app.dest.resources"
118               location="${app.dest.home}/resources" />
119        
120     <mkdir dir="${app.dest.resources}"/>
121
122     <copy tofile="${app.dest.resources}/log4j.xml"
123           file="${org.bedework.runsh.log4j.xml}"
124           failonerror="false" />
125         </target>
126  
127   <!-- ================================================================
128        Add extras
129        ================================================================ -->
130
131   <target name="addExtras">
132     <!-- ===============================================================
133                        Build the classpath
134          =============================================================== -->
135
136     <path id="app.run.path">
137       <fileset dir="${app.dest.lib}">
138         <include name="*.jar"/>
139       </fileset>
140       <pathelement location="${app.dest.resources}" />
141     </path>
142     <pathconvert property="app.run.cp" refid="app.run.path"
143                  targetos="unix" >
144       <map from="${app.dest.lib}" to="./lib"/>
145       <map from="${app.dest.resources}" to="./resources"/>
146     </pathconvert>
147     <pathconvert property="app.run.wincp" refid="app.run.path"
148                  targetos="windows" >
149       <map from="${app.dest.lib}" to="./lib"/>
150       <map from="${app.dest.resources}" to="./resources"/>
151     </pathconvert>
152
153     <!-- ===============================================================
154                        Copy and modify the shell script
155          =============================================================== -->
156
157     <copy tofile="${app.dest.home}/${propval.app.shellscr.name}"
158           file="${app.run.shellscr}" >
159       <filterset>
160         <filter token="CP"
161                 value=".:./classes:${app.run.cp}"/>
162       </filterset>
163       <filterset refid="property.filters" />
164     </copy>
165
166     <copy tofile="${app.dest.home}/${propval.app.batscr.name}"
167           file="${app.run.batscr}" >
168       <filterset>
169         <filter token="CP"
170                 value=".;./classes;${app.run.wincp}"/>
171       </filterset>
172       <filterset refid="property.filters" />
173     </copy>
174
175     <!-- build the zip file -->
176     <mkdir dir="${dist.home}" />
177     <delete file="${app.zip.file}" />
178
179     <zip destfile="${app.zip.file}" >
180       <zipfileset prefix="${propval.app.zip.name}" dir="${app.dest.home}" />
181     </zip>
182   </target>
183 </project>
Note: See TracBrowser for help on using the browser.