| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
|
|---|
| 3 |
<!-- This is the main build file for bedework which can be used in |
|---|
| 4 |
conjunction with Ant (http://jakarta.apache.org/ant/) to |
|---|
| 5 |
build, deploy, and distribute the UW calendar project. Type |
|---|
| 6 |
"ant -projecthelp" to see a list of ant targets. |
|---|
| 7 |
|
|---|
| 8 |
The assumption is that deployers of the calendar will want to create |
|---|
| 9 |
a number of independent calendar applications managed by different |
|---|
| 10 |
groups. |
|---|
| 11 |
|
|---|
| 12 |
To facilitate this the build process is driven by a set of properties |
|---|
| 13 |
in config/configs. |
|---|
| 14 |
|
|---|
| 15 |
You shouldn't need to modify base files or applications. Instead, |
|---|
| 16 |
modify the application specific properties and html/jsp pages to create |
|---|
| 17 |
a customized application. |
|---|
| 18 |
|
|---|
| 19 |
This file will only need modification to add a specific target for your |
|---|
| 20 |
new application. These targets should be added in the appsuite |
|---|
| 21 |
section of the file. |
|---|
| 22 |
|
|---|
| 23 |
apps.root.dir (Optional - defaults to apps) |
|---|
| 24 |
We expect to find a file |
|---|
| 25 |
${apps.root.dir}/${app-name}.properties |
|---|
| 26 |
which defines build time properties for the application. |
|---|
| 27 |
Note this file does not get built in to the application. |
|---|
| 28 |
|
|---|
| 29 |
Authors: Mike Douglass douglm@rpi.edu |
|---|
| 30 |
--> |
|---|
| 31 |
|
|---|
| 32 |
<project name="bedework" default="bld.all"> |
|---|
| 33 |
<!-- ==================== Basic property Definitions ================= |
|---|
| 34 |
Each of the following properties are used in the build script. |
|---|
| 35 |
Values for these properties are set by the first place they are |
|---|
| 36 |
defined, from the following list: |
|---|
| 37 |
* Definitions on the "ant" command line (ant -Ddeploy.home=xyz compile) |
|---|
| 38 |
* Definitions from a "uwcal.build.properties" file in the developer's |
|---|
| 39 |
home directory |
|---|
| 40 |
* Definitions from a "local.build.properties" file in the top level |
|---|
| 41 |
source directory |
|---|
| 42 |
* Definitions from a "build.properties" file in the top level |
|---|
| 43 |
source directory |
|---|
| 44 |
* Default definitions in this build.xml file |
|---|
| 45 |
|
|---|
| 46 |
You will note below that property values can be composed based on the |
|---|
| 47 |
contents of previously defined properties. This is a powerful |
|---|
| 48 |
technique that helps you minimize the number of changes required when |
|---|
| 49 |
your development environment is modified. Note that property |
|---|
| 50 |
composition is allowed within "build.properties" files as well as in |
|---|
| 51 |
the "build.xml" script. |
|---|
| 52 |
================================================================= --> |
|---|
| 53 |
|
|---|
| 54 |
<property name="org.bedework.globaldefs.file" value="bldfiles/globalDefs.xml"/> |
|---|
| 55 |
<import file="${org.bedework.globaldefs.file}"/> |
|---|
| 56 |
|
|---|
| 57 |
<!-- ================================================================= |
|---|
| 58 |
init: all the property defs are in bldfiles/globalDdefs.xml |
|---|
| 59 |
================================================================= --> |
|---|
| 60 |
|
|---|
| 61 |
<target name="init" depends="globalDefs"> |
|---|
| 62 |
<!-- ==================== config properties ========================= --> |
|---|
| 63 |
<property name="org.bedework.clone.name" value="${org.bedework.clone.default}" /> |
|---|
| 64 |
<property name="org.bedework.config.properties" |
|---|
| 65 |
location="${org.bedework.config.base}/configs/${org.bedework.clone.name}.properties" /> |
|---|
| 66 |
|
|---|
| 67 |
<echo message="==========================================================" /> |
|---|
| 68 |
<echo message="Use config properties ${org.bedework.config.properties}" /> |
|---|
| 69 |
<loadproperties |
|---|
| 70 |
srcFile="${org.bedework.config.properties}" > |
|---|
| 71 |
<filterchain> |
|---|
| 72 |
<expandproperties/> |
|---|
| 73 |
</filterchain> |
|---|
| 74 |
</loadproperties> |
|---|
| 75 |
</target> |
|---|
| 76 |
|
|---|
| 77 |
<!-- ================================================================= |
|---|
| 78 |
The "all" target does a complete clean rebuild of all applications. |
|---|
| 79 |
================================================================= --> |
|---|
| 80 |
|
|---|
| 81 |
<target name="all" depends="init,clean,dist" |
|---|
| 82 |
description="Clean build and dist"/> |
|---|
| 83 |
|
|---|
| 84 |
<!-- ======================== Clean Target =========================== |
|---|
| 85 |
The "clean" target deletes any generated directories, to ensure |
|---|
| 86 |
applications are built from scratch. |
|---|
| 87 |
================================================================= --> |
|---|
| 88 |
|
|---|
| 89 |
<target name="clean" depends="init" |
|---|
| 90 |
description="Delete generated directories"> |
|---|
| 91 |
<delete dir="${org.bedework.temp.home}"/> |
|---|
| 92 |
<delete dir="${dist.home}"/> |
|---|
| 93 |
<delete> |
|---|
| 94 |
<fileset dir="." includes="junit*.properties" /> |
|---|
| 95 |
<fileset dir="." includes="test.log*" /> |
|---|
| 96 |
</delete> |
|---|
| 97 |
</target> |
|---|
| 98 |
|
|---|
| 99 |
<!-- ===================== bld.all Target =============================== |
|---|
| 100 |
This target builds jar files ready for the deploy target. |
|---|
| 101 |
=================================================================== --> |
|---|
| 102 |
|
|---|
| 103 |
<target name="bld.all" |
|---|
| 104 |
depends="bld.locale,bld.access,bld.calfacade, |
|---|
| 105 |
bld.calenv,bld.ical,bld.common,bld.core, |
|---|
| 106 |
bld.http,bld.caldavclientapi, |
|---|
| 107 |
bld.calsvci,bld.mail,bld.logging, |
|---|
| 108 |
bld.calsvc,bld.appcommon, |
|---|
| 109 |
bld.webadmin,bld.webclient, |
|---|
| 110 |
bld.synchml,bld.caldav, |
|---|
| 111 |
bld.timers,build.tools, |
|---|
| 112 |
bld.dumprestore, |
|---|
| 113 |
bld.test,bld.config" |
|---|
| 114 |
description="Build war and ear files"> |
|---|
| 115 |
<antcall inheritrefs="true" target="copy.to.jars.repository" /> |
|---|
| 116 |
</target> |
|---|
| 117 |
|
|---|
| 118 |
<target name="copy.to.jars.repository" if="org.bedework.jars.repository"> |
|---|
| 119 |
<mkdir dir="${org.bedework.jars.repository}" /> |
|---|
| 120 |
|
|---|
| 121 |
<copy todir="${org.bedework.jars.repository}" > |
|---|
| 122 |
<fileset dir="${org.bedework.temp.jars}"> |
|---|
| 123 |
<include name="*-${product.version}.jar"/> |
|---|
| 124 |
</fileset> |
|---|
| 125 |
</copy> |
|---|
| 126 |
</target> |
|---|
| 127 |
|
|---|
| 128 |
<!-- ===================== Deploy Target =============================== |
|---|
| 129 |
The "deploy" target builds configured war files and zipped runnable |
|---|
| 130 |
application based on the configuration properties. It then copies the |
|---|
| 131 |
contents of the build directory into the locations required by our |
|---|
| 132 |
servlet container, and picks up any external dependencies along the way. |
|---|
| 133 |
|
|---|
| 134 |
After restarting the servlet container, you can then test bedework. |
|---|
| 135 |
|
|---|
| 136 |
To build a version for your site you should probably copy and modify the |
|---|
| 137 |
config/configs/democal.properties |
|---|
| 138 |
file and change the value of org.bedework.clone.name to the name of your |
|---|
| 139 |
new clone. |
|---|
| 140 |
|
|---|
| 141 |
To build more than one appsuite duplicate the ant task |
|---|
| 142 |
invocation below with a different clone name in each. |
|---|
| 143 |
=================================================================== --> |
|---|
| 144 |
|
|---|
| 145 |
<target name="deploy.debug" depends="bld.all,deploy.log4j.xml" |
|---|
| 146 |
description="Deploy applications to servlet container" > |
|---|
| 147 |
<ant antfile="${org.bedework.deployment.base}/build.xml" inheritrefs="true" |
|---|
| 148 |
target="deploy" > |
|---|
| 149 |
<property name="app.debug.val" value="9" /> |
|---|
| 150 |
</ant> |
|---|
| 151 |
</target> |
|---|
| 152 |
|
|---|
| 153 |
<target name="deploy" depends="bld.all,deploy.log4j.xml" |
|---|
| 154 |
description="Deploy applications to servlet container" > |
|---|
| 155 |
<ant antfile="${org.bedework.deployment.base}/build.xml" inheritrefs="true" |
|---|
| 156 |
target="deploy" > |
|---|
| 157 |
<property name="org.bedework.clone.name" value="${org.bedework.clone.default}" /> |
|---|
| 158 |
</ant> |
|---|
| 159 |
</target> |
|---|
| 160 |
|
|---|
| 161 |
<!-- ================== build.configured Target ======================== |
|---|
| 162 |
Build configured war files but don't deploy. Use to build versions to |
|---|
| 163 |
be deployed elsewhere. |
|---|
| 164 |
=================================================================== --> |
|---|
| 165 |
|
|---|
| 166 |
<target name="build.configured.debug" depends="bld.all" |
|---|
| 167 |
description="Build configured applications" > |
|---|
| 168 |
<ant antfile="${org.bedework.deployment.base}/build.xml" inheritrefs="true" |
|---|
| 169 |
target="build.configured" > |
|---|
| 170 |
<property name="app.debug.val" value="9" /> |
|---|
| 171 |
</ant> |
|---|
| 172 |
</target> |
|---|
| 173 |
|
|---|
| 174 |
<target name="build.configured" depends="bld.all" |
|---|
| 175 |
description="Build configured applications" > |
|---|
| 176 |
<ant antfile="${org.bedework.deployment.base}/build.xml" inheritrefs="true" |
|---|
| 177 |
target="build.configured" > |
|---|
| 178 |
<property name="org.bedework.clone.name" value="${org.bedework.clone.default}" /> |
|---|
| 179 |
</ant> |
|---|
| 180 |
</target> |
|---|
| 181 |
|
|---|
| 182 |
<!-- Copy log4j.xml to the app server but overwrite only if specified. |
|---|
| 183 |
Somewhat annoying to find a carefully crafted log4j.xml gets overwritten. |
|---|
| 184 |
--> |
|---|
| 185 |
<target name="deploy.log4j.xml" > |
|---|
| 186 |
<copy todir="${log4j.config.destination}" |
|---|
| 187 |
file="${calendar.dir}/resources/log4j.xml" |
|---|
| 188 |
overwrite="${org.bedework.deploy.log4j.config}" /> |
|---|
| 189 |
</target> |
|---|
| 190 |
|
|---|
| 191 |
<!-- Target used to build from property files built by config tool --> |
|---|
| 192 |
<target name="deploy.config" > |
|---|
| 193 |
<copy todir="${log4j.config.destination}" |
|---|
| 194 |
file="${calendar.dir}/resources/log4j.xml" |
|---|
| 195 |
overwrite="${org.bedework.deploy.log4j.config}" /> |
|---|
| 196 |
|
|---|
| 197 |
<!-- The property org.bedework.deploy.config.name must be set --> |
|---|
| 198 |
<ant antfile="${org.bedework.appsuite.base}/build.xml" inheritrefs="true" |
|---|
| 199 |
target="deploy.config" /> |
|---|
| 200 |
|
|---|
| 201 |
<antcall inheritrefs="true" target="deploy.caldav" /> |
|---|
| 202 |
</target> |
|---|
| 203 |
|
|---|
| 204 |
<!-- ==================== Dist Target ================================== |
|---|
| 205 |
The "dist" target creates a binary distribution of your application |
|---|
| 206 |
in a directory structure ready to be archived in a tar.gz or zip file. |
|---|
| 207 |
Note that this target depends on two others: |
|---|
| 208 |
* "deploy" so that the entire web application (including external |
|---|
| 209 |
dependencies) will have been assembled |
|---|
| 210 |
* "javadoc" so that the application Javadocs will have been created |
|---|
| 211 |
=================================================================== --> |
|---|
| 212 |
|
|---|
| 213 |
<target name="dist" depends="bld.all,javadoc" |
|---|
| 214 |
description="Create binary distribution" /> |
|---|
| 215 |
|
|---|
| 216 |
<!-- ==================== Javadoc Target =============================== |
|---|
| 217 |
The "javadoc" target creates Javadoc API documentation for the Java |
|---|
| 218 |
classes included in your application. Normally, this is only required |
|---|
| 219 |
when preparing a distribution release, but is available as a separate |
|---|
| 220 |
target in case the developer wants to create Javadocs independently. |
|---|
| 221 |
=================================================================== --> |
|---|
| 222 |
|
|---|
| 223 |
<target name="javadoc" depends="init" |
|---|
| 224 |
description="Create Javadoc API documentation"> |
|---|
| 225 |
|
|---|
| 226 |
<path id="javadoc.classpath"> |
|---|
| 227 |
<pathelement location="${servlet.jar}"/> |
|---|
| 228 |
<pathelement location="${struts.jar}"/> |
|---|
| 229 |
<pathelement location="${fop.jar}"/> |
|---|
| 230 |
<pathelement location="${avalon.jar}"/> |
|---|
| 231 |
<pathelement location="${log4j.jar}"/> |
|---|
| 232 |
<pathelement location="${hibernate.jar}"/> |
|---|
| 233 |
<pathelement location="${ical4j.jar}"/> |
|---|
| 234 |
<pathelement location="${logkit.jar}"/> |
|---|
| 235 |
<pathelement location="${jtidy.jar}"/> |
|---|
| 236 |
</path> |
|---|
| 237 |
<mkdir dir="${dist.home}/docs/api"/> |
|---|
| 238 |
<javadoc sourcepath="${org.bedework.access.base}/src: |
|---|
| 239 |
${org.bedework.appcommon.base}/src: |
|---|
| 240 |
${org.bedework.core.base}/src: |
|---|
| 241 |
${org.bedework.caldav.base}/src: |
|---|
| 242 |
${org.bedework.caldavClientApi.base}/src: |
|---|
| 243 |
${org.bedework.calenv.base}/src: |
|---|
| 244 |
${org.bedework.calfacade.base}/src: |
|---|
| 245 |
${org.bedework.calsvc.base}/src: |
|---|
| 246 |
${org.bedework.calsvci.base}/src: |
|---|
| 247 |
${org.bedework.common.base}/src: |
|---|
| 248 |
${org.bedework.config.base}/src: |
|---|
| 249 |
${org.bedework.dumprestore.base}/src: |
|---|
| 250 |
${org.bedework.http.base}/src: |
|---|
| 251 |
${org.bedework.ical.base}/src: |
|---|
| 252 |
${org.bedework.locale.base}/src: |
|---|
| 253 |
${org.bedework.logging.base}/src: |
|---|
| 254 |
${org.bedework.mail.base}/src: |
|---|
| 255 |
${org.bedework.synchml.base}/src: |
|---|
| 256 |
${org.bedework.timers.base}/src: |
|---|
| 257 |
${org.bedework.tools.base}/src: |
|---|
| 258 |
${org.bedework.webadmin.base}/src: |
|---|
| 259 |
${org.bedework.webclient.base}/src: |
|---|
| 260 |
${org.bedework.webcommon.base}/src:" |
|---|
| 261 |
classpathref="javadoc.classpath" |
|---|
| 262 |
destdir="${dist.home}/docs/api" |
|---|
| 263 |
packagenames="org.bedework.access.*, |
|---|
| 264 |
org.bedework.*, |
|---|
| 265 |
edu.rpi.cct.uwcal.access.*, |
|---|
| 266 |
edu.rpi.*, |
|---|
| 267 |
edu.washington.*" |
|---|
| 268 |
access="public" |
|---|
| 269 |
author="true" |
|---|
| 270 |
version="true" |
|---|
| 271 |
breakiterator="yes" |
|---|
| 272 |
windowtitle="${product.name} ${product.version} API Documentation"> |
|---|
| 273 |
<doctitle><![CDATA[${product.name} ${product.version}<br/>API Documentation]]></doctitle> |
|---|
| 274 |
<header><![CDATA[${product.name} ${product.version}<br/>API Documentation]]></header> |
|---|
| 275 |
</javadoc> |
|---|
| 276 |
|
|---|
| 277 |
</target> |
|---|
| 278 |
|
|---|
| 279 |
<!-- ======================== calfacade target ========================= |
|---|
| 280 |
This builds the back end facade for the core of the calendar. |
|---|
| 281 |
================================================================= --> |
|---|
| 282 |
|
|---|
| 283 |
<target name="bld.calfacade" |
|---|
| 284 |
depends="bld.access" |
|---|
| 285 |
description="Build calendar calfacade jars" > |
|---|
| 286 |
<ant antfile="${org.bedework.calfacade.base}/build.xml" inheritrefs="true" |
|---|
| 287 |
target="build" /> |
|---|
| 288 |
</target> |
|---|
| 289 |
|
|---|
| 290 |
<!-- ======================== calenv target ========================= |
|---|
| 291 |
This builds the some environment dependent classes for the core |
|---|
| 292 |
of the calendar. |
|---|
| 293 |
================================================================= --> |
|---|
| 294 |
|
|---|
| 295 |
<target name="bld.calenv" |
|---|
| 296 |
depends="bld.calfacade" |
|---|
| 297 |
description="Build calendar env jars" > |
|---|
| 298 |
<ant antfile="${org.bedework.calenv.base}/build.xml" inheritrefs="true" |
|---|
| 299 |
target="build" /> |
|---|
| 300 |
</target> |
|---|
| 301 |
|
|---|
| 302 |
<!-- ======================== core target ========================= |
|---|
| 303 |
This builds the back end core of the calendar. Applications interact |
|---|
| 304 |
with that core through the CalFacade interface. |
|---|
| 305 |
================================================================= --> |
|---|
| 306 |
|
|---|
| 307 |
<target name="bld.core" |
|---|
| 308 |
depends="bld.calfacade,bld.calenv,bld.ical" |
|---|
| 309 |
description="Build calendar core jars" > |
|---|
| 310 |
<ant antfile="${org.bedework.core.base}/build.xml" inheritrefs="true" |
|---|
| 311 |
target="build" /> |
|---|
| 312 |
</target> |
|---|
| 313 |
|
|---|
| 314 |
<!-- ======================== locale target ========================= |
|---|
| 315 |
This builds the localization suite of the calendar. |
|---|
| 316 |
================================================================= --> |
|---|
| 317 |
|
|---|
| 318 |
<target name="bld.locale" |
|---|
| 319 |
depends="init" |
|---|
| 320 |
description="Build calendar localization suite jars" > |
|---|
| 321 |
<ant antfile="${org.bedework.locale.base}/build.xml" inheritrefs="true" |
|---|
| 322 |
target="build" /> |
|---|
| 323 |
</target> |
|---|
| 324 |
|
|---|
| 325 |
<!-- ======================== access target ========================= |
|---|
| 326 |
This builds the access control suite of the calendar. |
|---|
| 327 |
================================================================= --> |
|---|
| 328 |
|
|---|
| 329 |
<target name="bld.access" |
|---|
| 330 |
depends="bld.locale" |
|---|
| 331 |
description="Build calendar access control suite jars" > |
|---|
| 332 |
<ant antfile="${org.bedework.access.base}/build.xml" inheritrefs="true" |
|---|
| 333 |
target="build" /> |
|---|
| 334 |
</target> |
|---|
| 335 |
|
|---|
| 336 |
<!-- ======================== common target ======================= |
|---|
| 337 |
This builds the common classes jar. |
|---|
| 338 |
================================================================= --> |
|---|
| 339 |
|
|---|
| 340 |
<target name="bld.common" |
|---|
| 341 |
depends="init,bld.calfacade,bld.locale" |
|---|
| 342 |
description="Build calendar common classes jar"> |
|---|
| 343 |
<ant antfile="${org.bedework.common.base}/build.xml" inheritrefs="true" |
|---|
| 344 |
target="build" /> |
|---|
| 345 |
</target> |
|---|
| 346 |
|
|---|
| 347 |
<!-- ======================== http target ======================= |
|---|
| 348 |
This builds the http-client classes jar. |
|---|
| 349 |
================================================================= --> |
|---|
| 350 |
|
|---|
| 351 |
<target name="bld.http" |
|---|
| 352 |
depends="init,bld.calenv,bld.calfacade,bld.locale" |
|---|
| 353 |
description="Build calendar http classes jar"> |
|---|
| 354 |
<ant antfile="${org.bedework.http.base}/build.xml" inheritrefs="true" |
|---|
| 355 |
target="build" /> |
|---|
| 356 |
</target> |
|---|
| 357 |
|
|---|
| 358 |
<!-- ======================== caldavclientapi target ======================= |
|---|
| 359 |
This builds the http-client classes jar. |
|---|
| 360 |
================================================================= --> |
|---|
| 361 |
|
|---|
| 362 |
<target name="bld.caldavclientapi" |
|---|
| 363 |
depends="init,bld.http,bld.calfacade" |
|---|
| 364 |
description="Build calendar caldav client api classes jar"> |
|---|
| 365 |
<ant antfile="${org.bedework.caldavClientApi.base}/build.xml" inheritrefs="true" |
|---|
| 366 |
target="build" /> |
|---|
| 367 |
</target> |
|---|
| 368 |
|
|---|
| 369 |
<!-- ======================== logging target ======================= |
|---|
| 370 |
This builds the logging classes jar. |
|---|
| 371 |
================================================================= --> |
|---|
| 372 |
|
|---|
| 373 |
<target name="bld.logging" |
|---|
| 374 |
depends="init,bld.calfacade" |
|---|
| 375 |
description="Build logging classes jar"> |
|---|
| 376 |
<ant antfile="${org.bedework.logging.base}/build.xml" inheritrefs="true" |
|---|
| 377 |
target="build" /> |
|---|
| 378 |
</target> |
|---|
| 379 |
|
|---|
| 380 |
<!-- ======================== mail target ======================= |
|---|
| 381 |
This builds the mail classes jar. |
|---|
| 382 |
================================================================= --> |
|---|
| 383 |
|
|---|
| 384 |
<target name="bld.mail" |
|---|
| 385 |
depends="init,bld.calsvci" |
|---|
| 386 |
description="Build calendar mail classes jar"> |
|---|
| 387 |
<ant antfile="${org.bedework.mail.base}/build.xml" inheritrefs="true" |
|---|
| 388 |
target="build" /> |
|---|
| 389 |
</target> |
|---|
| 390 |
|
|---|
| 391 |
<!-- ======================== calsvci target ======================= |
|---|
| 392 |
This builds the service level interface classes |
|---|
| 393 |
================================================================= --> |
|---|
| 394 |
|
|---|
| 395 |
<target name="bld.calsvci" |
|---|
| 396 |
depends="init,bld.common,bld.ical" |
|---|
| 397 |
description="Build calendar service interface classes jar"> |
|---|
| 398 |
<ant antfile="${org.bedework.calsvci.base}/build.xml" inheritrefs="true" |
|---|
| 399 |
target="build" /> |
|---|
| 400 |
</target> |
|---|
| 401 |
|
|---|
| 402 |
<!-- ======================== calsvc target ======================= |
|---|
| 403 |
This builds the service level interface implementation classes |
|---|
| 404 |
================================================================= --> |
|---|
| 405 |
|
|---|
| 406 |
<target name="bld.calsvc" |
|---|
| 407 |
depends="init,bld.common,bld.mail" |
|---|
| 408 |
description="Build calendar service interface implementation classes jar"> |
|---|
| 409 |
<ant antfile="${org.bedework.calsvc.base}/build.xml" inheritrefs="true" |
|---|
| 410 |
target="build" /> |
|---|
| 411 |
</target> |
|---|
| 412 |
|
|---|
| 413 |
<!-- ======================== ical target ======================= |
|---|
| 414 |
This builds the classes associated with ical (rfc2445 etc) |
|---|
| 415 |
================================================================= --> |
|---|
| 416 |
|
|---|
| 417 |
<target name="bld.ical" |
|---|
| 418 |
depends="init,bld.common,bld.locale" |
|---|
| 419 |
description="Build icalendar classes jar"> |
|---|
| 420 |
<ant antfile="${org.bedework.ical.base}/build.xml" inheritrefs="true" |
|---|
| 421 |
target="build" /> |
|---|
| 422 |
</target> |
|---|
| 423 |
|
|---|
| 424 |
<!-- ======================== appcommon target ======================= |
|---|
| 425 |
This builds a jar file which provides application support. |
|---|
| 426 |
================================================================= --> |
|---|
| 427 |
|
|---|
| 428 |
<target name="bld.appcommon" |
|---|
| 429 |
depends="init,bld.calsvci" |
|---|
| 430 |
description="Build calendar service interface classes jar"> |
|---|
| 431 |
<ant antfile="${org.bedework.appcommon.base}/build.xml" inheritrefs="true" |
|---|
| 432 |
target="build" /> |
|---|
| 433 |
</target> |
|---|
| 434 |
|
|---|
| 435 |
<!-- ======================== webcommon target ======================= |
|---|
| 436 |
This builds the web common classes jar. |
|---|
| 437 |
================================================================= --> |
|---|
| 438 |
|
|---|
| 439 |
<target name="bld.webcommon" |
|---|
| 440 |
depends="bld.appcommon" |
|---|
| 441 |
description="Build calendar web common classes jar"> |
|---|
| 442 |
<ant antfile="${org.bedework.webcommon.base}/build.xml" inheritrefs="true" |
|---|
| 443 |
target="build" /> |
|---|
| 444 |
</target> |
|---|
| 445 |
|
|---|
| 446 |
<!-- ======================= web client Targets ====================== |
|---|
| 447 |
This builds the web applications jars. |
|---|
| 448 |
================================================================= --> |
|---|
| 449 |
|
|---|
| 450 |
<target name="bld.webadmin" |
|---|
| 451 |
depends="init,bld.webcommon" |
|---|
| 452 |
description="Build calendar webadmin suite"> |
|---|
| 453 |
<ant antfile="${org.bedework.webadmin.base}/build.xml" inheritrefs="true" |
|---|
| 454 |
target="build" /> |
|---|
| 455 |
</target> |
|---|
| 456 |
|
|---|
| 457 |
<target name="bld.webclient" |
|---|
| 458 |
depends="init,bld.webcommon" |
|---|
| 459 |
description="Build calendar webclient suite"> |
|---|
| 460 |
<ant antfile="${org.bedework.webclient.base}/build.xml" inheritrefs="true" |
|---|
| 461 |
target="build" /> |
|---|
| 462 |
</target> |
|---|
| 463 |
|
|---|
| 464 |
<!-- ======================== synchml Targets ======================== |
|---|
| 465 |
* |
|---|
| 466 |
* NOTE: Incomplete and under development |
|---|
| 467 |
* The following comments map out an approach rather than document the |
|---|
| 468 |
* facts |
|---|
| 469 |
This builds the synchml library and applications. |
|---|
| 470 |
Many build properties are taken from the appsuite clones property files. |
|---|
| 471 |
To build a version for your site you should probably copy and modify the |
|---|
| 472 |
appsuite/clones/democal.properties |
|---|
| 473 |
file and change the value of org.bedework.clone.name to the name of your |
|---|
| 474 |
new clone. |
|---|
| 475 |
|
|---|
| 476 |
To build more than one appsuite duplicate the ant task |
|---|
| 477 |
invocation below with a different clone name in each. |
|---|
| 478 |
================================================================= --> |
|---|
| 479 |
|
|---|
| 480 |
<target name="bld.synchml" |
|---|
| 481 |
depends="init,bld.appcommon,bld.calsvci,bld.ical,bld.calsvc,bld.webcommon" |
|---|
| 482 |
description="Build calendar synchml suite"> |
|---|
| 483 |
<ant antfile="${org.bedework.synchml.base}/build.xml" inheritrefs="true" |
|---|
| 484 |
target="build" > |
|---|
| 485 |
<property name="org.bedework.clone.name" value="${org.bedework.clone.default}" /> |
|---|
| 486 |
</ant> |
|---|
| 487 |
</target> |
|---|
| 488 |
|
|---|
| 489 |
<target name="bld.synchml.debug" |
|---|
| 490 |
depends="init,bld.appcommon,bld.calsvci,bld.ical,bld.calsvc,bld.webcommon" |
|---|
| 491 |
description="Build calendar synchml suite"> |
|---|
| 492 |
<ant antfile="${org.bedework.synchml.base}/build.xml" inheritrefs="true" |
|---|
| 493 |
target="build" > |
|---|
| 494 |
<property name="org.bedework.clone.name" value="${org.bedework.clone.default}" /> |
|---|
| 495 |
<property name="app.debug.val" value="9" /> |
|---|
| 496 |
</ant> |
|---|
| 497 |
</target> |
|---|
| 498 |
|
|---|
| 499 |
<!-- ======================== caldav Targets ======================== |
|---|
| 500 |
* |
|---|
| 501 |
* NOTE: Incomplete and under development |
|---|
| 502 |
================================================================= --> |
|---|
| 503 |
|
|---|
| 504 |
<target name="bld.caldav" if="org.bedework.build.caldav" |
|---|
| 505 |
depends="init,bld.appcommon" |
|---|
| 506 |
description="Build calendar caldav suite"> |
|---|
| 507 |
<ant antfile="${org.bedework.caldav.base}/build.xml" inheritrefs="true" |
|---|
| 508 |
target="build" /> |
|---|
| 509 |
</target> |
|---|
| 510 |
|
|---|
| 511 |
<!-- ======================== config Target ======================== |
|---|
| 512 |
This builds the config and deploy application |
|---|
| 513 |
================================================================= --> |
|---|
| 514 |
|
|---|
| 515 |
<target name="bld.config" |
|---|
| 516 |
depends="init" |
|---|
| 517 |
description="Build calendar config and deploy module"> |
|---|
| 518 |
<ant antfile="${org.bedework.config.base}/build.xml" inheritrefs="true" |
|---|
| 519 |
target="build" /> |
|---|
| 520 |
</target> |
|---|
| 521 |
|
|---|
| 522 |
<!-- ======================== timers Targets ======================== |
|---|
| 523 |
This builds some timing service classes and applications |
|---|
| 524 |
================================================================= --> |
|---|
| 525 |
|
|---|
| 526 |
<target name="bld.timers" |
|---|
| 527 |
depends="init,bld.appcommon" |
|---|
| 528 |
description="Build calendar timed services suite"> |
|---|
| 529 |
<ant antfile="${org.bedework.timers.base}/build.xml" inheritrefs="true" |
|---|
| 530 |
target="build" > |
|---|
| 531 |
<property name="org.bedework.clone.name" value="${org.bedework.clone.default}" /> |
|---|
| 532 |
</ant> |
|---|
| 533 |
</target> |
|---|
| 534 |
|
|---|
| 535 |
<target name="bld.timers.debug" |
|---|
| 536 |
depends="init,bld.appcommon" |
|---|
| 537 |
description="Build calendar timed services suite"> |
|---|
| 538 |
<ant antfile="${org.bedework.timers.base}/build.xml" inheritrefs="true" |
|---|
| 539 |
target="build" > |
|---|
| 540 |
<property name="app.debug.val" value="9" /> |
|---|
| 541 |
<property name="org.bedework.clone.name" value="${org.bedework.clone.default}" /> |
|---|
| 542 |
</ant> |
|---|
| 543 |
</target> |
|---|
| 544 |
|
|---|
| 545 |
<target name="bld.dumprestore" |
|---|
| 546 |
depends="init,bld.appcommon" |
|---|
| 547 |
description="Build calendar dumprestore suite"> |
|---|
| 548 |
<ant antfile="${org.bedework.dumprestore.base}/build.xml" inheritrefs="true" |
|---|
| 549 |
target="build" /> |
|---|
| 550 |
</target> |
|---|
| 551 |
|
|---|
| 552 |
<!-- ======================== tools Targets ======================== |
|---|
| 553 |
This builds the tools |
|---|
| 554 |
|
|---|
| 555 |
To build more than one appsuite duplicate the ant task |
|---|
| 556 |
invocation below with a different clone name in each. |
|---|
| 557 |
================================================================= --> |
|---|
| 558 |
|
|---|
| 559 |
<target name="build.tools" |
|---|
| 560 |
depends="init,bld.appcommon" |
|---|
| 561 |
description="Build calendar tools suite"> |
|---|
| 562 |
<ant antfile="${org.bedework.tools.base}/build.xml" inheritrefs="true" |
|---|
| 563 |
target="build" /> |
|---|
| 564 |
</target> |
|---|
| 565 |
|
|---|
| 566 |
<target name="dumpdb" depends="init"> |
|---|
| 567 |
<ant antfile="${org.bedework.dumprestore.base}/build.xml" inheritrefs="true" |
|---|
| 568 |
target="dumpdb" /> |
|---|
| 569 |
</target> |
|---|
| 570 |
|
|---|
| 571 |
<target name="restoredb" depends="init"> |
|---|
| 572 |
<ant antfile="${org.bedework.dumprestore.base}/build.xml" inheritrefs="true" |
|---|
| 573 |
target="restoredb" /> |
|---|
| 574 |
</target> |
|---|
| 575 |
|
|---|
| 576 |
<target name="initdb" depends="init"> |
|---|
| 577 |
<ant antfile="${org.bedework.dumprestore.base}/build.xml" inheritrefs="true" |
|---|
| 578 |
target="initdb" /> |
|---|
| 579 |
</target> |
|---|
| 580 |
|
|---|
| 581 |
<target name="tzconvert" depends="init"> |
|---|
| 582 |
<ant antfile="${org.bedework.tools.base}/build.xml" inheritrefs="true" |
|---|
| 583 |
target="tzconvert" /> |
|---|
| 584 |
</target> |
|---|
| 585 |
|
|---|
| 586 |
<!-- ======================== test target ======================= |
|---|
| 587 |
This builds the test suite |
|---|
| 588 |
================================================================= --> |
|---|
| 589 |
|
|---|
| 590 |
<target name="webtest.all" depends="init" |
|---|
| 591 |
description="Run the full webtest suite"> |
|---|
| 592 |
<ant antfile="${org.bedework.webtest.base}/build.xml" inheritrefs="true" |
|---|
| 593 |
target="all" /> |
|---|
| 594 |
</target> |
|---|
| 595 |
|
|---|
| 596 |
<target name="bld.test" |
|---|
| 597 |
depends="init,bld.core,bld.appcommon,bld.synchml" |
|---|
| 598 |
description="Build all calendar test jars"> |
|---|
| 599 |
<ant antfile="${org.bedework.testsuite.base}/build.xml" inheritrefs="true" |
|---|
| 600 |
target="build" /> |
|---|
| 601 |
</target> |
|---|
| 602 |
|
|---|
| 603 |
<target name="run.test" |
|---|
| 604 |
depends="init,bld.core,bld.access,bld.appcommon,bld.synchml" |
|---|
| 605 |
description="Run JUnit tests and generate a report"> |
|---|
| 606 |
<ant antfile="${org.bedework.testsuite.base}/build.xml" inheritrefs="true" |
|---|
| 607 |
target="run.unittest" /> |
|---|
| 608 |
</target> |
|---|
| 609 |
|
|---|
| 610 |
<target name="bld.httptest" |
|---|
| 611 |
depends="init" |
|---|
| 612 |
description="Build calendar http test suite classes jar"> |
|---|
| 613 |
<ant antfile="${org.bedework.testsuite.base}/build.xml" inheritrefs="true" |
|---|
| 614 |
target="build.httptest" /> |
|---|
| 615 |
</target> |
|---|
| 616 |
|
|---|
| 617 |
<target name="run.httptest" |
|---|
| 618 |
depends="init" |
|---|
| 619 |
description="Run calendar http test suite classes jar"> |
|---|
| 620 |
<!-- Define location of run-time env.properties --> |
|---|
| 621 |
<property name="uwcal.env.properties.root" |
|---|
| 622 |
location="${uwcal.test.env.properties.root}" /> |
|---|
| 623 |
|
|---|
| 624 |
<ant antfile="${org.bedework.testsuite.base}/build.xml" inheritrefs="true" |
|---|
| 625 |
target="run.httptest" /> |
|---|
| 626 |
</target> |
|---|
| 627 |
|
|---|
| 628 |
<target name="synchmltest" |
|---|
| 629 |
depends="bld.test" |
|---|
| 630 |
description="Run calendar synchml test"> |
|---|
| 631 |
<!-- Define location of run-time env.properties --> |
|---|
| 632 |
<property name="uwcal.env.properties.root" |
|---|
| 633 |
location="${uwcal.test.env.properties.root}" /> |
|---|
| 634 |
|
|---|
| 635 |
<ant antfile="${org.bedework.testsuite.base}/build.xml" inheritrefs="true" |
|---|
| 636 |
target="synchmltest" /> |
|---|
| 637 |
</target> |
|---|
| 638 |
|
|---|
| 639 |
<!-- ======================== schema target ======================= |
|---|
| 640 |
This builds the ddl from the hibernate schema |
|---|
| 641 |
================================================================= --> |
|---|
| 642 |
|
|---|
| 643 |
<target name="schema" depends="init" |
|---|
| 644 |
description="Generate schema from mapping files"> |
|---|
| 645 |
<input message="text only? no will update db with new schema " |
|---|
| 646 |
validargs="yes,no" |
|---|
| 647 |
addproperty="schema.text.only" /> |
|---|
| 648 |
|
|---|
| 649 |
<property name="schema.run.base" |
|---|
| 650 |
location="${org.bedework.temp.home}/schema"/> |
|---|
| 651 |
<property name="schema.run.resources" |
|---|
| 652 |
location="${schema.run.base}/resources"/> |
|---|
| 653 |
|
|---|
| 654 |
<delete dir="${schema.run.resources}" /> |
|---|
| 655 |
<mkdir dir="${schema.run.resources}" /> |
|---|
| 656 |
<copy tofile="${schema.run.resources}/log4j.xml" |
|---|
| 657 |
file="${org.bedework.testsuite.base}/resources/log4j.xml" /> |
|---|
| 658 |
<property name="org.bedework.schema.hibernate.properties" |
|---|
| 659 |
location="${org.bedework.testsuite.base}/resources/hibernate.properties" /> |
|---|
| 660 |
<copy tofile="${schema.run.resources}/hibernate.properties" |
|---|
| 661 |
file="${org.bedework.schema.hibernate.properties}" /> |
|---|
| 662 |
|
|---|
| 663 |
<!-- |
|---|
| 664 |
<property name="org.bedework.hibernate.schema.properties" |
|---|
| 665 |
location="${schema.run.resources}/hibernate.properties" /> |
|---|
| 666 |
--> |
|---|
| 667 |
|
|---|
| 668 |
<mkdir dir="${schema.run.resources}/hbms" /> |
|---|
| 669 |
<copy todir="${schema.run.resources}/hbms" > |
|---|
| 670 |
<fileset dir="${org.bedework.core.base}/resources/hbms"> |
|---|
| 671 |
<include name="*.hbm.xml"/> |
|---|
| 672 |
</fileset> |
|---|
| 673 |
</copy> |
|---|
| 674 |
|
|---|
| 675 |
<path id="schema.cp"> |
|---|
| 676 |
<!-- Include any local jdbc drivers --> |
|---|
| 677 |
<fileset dir="${org.bedework.jdbc.lib}"> |
|---|
| 678 |
<include name="**/*.jar"/> |
|---|
| 679 |
</fileset> |
|---|
| 680 |
|
|---|
| 681 |
<!-- Include the quickstart jdbc driver --> |
|---|
| 682 |
<pathelement location="${hsqldb.jdbcdriver.jar}"/> |
|---|
| 683 |
|
|---|
| 684 |
<!-- Need the hibernate stuff --> |
|---|
| 685 |
<fileset dir="${hibernate.jars.dir}"> |
|---|
| 686 |
<include name="**/*.jar"/> |
|---|
| 687 |
</fileset> |
|---|
| 688 |
<pathelement location="${log4j.jar}"/> |
|---|
| 689 |
|
|---|
| 690 |
<!-- for commons stuff --> |
|---|
| 691 |
<fileset dir="${struts.dir}"> |
|---|
| 692 |
<include name="commons*.jar"/> |
|---|
| 693 |
</fileset> |
|---|
| 694 |
|
|---|
| 695 |
<!-- Need the classes we are trying to persist --> |
|---|
| 696 |
<pathelement location="${org.bedework.access.jar}"/> |
|---|
| 697 |
<pathelement location="${org.bedework.calfacadeshared.jar}"/> |
|---|
| 698 |
|
|---|
| 699 |
<!-- The xml schema files --> |
|---|
| 700 |
<pathelement location="${org.bedework.core.base}/resources"/> |
|---|
| 701 |
<pathelement location="${schema.run.resources}"/> |
|---|
| 702 |
<pathelement location="${schema.run.resources}/hbms"/> |
|---|
| 703 |
<pathelement location="${schema.run.resources}/hibernate.properties"/> |
|---|
| 704 |
</path> |
|---|
| 705 |
|
|---|
| 706 |
<copy todir="${schema.run.resources}/hbms" |
|---|
| 707 |
file="${org.bedework.core.base}/resources/properties/hibernate.cfg.xml" /> |
|---|
| 708 |
|
|---|
| 709 |
<property name="cp" refid="schema.cp" /> |
|---|
| 710 |
<echo message="***************cp: ${cp}"/> |
|---|
| 711 |
|
|---|
| 712 |
<taskdef name="schemaexport" |
|---|
| 713 |
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"> |
|---|
| 714 |
<classpath refid="schema.cp"/> |
|---|
| 715 |
</taskdef> |
|---|
| 716 |
|
|---|
| 717 |
<!-- text="no" causes task to create db. Requires db system to be running |
|---|
| 718 |
and jdbc drivers on class path |
|---|
| 719 |
--> |
|---|
| 720 |
<schemaexport properties="${schema.run.resources}/hibernate.properties" |
|---|
| 721 |
quiet="no" |
|---|
| 722 |
text="${schema.text.only}" |
|---|
| 723 |
drop="no" |
|---|
| 724 |
delimiter=";" |
|---|
| 725 |
output="schema-export.sql" |
|---|
| 726 |
config="${schema.run.resources}/hbms/hibernate.cfg.xml"> |
|---|
| 727 |
</schemaexport> |
|---|
| 728 |
</target> |
|---|
| 729 |
|
|---|
| 730 |
<!-- ===================== Quickstart target =============================== |
|---|
| 731 |
The "quickstart.build" target 'builds' quickstart by copying particular |
|---|
| 732 |
files into the quickstart directory. We assume quickstart consists of |
|---|
| 733 |
a directory containing 4 subdirectories: tomcat, hsqldb, ant, and |
|---|
| 734 |
this one (calendar3), along with the 3 ant executable files. This |
|---|
| 735 |
target copies files from calendar3 into the quickstart and tomcat |
|---|
| 736 |
directories to create a calendar version that works out of the box |
|---|
| 737 |
(once ant deploy is run). |
|---|
| 738 |
=================================================================== --> |
|---|
| 739 |
|
|---|
| 740 |
<target name="quickstart.build" depends="init" |
|---|
| 741 |
description="copy files to quickstart directories"> |
|---|
| 742 |
|
|---|
| 743 |
<property name="quickstart.files.dir" |
|---|
| 744 |
location="${calendar.dir}/quickstartFiles"/> |
|---|
| 745 |
|
|---|
| 746 |
<copy todir="${org.bedework.appserver.dir}/conf" overwrite="yes"> |
|---|
| 747 |
<fileset dir="${quickstart.files.dir}/tomcat.conf" /> |
|---|
| 748 |
</copy> |
|---|
| 749 |
|
|---|
| 750 |
<copy todir="${calendar.dir}/.." overwrite="yes"> |
|---|
| 751 |
<fileset dir="${quickstart.files.dir}/root" /> |
|---|
| 752 |
</copy> |
|---|
| 753 |
</target> |
|---|
| 754 |
|
|---|
| 755 |
<!-- Create a version using acegi security |
|---|
| 756 |
--> |
|---|
| 757 |
<target name="quickstart.acegi.build" depends="init" |
|---|
| 758 |
description="copy files to quickstart directories"> |
|---|
| 759 |
|
|---|
| 760 |
<property name="quickstart.files.dir" |
|---|
| 761 |
location="${calendar.dir}/quickstartFiles"/> |
|---|
| 762 |
|
|---|
| 763 |
<copy todir="${org.bedework.appserver.dir}/common/lib" overwrite="yes"> |
|---|
| 764 |
<fileset dir="${calendar.dir}/lib/acegi" |
|---|
| 765 |
excludes="acegi-security-catalina-server.jar" /> |
|---|
| 766 |
</copy> |
|---|
| 767 |
|
|---|
| 768 |
<copy todir="${org.bedework.appserver.dir}/server/lib" overwrite="yes"> |
|---|
| 769 |
<fileset dir="${calendar.dir}/lib/acegi" |
|---|
| 770 |
includes="acegi-security-catalina-server.jar" /> |
|---|
| 771 |
</copy> |
|---|
| 772 |
|
|---|
| 773 |
<copy tofile="${org.bedework.appserver.dir}/conf/server.xml" overwrite="yes" |
|---|
| 774 |
file="${quickstart.files.dir}/tomcat.conf/server.acgi.xml" /> |
|---|
| 775 |
|
|---|
| 776 |
<copy tofile="${org.bedework.appserver.dir}/conf/acegisecurity.xml" overwrite="yes" |
|---|
| 777 |
file="${quickstart.files.dir}/tomcat.conf/acegisecurity.xml" /> |
|---|
| 778 |
|
|---|
| 779 |
<copy todir="${calendar.dir}/.." overwrite="yes"> |
|---|
| 780 |
<fileset dir="${quickstart.files.dir}/root" /> |
|---|
| 781 |
</copy> |
|---|
| 782 |
</target> |
|---|
| 783 |
</project> |
|---|