| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
|
|---|
| 3 |
<!-- This is the ant build file for the bedework Calendar quickstart. |
|---|
| 4 |
|
|---|
| 5 |
It is imported by the quickstart build.xml ensuring all changes to this file |
|---|
| 6 |
appear in the repository. |
|---|
| 7 |
|
|---|
| 8 |
Authors: Mike Douglass douglm@rpi.edu |
|---|
| 9 |
--> |
|---|
| 10 |
|
|---|
| 11 |
<project name="quickstart-build-file" default="usage" basedir="."> |
|---|
| 12 |
<property environment="env"/> |
|---|
| 13 |
|
|---|
| 14 |
<dirname property="bedework.quickstart.basedir" file="${ant.file.quickstart-build-file}"/> |
|---|
| 15 |
|
|---|
| 16 |
<taskdef resource="net/sf/antcontrib/antcontrib.properties" /> |
|---|
| 17 |
|
|---|
| 18 |
<import file="${bedework.quickstart.basedir}/run-hsqldb.xml" /> |
|---|
| 19 |
<import file="${bedework.quickstart.basedir}/run-tomcat.xml" /> |
|---|
| 20 |
<import file="${bedework.quickstart.basedir}/run-dir.xml" /> |
|---|
| 21 |
|
|---|
| 22 |
<target name="README" depends="init" |
|---|
| 23 |
description="Describe targets and their usage"> |
|---|
| 24 |
<loadfile property="org.bedework.README" srcFile="${org.bedework.calendar.dir}/docs/README"/> |
|---|
| 25 |
<echo message="${org.bedework.README}" /> |
|---|
| 26 |
</target> |
|---|
| 27 |
|
|---|
| 28 |
<echo message="Load user properties from ${org.bedework.user.build.properties}" /> |
|---|
| 29 |
|
|---|
| 30 |
<!-- Load user property definition overrides --> |
|---|
| 31 |
<property file="${org.bedework.user.build.properties}" /> |
|---|
| 32 |
|
|---|
| 33 |
<!-- This may have defined the config properties location. Load that now to get overrides |
|---|
| 34 |
<property file="${org.bedework.config.properties}" />--> |
|---|
| 35 |
|
|---|
| 36 |
<import file="${bedework.quickstart.basedir}/../loadDeployConfig.xml"/> |
|---|
| 37 |
|
|---|
| 38 |
<target name="usage" depends="init" |
|---|
| 39 |
description="Describe targets and their usage"> |
|---|
| 40 |
<echo message="As distributed the package should be ready to go."/> |
|---|
| 41 |
<echo message="Ensure ant is on your path, (a version is in the" /> |
|---|
| 42 |
<echo message="package)"/> |
|---|
| 43 |
<echo message=""/> |
|---|
| 44 |
<echo message="First in one window do"/> |
|---|
| 45 |
<echo message=" ant hsqldb"/> |
|---|
| 46 |
<echo message="This will start the hsqldb server ready for the "/> |
|---|
| 47 |
<echo message="application."/> |
|---|
| 48 |
<echo message=""/> |
|---|
| 49 |
<echo message="In another window do"/> |
|---|
| 50 |
<echo message=" ant tomcatstart"/> |
|---|
| 51 |
<echo message=""/> |
|---|
| 52 |
<echo message="Once tomcat is running you should be able to go to a"/> |
|---|
| 53 |
<echo message="browser and connect to"/> |
|---|
| 54 |
<echo message=" http://localhost:8080/bedework"/> |
|---|
| 55 |
<echo message="and follow the instructions."/> |
|---|
| 56 |
<echo message=""/> |
|---|
| 57 |
<echo message="To build the calendar do"/> |
|---|
| 58 |
<echo message=" ant deploy or "/> |
|---|
| 59 |
<echo message=" ant deploy.debug "/> |
|---|
| 60 |
<echo message="which does a build and deploy of all components"/> |
|---|
| 61 |
<echo message=""/> |
|---|
| 62 |
<echo message="To rebuild the calendar do"/> |
|---|
| 63 |
<echo message=" ant clean.deploy or "/> |
|---|
| 64 |
<echo message=" ant clean.deploy.debug "/> |
|---|
| 65 |
<echo message="which does a clean, build and deploy of all components"/> |
|---|
| 66 |
<echo message=""/> |
|---|
| 67 |
<echo message="See documentation in the docs directory or on bedework.org"/> |
|---|
| 68 |
<echo message="for instructions on creating a locally configured calendar application"/> |
|---|
| 69 |
<echo message=""/> |
|---|
| 70 |
</target> |
|---|
| 71 |
|
|---|
| 72 |
<!-- The only properties set below should be those directly used to |
|---|
| 73 |
invoke the targets below, in this file. |
|---|
| 74 |
Do not set properties here for tasks invoked in other build |
|---|
| 75 |
files. Instead, make sure the targets work in calendar/build.xml, |
|---|
| 76 |
then invoke ant on the task in calendar/build.xml. |
|---|
| 77 |
|
|---|
| 78 |
For an example, of invoking ant on another build file, |
|---|
| 79 |
see the deploy target, below. |
|---|
| 80 |
--> |
|---|
| 81 |
<target name="init" > |
|---|
| 82 |
<dirname property="quickstart.dir" file="${ant.file}"/> |
|---|
| 83 |
|
|---|
| 84 |
<property name="org.bedework.project.bedework" |
|---|
| 85 |
location="${basedir}/bedework" /> |
|---|
| 86 |
|
|---|
| 87 |
<property name="org.bedework.config.base" |
|---|
| 88 |
location="${org.bedework.project.bedework}/config" /> |
|---|
| 89 |
|
|---|
| 90 |
<property name="bedework.build.file" |
|---|
| 91 |
location="${basedir}/bedework/build.xml" /> |
|---|
| 92 |
<property name="org.bedework.user.build.properties" |
|---|
| 93 |
location="${user.home}/bedework.build.properties" /> |
|---|
| 94 |
<dirname property="org.bedework.configuration.location" |
|---|
| 95 |
file="${org.bedework.user.build.properties}" /> |
|---|
| 96 |
|
|---|
| 97 |
<!-- Unfortunately it sits on top of everything |
|---|
| 98 |
<splash imageurl="file://${org.bedework.project.bedework}/docs/icons/bedeworkLogo.gif"/> |
|---|
| 99 |
--> |
|---|
| 100 |
</target> |
|---|
| 101 |
|
|---|
| 102 |
<target name="run.init" depends="init" > |
|---|
| 103 |
<property name="org.bedework.user.build.properties" |
|---|
| 104 |
location="${user.home}/bedework.build.properties" /> |
|---|
| 105 |
|
|---|
| 106 |
<property name="org.bedework.appserver.dir" |
|---|
| 107 |
location="${org.bedework.project.bedework}/../apache-tomcat-5.5.17" /> |
|---|
| 108 |
|
|---|
| 109 |
<property name="org.bedework.hsqldb.dir" |
|---|
| 110 |
location="${org.bedework.project.bedework}/../hsqldb-1.7.3.3" /> |
|---|
| 111 |
|
|---|
| 112 |
<echo message="Load user properties from ${org.bedework.user.build.properties}" /> |
|---|
| 113 |
|
|---|
| 114 |
<!-- Load user property definition overrides --> |
|---|
| 115 |
<property file="${org.bedework.user.build.properties}" /> |
|---|
| 116 |
|
|---|
| 117 |
<!-- ==================== config properties ========================= |
|---|
| 118 |
<property name="org.bedework.config.properties" |
|---|
| 119 |
location="${org.bedework.config.base}/configs/democal.properties" /> |
|---|
| 120 |
<property name="org.bedework.config.options" |
|---|
| 121 |
location="${org.bedework.config.base}/configs/democal.options.xml" /> |
|---|
| 122 |
|
|---|
| 123 |
<echo message="==========================================================" /> |
|---|
| 124 |
<echo message="Use config properties ${org.bedework.config.properties}" /> |
|---|
| 125 |
<loadproperties |
|---|
| 126 |
srcFile="${org.bedework.config.properties}" > |
|---|
| 127 |
<filterchain> |
|---|
| 128 |
<expandproperties/> |
|---|
| 129 |
</filterchain> |
|---|
| 130 |
</loadproperties> |
|---|
| 131 |
--> |
|---|
| 132 |
</target> |
|---|
| 133 |
|
|---|
| 134 |
<!-- ================================================================= |
|---|
| 135 |
The "build" target builds the jar files |
|---|
| 136 |
================================================================= --> |
|---|
| 137 |
|
|---|
| 138 |
<target name="build" depends="init" |
|---|
| 139 |
description="builds the jars"> |
|---|
| 140 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 141 |
target="build" /> |
|---|
| 142 |
<tstamp prefix="endbuild" /> |
|---|
| 143 |
<echo message="=================> Build finished at ${endbuild.TODAY}" /> |
|---|
| 144 |
</target> |
|---|
| 145 |
|
|---|
| 146 |
<target name="clean.build" depends="clean" |
|---|
| 147 |
description="cleans then builds the jars"> |
|---|
| 148 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 149 |
target="clean.build" /> |
|---|
| 150 |
</target> |
|---|
| 151 |
|
|---|
| 152 |
<!-- ================================================================= |
|---|
| 153 |
The "deploy" target builds and deploys the applications |
|---|
| 154 |
================================================================= --> |
|---|
| 155 |
|
|---|
| 156 |
<target name="deploy" depends="init" |
|---|
| 157 |
description="builds and deploys the applications"> |
|---|
| 158 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 159 |
target="deploy" /> |
|---|
| 160 |
</target> |
|---|
| 161 |
|
|---|
| 162 |
<target name="deploy.debug" depends="init" |
|---|
| 163 |
description="builds and deploys the applications"> |
|---|
| 164 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 165 |
target="deploy.debug" /> |
|---|
| 166 |
<tstamp> |
|---|
| 167 |
<format property="deploydebug.time" pattern="MM/dd/yyyy HH:mm:ss"/> |
|---|
| 168 |
</tstamp> |
|---|
| 169 |
|
|---|
| 170 |
<echo message="=================> deploy.debug finished at ${deploydebug.time}" /> |
|---|
| 171 |
</target> |
|---|
| 172 |
|
|---|
| 173 |
<!-- ================================================================= |
|---|
| 174 |
The "clean.deploy" target cleans, builds and deploys the applications |
|---|
| 175 |
================================================================= --> |
|---|
| 176 |
|
|---|
| 177 |
<target name="clean" depends="init" |
|---|
| 178 |
description="Remove all generated files."> |
|---|
| 179 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 180 |
target="clean" /> |
|---|
| 181 |
</target> |
|---|
| 182 |
|
|---|
| 183 |
<target name="quickstart-clean" depends="init" |
|---|
| 184 |
description="partial clean up for quickstart."> |
|---|
| 185 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 186 |
target="quickstart-clean" /> |
|---|
| 187 |
</target> |
|---|
| 188 |
|
|---|
| 189 |
<target name="clean.deploy" depends="init" |
|---|
| 190 |
description="builds and deploys the applications"> |
|---|
| 191 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 192 |
target="clean.deploy" /> |
|---|
| 193 |
</target> |
|---|
| 194 |
|
|---|
| 195 |
<target name="clean.deploy.debug" depends="init" |
|---|
| 196 |
description="builds and deploys the applications"> |
|---|
| 197 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 198 |
target="clean.deploy.debug" /> |
|---|
| 199 |
</target> |
|---|
| 200 |
|
|---|
| 201 |
<!-- ================================================================= |
|---|
| 202 |
The "build.configured" target builds configured applications |
|---|
| 203 |
================================================================= --> |
|---|
| 204 |
|
|---|
| 205 |
<target name="build.configured" depends="init" |
|---|
| 206 |
description="Build configured applications" > |
|---|
| 207 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 208 |
target="build.configured" /> |
|---|
| 209 |
</target> |
|---|
| 210 |
|
|---|
| 211 |
<target name="build.configured.debug" depends="init" |
|---|
| 212 |
description="Build configured applications" > |
|---|
| 213 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 214 |
target="build.configured.debug" /> |
|---|
| 215 |
</target> |
|---|
| 216 |
|
|---|
| 217 |
<target name="clean.build.configured" depends="init" |
|---|
| 218 |
description="Build configured applications" > |
|---|
| 219 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 220 |
target="clean.build.configured" /> |
|---|
| 221 |
</target> |
|---|
| 222 |
|
|---|
| 223 |
<target name="clean.build.configured.debug" depends="init" |
|---|
| 224 |
description="Build configured applications" > |
|---|
| 225 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 226 |
target="clean.build.configured.debug" /> |
|---|
| 227 |
</target> |
|---|
| 228 |
|
|---|
| 229 |
<!-- ================================================================= |
|---|
| 230 |
The "javadoc" target builds javadocs for all projects |
|---|
| 231 |
================================================================= --> |
|---|
| 232 |
|
|---|
| 233 |
<target name="javadoc" depends="init" |
|---|
| 234 |
description="Build javadocs" > |
|---|
| 235 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 236 |
target="javadoc" /> |
|---|
| 237 |
</target> |
|---|
| 238 |
</project> |
|---|