root/trunk/build/buildsh.xml

Revision 1086 (checked in by douglm, 7 years ago)

Upgrade to lucene 2.0.0

Add limits to searches - ui changes still pending.

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="uwcal.buildsh" default="build">
18   <target name="init">
19     <!-- Load the location of the libraries -->
20     <property file="${org.bedework.project.bedework}/build/libjars.properties" />
21
22     <!-- Destinations - where we build stuff -->
23     <property name="app.dest.home"
24               location="${org.bedework.temp.shellscr.home}/${propval.app.zip.name}" />
25     <property name="app.dest.lib"
26               location="${app.dest.home}/lib" />
27     <property name="app.dest.classes"
28               location="${app.dest.home}/classes" />
29     <property name="app.dest.properties"
30               location="${app.dest.classes}/properties/calendar" />
31     <property name="app.dest.resources"
32               location="${app.dest.home}/resources" />
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     <filterset id="property.filters" >
46       <filter token="BW-APP-NAME"
47               value="${org.bedework.deploy.name}"/>
48
49       <filter token="HIBERNATE-DIALECT"
50               value="${org.bedework.global.hibernate.dialect}" />
51
52       <filter token="DIRECTORY-BROWSING-DISALLOWED"
53               value="${org.bedework.global.directory.browsing.disallowed}" />
54
55       <filter token="APP-DESCRIPTION"
56               value="${propval.app.description}" />
57
58       <filter token="CALDAVTEST-CLASS"
59               value="org.bedework.caldav.test.TestCalDav"/>
60
61       <filter token="DUMP-CLASS"
62               value="org.bedework.dumprestore.dump.Dump"/>
63       <filter token="RESTORE-CLASS"
64               value="org.bedework.dumprestore.restore.Restore"/>
65
66       <filter token="APP-NAME"
67               value="${propval.app.name}"/>
68       <filter token="APP-VERSION"
69               value="${propval.app.version}"/>
70     </filterset>
71
72     <delete dir="${app.dest.home}" />
73
74     <!-- Library stuff -->
75
76     <mkdir dir="${app.dest.lib}" />
77
78     <copy todir="${app.dest.lib}">
79       <fileset dir="${hibernate.jars.dir}">
80         <include name="*.jar"/>
81       </fileset>
82     </copy>
83
84     <copy todir="${app.dest.lib}" file="${commons-collections.jar}"/>
85     <copy todir="${app.dest.lib}" file="${commons-logging.jar}"/>
86
87     <!-- core files -->
88
89     <copy todir="${app.dest.lib}" overwrite="yes">
90       <fileset dir="${bin.home}">
91         <!-- jars from sub-projects needed by all -->
92         <include name="rpiaccess*.jar"/>
93         <include name="rpiutil*.jar"/>
94         <include name="bw-davdefs*.jar"/>
95         <include name="bw-davio*.jar"/>
96
97         <!-- Calendar api jars -->
98         <include name="bw-apiutil*.jar"/>
99         <include name="bw-calcore*.jar"/>
100         <include name="bw-calcorei*.jar"/>
101         <include name="bw-calenv*.jar"/>
102         <include name="bw-calfacade*.jar"/>
103         <include name="bw-calsvc*.jar"/>
104         <include name="bw-calsvci*.jar"/>
105         <include name="bw-icalendar*.jar"/>
106         <include name="bw-locale*.jar"/>
107         <include name="bw-logging*.jar"/>
108       </fileset>
109     </copy>
110
111      <!-- any extra bin files-->
112     <copy todir="${app.dest.lib}" >
113       <fileset refid="app.bin.files" />
114     </copy>
115
116     <!-- Some more standard libs -->
117     <copy todir="${app.dest.lib}" file="${log4j.jar}"/>
118     <copy todir="${app.dest.lib}" file="${lucene.core.jar}"/>
119     <copy todir="${app.dest.lib}" file="${lucene.misc.jar}"/>
120     <copy todir="${app.dest.lib}" file="${ical4j.jar}"/>
121     <copy todir="${app.dest.lib}" file="${commons-digester.jar}"/>
122     <copy todir="${app.dest.lib}" file="${commons-httpclient.jar}"/>
123     <copy todir="${app.dest.lib}" file="${commons-ssl.jar}"/>
124     <copy todir="${app.dest.lib}" file="${commons-codec.jar}"/>
125
126     <!-- Extra libraries specified in calling build file -->
127     <copy todir="${app.dest.lib}" flatten="yes" >
128       <fileset refid="org.bedework.run.jars" />
129       <fileset refid="org.bedework.run.lib.jars" />
130
131       <!-- local jdbc drivers -->
132       <fileset dir="${org.bedework.jdbc.lib}">
133         <include name="*.jar"/>
134       </fileset>
135     </copy>
136
137     <!-- Include the quickstart jdbc driver -->
138     <copy todir="${app.dest.lib}" file="${hsqldb.jdbcdriver.jar}"/>
139
140     <copy todir="${app.dest.classes}">
141       <fileset dir="${org.bedework.project.calendarapi}/calCore/resources/properties" />
142       <filterset refid="property.filters" />
143     </copy>
144
145     <copy todir="${app.dest.classes}">
146       <fileset dir="${org.bedework.project.calendarapi}/calCore/resources/hbms" />
147       <filterset refid="property.filters" />
148     </copy>
149
150     <copy todir="${app.dest.classes}" overwrite="yes" >
151       <fileset refid="org.bedework.extra.resources" />
152       <filterset refid="property.filters" />
153     </copy>
154
155     <!-- add the jdbcdriver if defined -->
156     <antcall target="add.jdbcdriver" inheritRefs="true" />
157
158     <!-- Create the env.properties file -->
159     <mkdir dir="${app.dest.properties}" />
160
161     <copy tofile="${app.dest.properties}/env.properties"
162           file="${org.bedework.config.properties}" />
163
164     <copy tofile="${app.dest.properties}/options.xml"
165           file="${org.bedework.config.options}" />
166
167     <!-- ===============================================================
168                        Add any resource files
169          =============================================================== -->
170
171     <copy tofile="${app.dest.resources}/log4j.xml"
172           file="${org.bedework.runsh.log4j.xml}"
173           failonerror="false" />
174
175     <!-- ===============================================================
176                        Add any data files
177          =============================================================== -->
178
179     <mkdir dir="${app.dest.data}" />
180
181     <copy todir="${app.dest.data}" overwrite="yes" >
182       <fileset refid="org.bedework.shellscr.data" />
183       <filterset refid="property.filters" />
184     </copy>
185
186     <!-- ===============================================================
187                        Build the classpath
188          =============================================================== -->
189
190     <path id="app.run.path">
191       <fileset dir="${app.dest.lib}">
192         <include name="*.jar"/>
193       </fileset>
194       <pathelement location="${app.dest.resources}" />
195     </path>
196     <pathconvert property="app.run.cp" refid="app.run.path"
197                  targetos="unix" >
198       <map from="${app.dest.lib}" to="./lib"/>
199       <map from="${app.dest.resources}" to="./resources"/>
200     </pathconvert>
201     <pathconvert property="app.run.wincp" refid="app.run.path"
202                  targetos="windows" >
203       <map from="${app.dest.lib}" to="./lib"/>
204       <map from="${app.dest.resources}" to="./resources"/>
205     </pathconvert>
206
207     <!-- ===============================================================
208                        Copy and modify the shell script
209          =============================================================== -->
210
211     <copy tofile="${app.dest.home}/${propval.app.shellscr.name}"
212           file="${app.run.shellscr}" >
213       <filterset>
214         <filter token="CP"
215                 value=".:./classes:${app.run.cp}"/>
216       </filterset>
217       <filterset refid="property.filters" />
218     </copy>
219
220     <copy tofile="${app.dest.home}/${propval.app.batscr.name}"
221           file="${app.run.batscr}" >
222       <filterset>
223         <filter token="CP"
224                 value=".;./classes;${app.run.wincp}"/>
225       </filterset>
226       <filterset refid="property.filters" />
227     </copy>
228
229     <!-- build the zip file -->
230     <mkdir dir="${dist.home}" />
231     <delete file="${app.zip.file}" />
232
233     <zip destfile="${app.zip.file}" >
234       <zipfileset prefix="${propval.app.zip.name}" dir="${app.dest.home}" />
235     </zip>
236   </target>
237
238   <target name="add.jdbcdriver" if="propval.app.jdbcdriver.jar">
239     <copy todir="${app.dest.lib}" file="${propval.app.jdbcdriver.jar}"/>
240   </target>
241 </project>
242
Note: See TracBrowser for help on using the browser.