root/trunk/calendar3/bldfiles/buildsh.xml

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

Mostly Dump/restore changes

Further schema changes - renamed calendar path column to bwpath

alter table CALENDARS alter column path rename to bwpath

Added ownerid column and index and publick to attendees

alter table ATTENDEES add column ownerid int
alter table ATTENDEES add column publick char(1)
CREATE INDEX vattendees_user ON attendees (ownerid)

Changed CalOptions? to support extra classes and fix bugs.

Moved system parameters into xml options.
Moved dump/restore runtime options into xml options.

Removed use of bedework.dumprestore.options file. Multiple files just lead to
confusion and the zipped version will eventually allow overrides as run time
parameters.

Many changes to deployment build files to build dump/restore applications as
zipped runnable packages

Disabled (for the time being at least) the targets which run the dump/restore
applications. For the moment cd into the temp directory and run it, e.g.

cd quickstart/calendar3/temp/shellscr/dumpres/
chmod +x cmd
./cmd restore ~/.bedework/caldata.xml

or unzip the zipped application that is in the dist directory.

The zipped application will handle dump, restore, initdb and has a backup option
to save the data in a file with a date tagged name.

Dump new attendee fields.

Still to do:
Check attendees restored correctly

Ensure all fields are dumped and restored
Use subscription name in view dump instead of id.

Use the event key fields instead of id for annotation target and master.

Not dumping preferred calendars in version3.0 - do so.

Need to set calType in 2.3 restore

EventAnnotations? still need work. target and master need setiing.

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     <!-- Destinations - where we build stuff -->
20     <property name="app.dest.home"
21               location="${org.bedework.temp.shellscr.home}/${propval.app.zip.name}" />
22     <property name="app.dest.lib"
23               location="${app.dest.home}/lib" />
24     <property name="app.dest.classes"
25               location="${app.dest.home}/classes" />
26     <property name="app.dest.properties"
27               location="${app.dest.classes}/properties/calendar" />
28     <property name="app.dest.resources"
29               location="${app.dest.home}/resources" />
30     <property name="app.dest.data"
31               location="${app.dest.home}/data" />
32
33     <property name="app.zip.file"
34               location="${dist.home}/${propval.app.zip.name}.zip" />
35   </target>
36
37   <!-- ================================================================
38        build target
39        ================================================================ -->
40
41   <target name="build" depends="init">
42     <filterset id="property.filters" >
43       <filter token="BW-APP-NAME"
44               value="${org.bedework.deploy.name}"/>
45
46       <filter token="HIBERNATE-DIALECT"
47               value="${org.bedework.global.hibernate.dialect}" />
48
49       <filter token="DIRECTORY-BROWSING-DISALLOWED"
50               value="${org.bedework.global.directory.browsing.disallowed}" />
51
52       <filter token="APP-DESCRIPTION"
53               value="${propval.app.description}" />
54
55       <filter token="DUMP-CLASS"
56               value="org.bedework.dumprestore.dump.Dump"/>
57       <filter token="RESTORE-CLASS"
58               value="org.bedework.dumprestore.restore.Restore"/>
59
60       <filter token="APP-NAME"
61               value="${propval.app.name}"/>
62       <filter token="APP-VERSION"
63               value="${propval.app.version}"/>
64     </filterset>
65
66     <delete dir="${app.dest.home}" />
67
68     <!-- Library stuff -->
69
70     <mkdir dir="${app.dest.lib}" />
71
72     <!-- core files -->
73     <copy todir="${app.dest.lib}" flatten="yes" >
74       <fileset dir="${org.bedework.temp.jars}">
75         <include name="*.jar"/>
76       </fileset>
77       <fileset dir="${hibernate.jars.dir}">
78         <include name="*.jar"/>
79       </fileset>
80       <fileset dir="${digester.dir}">
81         <include name="*.jar"/>
82       </fileset>
83       <fileset dir="${struts.dir}">
84         <include name="*.jar"/>
85       </fileset>
86     </copy>
87
88     <!-- Some more standard libs -->
89     <copy todir="${app.dest.lib}" file="${log4j.jar}"/>
90     <copy todir="${app.dest.lib}" file="${ical4j.jar}"/>
91
92     <!-- Extra libraries specified in calling build file -->
93     <copy todir="${app.dest.lib}" flatten="yes" >
94       <fileset refid="org.bedework.run.jars" />
95       <fileset refid="org.bedework.run.lib.jars" />
96
97       <!-- local jdbc drivers -->
98       <fileset dir="${org.bedework.jdbc.lib}">
99         <include name="*.jar"/>
100       </fileset>
101     </copy>
102
103     <!-- Include the quickstart jdbc driver -->
104     <copy todir="${app.dest.lib}" file="${hsqldb.jdbcdriver.jar}"/>
105
106     <copy todir="${app.dest.classes}">
107       <fileset dir="${org.bedework.core.base}/resources/properties" />
108       <filterset refid="property.filters" />
109     </copy>
110
111     <copy todir="${app.dest.classes}">
112       <fileset dir="${org.bedework.core.base}/resources/hbms" />
113       <filterset refid="property.filters" />
114     </copy>
115
116     <copy todir="${app.dest.classes}" overwrite="yes" >
117       <fileset refid="org.bedework.extra.resources" />
118       <filterset refid="property.filters" />
119     </copy>
120
121     <!-- add the jdbcdriver if defined -->
122     <antcall target="add.jdbcdriver" inheritRefs="true" />
123
124     <!-- Create the env.properties file -->
125     <mkdir dir="${app.dest.properties}" />
126
127     <copy tofile="${app.dest.properties}/env.properties"
128           file="${org.bedework.config.properties}" />
129
130     <copy tofile="${app.dest.properties}/options.xml"
131           file="${org.bedework.config.options}" />
132
133     <!-- ===============================================================
134                        Add any resource files
135          =============================================================== -->
136
137     <copy tofile="${app.dest.resources}/log4j.xml"
138           file="${org.bedework.runsh.log4j.xml}"
139           failonerror="false" />
140
141     <!-- ===============================================================
142                        Add any data files
143          =============================================================== -->
144
145     <mkdir dir="${app.dest.data}" />
146
147     <copy todir="${app.dest.data}" overwrite="yes" >
148       <fileset refid="org.bedework.shellscr.data" />
149       <filterset refid="property.filters" />
150     </copy>
151
152     <!-- ===============================================================
153                        Build the classpath
154          =============================================================== -->
155
156     <path id="app.run.path">
157       <fileset dir="${app.dest.lib}">
158         <include name="*.jar"/>
159       </fileset>
160       <pathelement location="${app.dest.resources}" />
161     </path>
162     <pathconvert property="app.run.cp" refid="app.run.path"
163                  targetos="unix" >
164       <map from="${app.dest.lib}" to="./lib"/>
165       <map from="${app.dest.resources}" to="./resources"/>
166     </pathconvert>
167
168     <!-- ===============================================================
169                        Copy and modify the shell script
170          =============================================================== -->
171
172     <copy tofile="${app.dest.home}/${propval.app.shellscr.name}"
173           file="${app.run.shellscr}" >
174       <filterset>
175         <filter token="CP"
176                 value=".:./classes:${app.run.cp}"/>
177       </filterset>
178       <filterset refid="property.filters" />
179     </copy>
180
181     <!-- build the zip file -->
182     <mkdir dir="${dist.home}" />
183     <delete file="${app.zip.file}" />
184
185     <zip destfile="${app.zip.file}" >
186       <zipfileset prefix="${propval.app.zip.name}" dir="${app.dest.home}" />
187     </zip>
188   </target>
189
190   <target name="add.jdbcdriver" if="propval.app.jdbcdriver.jar">
191     <copy todir="${app.dest.lib}" file="${propval.app.jdbcdriver.jar}"/>
192   </target>
193 </project>
194
Note: See TracBrowser for help on using the browser.