root/trunk/build/buildsh.xml

Revision 3460 (checked in by douglm, 1 year ago)

Almost completely build changes - mostly elimination of the per-project build.properties file.

There is now a single properties file in the config which determines all the project versions - with the exception of deployutil.

This update also includes a new deployment task to collect jar references and license information. A small utility will generate a readable notice and references file for the quickstart and/or the site.

Line 
1 <?xml version="1.0"?>
2
3 <!-- ===================================================================
4      This file builds a runnable application wrapped up as a zip file.
5      Unpacking the zip should result in a directory containing a shell
6      script, a set of jars and any other resources needed.
7
8      Properties we need:
9        app.core.env.pname     core properties source
10        app.run.shellscr       location of the skeleton shell script.
11        app.run.jar.file       application jar file
12        app.run.main.class     main class for application.
13
14      Authors: Mike Douglass   douglm rpi.edu
15      =================================================================== -->
16
17 <project name="bw.buildsh" default="build">
18   <!--<import file="${build.dir}/buildfilters.xml" />-->
19   <buildfilters/>
20  
21   <import file="${build.dir}/platforms/${org.bedework.global.deploy.platform}Service.xml" />
22
23   <target name="init">
24     <!-- Destinations - where we build stuff -->
25     <property name="app.dest.home"
26               location="${org.bedework.temp.shellscr.home}/${propval.app.zip.name}" />
27     <property name="app.dest.lib"
28               location="${app.dest.home}/lib" />
29     <property name="app.dest.classes"
30               location="${app.dest.home}/classes" />
31     <property name="app.dest.properties"
32               location="${app.dest.classes}/properties/${org.bedework.deployment.name}" />
33     <property name="app.dest.data"
34               location="${app.dest.home}/data" />
35
36     <property name="app.zip.file"
37               location="${dist.home}/${propval.app.zip.name}.zip" />
38   </target>
39
40   <!-- ================================================================
41        build target
42        ================================================================ -->
43
44   <target name="build" depends="init">
45     <infoMsg message="* =========== Building ${propval.app.zip.name}" />
46
47     <delete dir="${app.dest.home}" />
48
49     <!-- Library stuff -->
50
51     <mkdir dir="${app.dest.lib}" />
52
53     <!-- Platform specific -->
54     <antcall target="addLibs" inheritRefs="true" />
55
56     <if>
57       <isset property="org.bedework.sou.hibernate.properties" />
58       <then>
59         <if>
60           <istrue value="${org.bedework.build.debug}" />
61           <then>
62             <echo message="************* Copy hib properties from ${org.bedework.sou.hibernate.properties}" />
63           </then>
64         </if>
65         <copy todir="${app.dest.classes}">
66           <fileset dir="${org.bedework.sou.hibernate.properties}/properties" />
67           <filterset refid="property.filters" />
68         </copy>
69    
70         <copy todir="${app.dest.classes}">
71           <fileset dir="${org.bedework.sou.hibernate.properties}/hbms" />
72           <filterset refid="property.filters" />
73         </copy>
74       </then>
75     </if>
76
77     <copy tofile="${app.dest.classes}/sysevents.properties"
78           file="${org.bedework.config.sysevents.properties}" />
79
80     <if>
81       <isreference refid="org.bedework.extra.resources" />
82       <then>
83         <copy todir="${app.dest.classes}" overwrite="yes" >
84           <fileset refid="org.bedework.extra.resources" />
85           <filterset refid="property.filters" />
86         </copy>
87       </then>
88     </if>
89
90     <!-- Platform specific hibernate properties -->
91     <antcall target="doHibProps" inheritRefs="true" />
92
93     <!-- Create the env.properties file -->
94     <mkdir dir="${app.dest.properties}" />
95
96     <copy tofile="${app.dest.properties}/options.xml"
97           file="${org.bedework.config.options}" >
98       <filterset>
99         <filter token="RPI-DEBUG" value="${app.debug.val}"/>
100       </filterset>
101       <filterset refid="property.filters" />
102     </copy>
103
104     <!-- ===============================================================
105                        Add any resource files
106          =============================================================== -->
107
108     <!-- Platform specific -->
109     <antcall target="addResources" inheritRefs="true" />
110
111     <!-- ===============================================================
112                        Add any data files
113          =============================================================== -->
114
115     <if>
116       <istrue value="${org.bedework.shellscr.copy.data}" />
117       <then>
118         <mkdir dir="${app.dest.data}" />
119    
120         <copy todir="${app.dest.data}" overwrite="yes" >
121           <fileset refid="org.bedework.shellscr.data" />
122           <filterset refid="property.filters" />
123         </copy>
124       </then>
125     </if>
126
127     <!-- ===============================================================
128                        Add any extra stuff
129          =============================================================== -->
130
131     <!-- Platform specific -->
132     <antcall target="addExtras" inheritRefs="true" />
133    
134     <!-- ================================================================
135          Build the zip file
136          ================================================================ -->
137
138     <mkdir dir="${dist.home}" />
139     <delete file="${app.zip.file}" />
140
141     <zip destfile="${app.zip.file}" >
142       <zipfileset prefix="${propval.app.zip.name}" dir="${app.dest.home}" />
143     </zip>
144   </target>
145 </project>
Note: See TracBrowser for help on using the browser.