| 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 |
<import file="${bedework.quickstart.basedir}/install.xml" /> |
|---|
| 22 |
|
|---|
| 23 |
<target name="README" depends="init" |
|---|
| 24 |
description="Describe targets and their usage"> |
|---|
| 25 |
<loadfile property="org.bedework.README" srcFile="${org.bedework.calendar.dir}/docs/README"/> |
|---|
| 26 |
<echo message="${org.bedework.README}" /> |
|---|
| 27 |
</target> |
|---|
| 28 |
|
|---|
| 29 |
<echo message="Load user properties from ${org.bedework.user.build.properties}" /> |
|---|
| 30 |
|
|---|
| 31 |
<!-- Load user property definition overrides --> |
|---|
| 32 |
<property file="${org.bedework.user.build.properties}" /> |
|---|
| 33 |
|
|---|
| 34 |
<!-- This may have defined the config properties location. Load that now to get overrides |
|---|
| 35 |
<property file="${org.bedework.config.properties}" />--> |
|---|
| 36 |
|
|---|
| 37 |
<import file="${bedework.quickstart.basedir}/../loadDeployConfig.xml"/> |
|---|
| 38 |
|
|---|
| 39 |
<target name="usage" depends="init" |
|---|
| 40 |
description="Describe targets and their usage"> |
|---|
| 41 |
<echo level="info" message="As distributed the package should be ready to go."/> |
|---|
| 42 |
<echo level="info" message="Ensure ant is on your path, (a version is in the" /> |
|---|
| 43 |
<echo level="info" message="package)"/> |
|---|
| 44 |
<echo level="info" message=""/> |
|---|
| 45 |
<echo level="info" message="First in one window do"/> |
|---|
| 46 |
<echo level="info" message=" ant hsqldb"/> |
|---|
| 47 |
<echo level="info" message="This will start the hsqldb server ready for the "/> |
|---|
| 48 |
<echo level="info" message="application."/> |
|---|
| 49 |
<echo level="info" message=""/> |
|---|
| 50 |
<echo level="info" message="In another window do"/> |
|---|
| 51 |
<echo level="info" message=" ant tomcatstart"/> |
|---|
| 52 |
<echo level="info" message=""/> |
|---|
| 53 |
<echo level="info" message="Once tomcat is running you should be able to go to a"/> |
|---|
| 54 |
<echo level="info" message="browser and connect to"/> |
|---|
| 55 |
<echo level="info" message=" http://localhost:8080/bedework"/> |
|---|
| 56 |
<echo level="info" message="and follow the instructions."/> |
|---|
| 57 |
<echo level="info" message=""/> |
|---|
| 58 |
<echo level="info" message="To build the calendar do"/> |
|---|
| 59 |
<echo level="info" message=" ant deploy or "/> |
|---|
| 60 |
<echo level="info" message=" ant deploy.debug "/> |
|---|
| 61 |
<echo level="info" message="which does a build and deploy of all components"/> |
|---|
| 62 |
<echo level="info" message=""/> |
|---|
| 63 |
<echo level="info" message="To rebuild the calendar do"/> |
|---|
| 64 |
<echo level="info" message=" ant clean.deploy or "/> |
|---|
| 65 |
<echo level="info" message=" ant clean.deploy.debug "/> |
|---|
| 66 |
<echo level="info" message="which does a clean, build and deploy of all components"/> |
|---|
| 67 |
<echo level="info" message=""/> |
|---|
| 68 |
<echo level="info" message="See documentation in the docs directory or on bedework.org"/> |
|---|
| 69 |
<echo level="info" message="for instructions on creating a locally configured calendar application"/> |
|---|
| 70 |
<echo level="info" message=""/> |
|---|
| 71 |
</target> |
|---|
| 72 |
|
|---|
| 73 |
<!-- The only properties set below should be those directly used to |
|---|
| 74 |
invoke the targets below, in this file. |
|---|
| 75 |
Do not set properties here for tasks invoked in other build |
|---|
| 76 |
files. Instead, make sure the targets work in calendar/build.xml, |
|---|
| 77 |
then invoke ant on the task in calendar/build.xml. |
|---|
| 78 |
|
|---|
| 79 |
For an example, of invoking ant on another build file, |
|---|
| 80 |
see the deploy target, below. |
|---|
| 81 |
--> |
|---|
| 82 |
<target name="init" > |
|---|
| 83 |
<dirname property="quickstart.dir" file="${ant.file}"/> |
|---|
| 84 |
|
|---|
| 85 |
<property name="org.bedework.project.bedework" |
|---|
| 86 |
location="${basedir}/bedework" /> |
|---|
| 87 |
|
|---|
| 88 |
<property name="org.bedework.config.base" |
|---|
| 89 |
location="${org.bedework.project.bedework}/config" /> |
|---|
| 90 |
|
|---|
| 91 |
<property name="bedework.build.file" |
|---|
| 92 |
location="${basedir}/bedework/build.xml" /> |
|---|
| 93 |
<property name="org.bedework.user.build.properties" |
|---|
| 94 |
location="${user.home}/bedework.build.properties" /> |
|---|
| 95 |
<dirname property="org.bedework.configuration.location" |
|---|
| 96 |
file="${org.bedework.user.build.properties}" /> |
|---|
| 97 |
|
|---|
| 98 |
<!-- Unfortunately it sits on top of everything |
|---|
| 99 |
<splash imageurl="file://${org.bedework.project.bedework}/docs/icons/bedeworkLogo.gif"/> |
|---|
| 100 |
--> |
|---|
| 101 |
</target> |
|---|
| 102 |
|
|---|
| 103 |
<target name="run.init" depends="init" > |
|---|
| 104 |
<property name="org.bedework.user.build.properties" |
|---|
| 105 |
location="${user.home}/bedework.build.properties" /> |
|---|
| 106 |
|
|---|
| 107 |
<property name="org.bedework.appserver.dir" |
|---|
| 108 |
location="${org.bedework.project.bedework}/../apache-tomcat-5.5.17" /> |
|---|
| 109 |
|
|---|
| 110 |
<property name="org.bedework.hsqldb.dir" |
|---|
| 111 |
location="${org.bedework.project.bedework}/../hsqldb-1.7.3.3" /> |
|---|
| 112 |
|
|---|
| 113 |
<property name="org.bedework.directory.dir" |
|---|
| 114 |
location="${org.bedework.project.bedework}/../apacheds-1.5.3-fixed" /> |
|---|
| 115 |
</target> |
|---|
| 116 |
|
|---|
| 117 |
<!-- ================================================================= |
|---|
| 118 |
The "build" target builds the jar files |
|---|
| 119 |
================================================================= --> |
|---|
| 120 |
|
|---|
| 121 |
<target name="build" depends="init" |
|---|
| 122 |
description="builds the jars"> |
|---|
| 123 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 124 |
target="build" /> |
|---|
| 125 |
<tstamp prefix="endbuild" /> |
|---|
| 126 |
<echo level="info" message="=================> Build finished at ${endbuild.TODAY}" /> |
|---|
| 127 |
</target> |
|---|
| 128 |
|
|---|
| 129 |
<target name="clean.build" depends="clean" |
|---|
| 130 |
description="cleans then builds the jars"> |
|---|
| 131 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 132 |
target="clean.build" /> |
|---|
| 133 |
</target> |
|---|
| 134 |
|
|---|
| 135 |
<!-- ================================================================= |
|---|
| 136 |
The "deploy" target builds and deploys the applications |
|---|
| 137 |
================================================================= --> |
|---|
| 138 |
|
|---|
| 139 |
<target name="deploy" depends="init" |
|---|
| 140 |
description="builds and deploys the applications"> |
|---|
| 141 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 142 |
target="deploy" /> |
|---|
| 143 |
</target> |
|---|
| 144 |
|
|---|
| 145 |
<target name="deploy.debug" depends="init" |
|---|
| 146 |
description="builds and deploys the applications"> |
|---|
| 147 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 148 |
target="deploy.debug" /> |
|---|
| 149 |
<tstamp> |
|---|
| 150 |
<format property="deploydebug.time" pattern="MM/dd/yyyy HH:mm:ss"/> |
|---|
| 151 |
</tstamp> |
|---|
| 152 |
|
|---|
| 153 |
<echo level="info" message="=================> deploy.debug finished at ${deploydebug.time}" /> |
|---|
| 154 |
</target> |
|---|
| 155 |
|
|---|
| 156 |
<!-- ================================================================= |
|---|
| 157 |
The "clean.deploy" target cleans, builds and deploys the applications |
|---|
| 158 |
================================================================= --> |
|---|
| 159 |
|
|---|
| 160 |
<target name="clean" depends="init" |
|---|
| 161 |
description="Remove all generated files."> |
|---|
| 162 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 163 |
target="clean" /> |
|---|
| 164 |
</target> |
|---|
| 165 |
|
|---|
| 166 |
<target name="quickstart-clean" depends="init" |
|---|
| 167 |
description="partial clean up for quickstart."> |
|---|
| 168 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 169 |
target="quickstart-clean" /> |
|---|
| 170 |
</target> |
|---|
| 171 |
|
|---|
| 172 |
<target name="clean.deploy" depends="init" |
|---|
| 173 |
description="builds and deploys the applications"> |
|---|
| 174 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 175 |
target="clean.deploy" /> |
|---|
| 176 |
</target> |
|---|
| 177 |
|
|---|
| 178 |
<target name="clean.deploy.debug" depends="init" |
|---|
| 179 |
description="builds and deploys the applications"> |
|---|
| 180 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 181 |
target="clean.deploy.debug" /> |
|---|
| 182 |
</target> |
|---|
| 183 |
|
|---|
| 184 |
<!-- ================================================================= |
|---|
| 185 |
The "build.configured" target builds configured applications |
|---|
| 186 |
================================================================= --> |
|---|
| 187 |
|
|---|
| 188 |
<target name="build.configured" depends="init" |
|---|
| 189 |
description="Build configured applications" > |
|---|
| 190 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 191 |
target="build.configured" /> |
|---|
| 192 |
</target> |
|---|
| 193 |
|
|---|
| 194 |
<target name="build.configured.debug" depends="init" |
|---|
| 195 |
description="Build configured applications" > |
|---|
| 196 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 197 |
target="build.configured.debug" /> |
|---|
| 198 |
</target> |
|---|
| 199 |
|
|---|
| 200 |
<target name="clean.build.configured" depends="init" |
|---|
| 201 |
description="Build configured applications" > |
|---|
| 202 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 203 |
target="clean.build.configured" /> |
|---|
| 204 |
</target> |
|---|
| 205 |
|
|---|
| 206 |
<target name="clean.build.configured.debug" depends="init" |
|---|
| 207 |
description="Build configured applications" > |
|---|
| 208 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 209 |
target="clean.build.configured.debug" /> |
|---|
| 210 |
</target> |
|---|
| 211 |
|
|---|
| 212 |
<!-- ================================================================= |
|---|
| 213 |
Build and run the cmdline utility |
|---|
| 214 |
================================================================= --> |
|---|
| 215 |
|
|---|
| 216 |
<target name="cmdutil" depends="init" |
|---|
| 217 |
description="run the cmdline utility"> |
|---|
| 218 |
<antfetch antfile="${bedework.build.file}" inheritall="true" |
|---|
| 219 |
target="cmdutil" |
|---|
| 220 |
return="org.bedework.cmdutil.status" > |
|---|
| 221 |
</antfetch> |
|---|
| 222 |
</target> |
|---|
| 223 |
|
|---|
| 224 |
<!-- ================================================================= |
|---|
| 225 |
The "javadoc" target builds javadocs for all projects |
|---|
| 226 |
================================================================= --> |
|---|
| 227 |
|
|---|
| 228 |
<target name="javadoc" depends="init" |
|---|
| 229 |
description="Build javadocs" > |
|---|
| 230 |
<ant antfile="${bedework.build.file}" inheritrefs="true" |
|---|
| 231 |
target="javadoc" /> |
|---|
| 232 |
</target> |
|---|
| 233 |
|
|---|
| 234 |
<!-- ================================================================= |
|---|
| 235 |
The "start" target starts all quickstart components |
|---|
| 236 |
================================================================= --> |
|---|
| 237 |
|
|---|
| 238 |
<target name="start" depends="run.init" |
|---|
| 239 |
description="Start quickstart system" > |
|---|
| 240 |
<parallel> |
|---|
| 241 |
<antcall target="dirstart" inheritrefs="true" /> |
|---|
| 242 |
<antcall target="hsqldb" inheritrefs="true" /> |
|---|
| 243 |
<sequential> |
|---|
| 244 |
<waitfor maxwait="3" maxwaitunit="minute" checkevery="250"> |
|---|
| 245 |
<socket server="localhost" port="10389"/> |
|---|
| 246 |
</waitfor> |
|---|
| 247 |
<antcall target="tomcatstart" inheritrefs="true" /> |
|---|
| 248 |
</sequential> |
|---|
| 249 |
</parallel> |
|---|
| 250 |
</target> |
|---|
| 251 |
|
|---|
| 252 |
<!-- ================================================================= |
|---|
| 253 |
The "start-debug" target starts all quickstart components except tomcat |
|---|
| 254 |
================================================================= --> |
|---|
| 255 |
|
|---|
| 256 |
<target name="start-debug" depends="run.init" |
|---|
| 257 |
description="Start quickstart system" > |
|---|
| 258 |
<parallel> |
|---|
| 259 |
<antcall target="dirstart" inheritrefs="true" /> |
|---|
| 260 |
<antcall target="hsqldb" inheritrefs="true" /> |
|---|
| 261 |
</parallel> |
|---|
| 262 |
</target> |
|---|
| 263 |
</project> |
|---|