root/trunk/build/platforms/runnableService.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 platform specific build files to force the build
5      of a runnable form. It adds the targets:
6         runnableDoHibProps: builds a set of properties for the service
7         runnableAddLibs: add libraries for this platform
8         runnableAddResources: add anything we want in the resources directory
9         runnableAddExtras: add scripts for runnable versions
10         runnableDeployService: deploy the service
11      =================================================================== -->
12
13 <project name="bedework.runnableService" default="runnableDoHibProps" >
14   <target name="runnableDoHibProps" >
15     <echo file="${app.dest.classes}/hibernate.properties">
16 hibernate.query.substitutions true 'T', false 'F', yes 'Y', no 'N'
17 hibernate.dialect=${org.bedework.global.hibernate.dialect}
18 hibernate.connection.driver_class=${org.bedework.global.jdbcdriver}
19 hibernate.connection.username=${org.bedework.global.jdbcid}
20 hibernate.connection.password=${org.bedework.global.jdbcpw}
21 hibernate.connection.url=${org.bedework.global.jdbcurl}
22 hibernate.bytecode.use_reflection_optimizer=false
23 hibernate.cache.use_second_level_cache=false
24 #
25 # Here for better debugging
26 #
27 hibernate.jdbc.batch_size=0
28     </echo>
29   </target>
30        
31   <!-- ================================================================
32        Add libraries
33        ================================================================ -->
34
35   <target name="runnableAddLibs">
36     <!-- any extra files -->
37    <copy todir="${app.dest.lib}" >
38      <fileset dir="${org.bedework.temp.extrajars.dir}" />
39    </copy>
40
41     <!-- jdbc stuff -->
42
43     <if>
44       <available file="${org.bedework.global.ext.lib}/jdbc" type="dir" />
45       <then>
46         <!-- jdbc drivers -->
47         <copy todir="${app.dest.lib}" flatten="yes" >
48           <!-- local jdbc drivers -->
49           <fileset dir="${org.bedework.global.ext.lib}/jdbc">
50             <include name="*.jar"/>
51           </fileset>
52         </copy>
53       </then>
54     </if>
55   </target>
56  
57   <!-- ================================================================
58        Add resources
59        ================================================================ -->
60
61   <target name="runnableAddResources">
62     <property name="app.dest.resources"
63               location="${app.dest.home}/resources" />
64        
65     <mkdir dir="${app.dest.resources}"/>
66
67     <copy tofile="${app.dest.resources}/log4j.xml"
68           file="${org.bedework.runsh.log4j.xml}"
69           failonerror="false" />
70         </target>
71  
72   <!-- ================================================================
73        Add extras
74        ================================================================ -->
75
76   <target name="runnableAddExtras">
77     <!-- ===============================================================
78                        Build the classpath
79          =============================================================== -->
80
81     <path id="app.run.path">
82       <fileset dir="${app.dest.lib}">
83         <include name="*.jar"/>
84       </fileset>
85       <pathelement location="${app.dest.resources}" />
86     </path>
87     <pathconvert property="app.run.cp" refid="app.run.path"
88                  targetos="unix" >
89       <map from="${app.dest.lib}" to="./lib"/>
90       <map from="${app.dest.resources}" to="./resources"/>
91     </pathconvert>
92     <pathconvert property="app.run.wincp" refid="app.run.path"
93                  targetos="windows" >
94       <map from="${app.dest.lib}" to="./lib"/>
95       <map from="${app.dest.resources}" to="./resources"/>
96     </pathconvert>
97
98     <!-- ===============================================================
99                        Copy and modify the shell script
100          =============================================================== -->
101
102     <copy tofile="${app.dest.home}/${propval.app.shellscr.name}"
103           file="${app.run.shellscr}" >
104       <filterset>
105         <filter token="CP"
106                 value=".:./classes:${app.run.cp}"/>
107       </filterset>
108       <filterset refid="property.filters" />
109     </copy>
110
111     <copy tofile="${app.dest.home}/${propval.app.batscr.name}"
112           file="${app.run.batscr}" >
113       <filterset>
114         <filter token="CP"
115                 value=".;./classes;${app.run.wincp}"/>
116       </filterset>
117       <filterset refid="property.filters" />
118     </copy>
119
120     <!-- build the zip file -->
121     <mkdir dir="${dist.home}" />
122     <delete file="${app.zip.file}" />
123
124     <zip destfile="${app.zip.file}" >
125       <zipfileset prefix="${propval.app.zip.name}" dir="${app.dest.home}" />
126     </zip>
127   </target>
128  
129   <!-- ================================================================
130        Deploy the service
131        ================================================================ -->
132
133   <target name="runnableDeployService">
134     <!-- Nothing to do for runnable services -->
135   </target>
136 </project>
Note: See TracBrowser for help on using the browser.