| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
|
|---|
| 3 |
<!-- ===================== Deployment build file ======================= |
|---|
| 4 |
This directory and the files within it are to be part of the config |
|---|
| 5 |
and deployment process. |
|---|
| 6 |
|
|---|
| 7 |
A number of properties of the form org.bedework.install.XXX will be |
|---|
| 8 |
defined, each indicating that a particualr component is to be deployed. |
|---|
| 9 |
|
|---|
| 10 |
Targets below will be executed only if that property is defined. |
|---|
| 11 |
|
|---|
| 12 |
Adding a new configuration, e.g. a different portal platform, requires |
|---|
| 13 |
the steps: |
|---|
| 14 |
Create a subdirectory in each components subdirectory, |
|---|
| 15 |
e.g. webadmin/myportal |
|---|
| 16 |
|
|---|
| 17 |
Create any other required resource directories and resources and |
|---|
| 18 |
create a build.xml file to configure and package the component(s). |
|---|
| 19 |
|
|---|
| 20 |
Update the config program to load, save and display the new |
|---|
| 21 |
properties for that configuration. |
|---|
| 22 |
|
|---|
| 23 |
Add an antcall for each component and a corresponding target |
|---|
| 24 |
|
|---|
| 25 |
Authors: Mike Douglass douglm@rpi.edu |
|---|
| 26 |
=================================================================== --> |
|---|
| 27 |
|
|---|
| 28 |
<project name="deploy.bedework" default="init"> |
|---|
| 29 |
<target name="init" > |
|---|
| 30 |
<!-- default to debug off --> |
|---|
| 31 |
<property name="app.debug.val" value="0" /> |
|---|
| 32 |
|
|---|
| 33 |
<!-- set this for the war builds --> |
|---|
| 34 |
<dirname property="app.root.dir" file="${ant.file}"/> |
|---|
| 35 |
|
|---|
| 36 |
<property name="org.bedework.config.properties" |
|---|
| 37 |
location="${org.bedework.config.base}/configs/${org.bedework.clone.name}.properties" /> |
|---|
| 38 |
|
|---|
| 39 |
<!-- ==================== config properties ========================= --> |
|---|
| 40 |
<echo message="==========================================================" /> |
|---|
| 41 |
<echo message="Use clone properties ${org.bedework.config.properties}" /> |
|---|
| 42 |
<loadproperties |
|---|
| 43 |
srcFile="${org.bedework.config.properties}" > |
|---|
| 44 |
<filterchain> |
|---|
| 45 |
<expandproperties/> |
|---|
| 46 |
</filterchain> |
|---|
| 47 |
</loadproperties> |
|---|
| 48 |
</target> |
|---|
| 49 |
|
|---|
| 50 |
<target name="build.configured" depends="init" > |
|---|
| 51 |
<!-- Clean up before we start --> |
|---|
| 52 |
<delete dir="${org.bedework.temp.wars.home}" /> |
|---|
| 53 |
|
|---|
| 54 |
<!-- ======================= webconfig ================= --> |
|---|
| 55 |
<ant antfile="${org.bedework.deployment.base}/webconfig/webapp/build.xml" |
|---|
| 56 |
inheritrefs="true" target="build.configured" /> |
|---|
| 57 |
|
|---|
| 58 |
<antcall target="build.webadmin.webapp" inheritrefs="true" /> |
|---|
| 59 |
|
|---|
| 60 |
<antcall target="build.webadmin.portal" inheritrefs="true" /> |
|---|
| 61 |
|
|---|
| 62 |
<antcall target="build.pubevents.webapp" inheritrefs="true" /> |
|---|
| 63 |
|
|---|
| 64 |
<antcall target="build.pubevents.portal" inheritrefs="true" /> |
|---|
| 65 |
|
|---|
| 66 |
<antcall target="build.personal.webapp" inheritrefs="true" /> |
|---|
| 67 |
|
|---|
| 68 |
<antcall target="build.personal.portal" inheritrefs="true" /> |
|---|
| 69 |
|
|---|
| 70 |
<antcall target="build.public.caldav" inheritrefs="true" /> |
|---|
| 71 |
|
|---|
| 72 |
<antcall target="build.personal.caldav" inheritrefs="true" /> |
|---|
| 73 |
|
|---|
| 74 |
<!-- dump restore - always built (until we have a choice of windows/unix. --> |
|---|
| 75 |
<ant antfile="${org.bedework.deployment.base}/dumprestore/shellscr/build.xml" |
|---|
| 76 |
inheritrefs="true" target="build.configured" /> |
|---|
| 77 |
</target> |
|---|
| 78 |
|
|---|
| 79 |
<!-- ================================================================= |
|---|
| 80 |
Targets called by the build.configured target. Each is conditional on a |
|---|
| 81 |
config property and each executes a build file in a subdirectory of |
|---|
| 82 |
this component. |
|---|
| 83 |
================================================================= --> |
|---|
| 84 |
|
|---|
| 85 |
<target name="build.webadmin.webapp" if="org.bedework.webadmin.build.standalone.app" > |
|---|
| 86 |
<!-- ======================= webadmin - standalone ================= --> |
|---|
| 87 |
<ant antfile="${org.bedework.deployment.base}/webadmin/webapp/build.xml" |
|---|
| 88 |
inheritrefs="true" target="build.configured" /> |
|---|
| 89 |
</target> |
|---|
| 90 |
|
|---|
| 91 |
<target name="build.webadmin.portal" if="org.bedework.webadmin.portal.platform" > |
|---|
| 92 |
<!-- ======================= webadmin - portal ================= --> |
|---|
| 93 |
<ant antfile="${org.bedework.deployment.base}/webadmin/${admin.portal.platform}/build.xml" |
|---|
| 94 |
inheritrefs="true" target="build.configured" /> |
|---|
| 95 |
</target> |
|---|
| 96 |
|
|---|
| 97 |
<target name="build.pubevents.webapp" if="org.bedework.webpubevents.build.standalone.app" > |
|---|
| 98 |
<!-- ======================= pubevents - standalone ================= --> |
|---|
| 99 |
<ant antfile="${org.bedework.deployment.base}/webpublic/webapp/build.xml" |
|---|
| 100 |
inheritrefs="true" target="build.configured" /> |
|---|
| 101 |
</target> |
|---|
| 102 |
|
|---|
| 103 |
<target name="build.pubevents.portal" if="org.bedework.webpubevents.portal.platform" > |
|---|
| 104 |
<!-- ======================= pubevents - portal ================= --> |
|---|
| 105 |
<ant antfile="${org.bedework.deployment.base}/webpublic/${pubevents.portal.platform}/build.xml" |
|---|
| 106 |
inheritrefs="true" target="build.configured" /> |
|---|
| 107 |
</target> |
|---|
| 108 |
|
|---|
| 109 |
<target name="build.personal.webapp" if="org.bedework.webpersonal.build.standalone.app" > |
|---|
| 110 |
<!-- ======================= pubevents - standalone ================= --> |
|---|
| 111 |
<ant antfile="${org.bedework.deployment.base}/webuser/webapp/build.xml" |
|---|
| 112 |
inheritrefs="true" target="build.configured" /> |
|---|
| 113 |
</target> |
|---|
| 114 |
|
|---|
| 115 |
<target name="build.personal.portal" if="org.bedework.webpersonal.portal.platform" > |
|---|
| 116 |
<!-- ======================= pubevents - portal ================= --> |
|---|
| 117 |
<ant antfile="${org.bedework.deployment.base}/webuser/${personal.portal.platform}/build.xml" |
|---|
| 118 |
inheritrefs="true" target="build.configured" /> |
|---|
| 119 |
</target> |
|---|
| 120 |
|
|---|
| 121 |
<target name="build.public.caldav" if="org.bedework.install.public.caldav" > |
|---|
| 122 |
<!-- ======================= caldav - public ================= --> |
|---|
| 123 |
<ant antfile="${org.bedework.deployment.base}/publiccaldav/servlet/build.xml" |
|---|
| 124 |
inheritrefs="true" target="build.configured" /> |
|---|
| 125 |
</target> |
|---|
| 126 |
|
|---|
| 127 |
<target name="build.personal.caldav" if="org.bedework.install.personal.caldav" > |
|---|
| 128 |
<!-- ======================= caldav - user ================= --> |
|---|
| 129 |
<ant antfile="${org.bedework.deployment.base}/usercaldav/servlet/build.xml" |
|---|
| 130 |
inheritrefs="true" target="build.configured" /> |
|---|
| 131 |
</target> |
|---|
| 132 |
|
|---|
| 133 |
<!-- ================================================================= |
|---|
| 134 |
The deploy target. |
|---|
| 135 |
================================================================= --> |
|---|
| 136 |
|
|---|
| 137 |
<target name="deploy" depends="init" > |
|---|
| 138 |
<!-- Clean up before we start --> |
|---|
| 139 |
<delete dir="${org.bedework.temp.wars.home}" /> |
|---|
| 140 |
|
|---|
| 141 |
<!-- ======================= webconfig ================= --> |
|---|
| 142 |
<ant antfile="${org.bedework.deployment.base}/webconfig/webapp/build.xml" |
|---|
| 143 |
inheritrefs="true" target="deploy" /> |
|---|
| 144 |
|
|---|
| 145 |
<antcall target="webadmin.webapp" inheritrefs="true" /> |
|---|
| 146 |
|
|---|
| 147 |
<antcall target="webadmin.portal" inheritrefs="true" /> |
|---|
| 148 |
|
|---|
| 149 |
<antcall target="pubevents.webapp" inheritrefs="true" /> |
|---|
| 150 |
|
|---|
| 151 |
<antcall target="pubevents.portal" inheritrefs="true" /> |
|---|
| 152 |
|
|---|
| 153 |
<antcall target="personal.webapp" inheritrefs="true" /> |
|---|
| 154 |
|
|---|
| 155 |
<antcall target="personal.portal" inheritrefs="true" /> |
|---|
| 156 |
|
|---|
| 157 |
<antcall target="public.caldav" inheritrefs="true" /> |
|---|
| 158 |
|
|---|
| 159 |
<antcall target="personal.caldav" inheritrefs="true" /> |
|---|
| 160 |
|
|---|
| 161 |
<!-- copy an index file that sends you to the applications --> |
|---|
| 162 |
<copy file="${app.root.dir}/resources/html/cal.html" |
|---|
| 163 |
todir="${webapp.root.dir}"/> |
|---|
| 164 |
|
|---|
| 165 |
<!-- copy libs that the application server needs --> |
|---|
| 166 |
<antcall target="deploy.appserver.jdbcdriver" inheritrefs="true" /> |
|---|
| 167 |
<antcall target="deploy.appserver.javatools" inheritrefs="true" /> |
|---|
| 168 |
</target> |
|---|
| 169 |
|
|---|
| 170 |
<!-- ================================================================= |
|---|
| 171 |
Targets called by the deploy target. Each is conditional on a |
|---|
| 172 |
config property and each executes a build file in a subdirectory of |
|---|
| 173 |
this component. |
|---|
| 174 |
================================================================= --> |
|---|
| 175 |
|
|---|
| 176 |
<target name="webadmin.webapp" if="org.bedework.webadmin.build.standalone.app" > |
|---|
| 177 |
<!-- ======================= webadmin - standalone ================= --> |
|---|
| 178 |
<ant antfile="${org.bedework.deployment.base}/webadmin/webapp/build.xml" |
|---|
| 179 |
inheritrefs="true" target="deploy" /> |
|---|
| 180 |
</target> |
|---|
| 181 |
|
|---|
| 182 |
<target name="webadmin.portal" if="org.bedework.webadmin.portal.platform" > |
|---|
| 183 |
<!-- ======================= webadmin - portal ================= --> |
|---|
| 184 |
<ant antfile="${org.bedework.deployment.base}/webadmin/${admin.portal.platform}/build.xml" |
|---|
| 185 |
inheritrefs="true" target="deploy" /> |
|---|
| 186 |
</target> |
|---|
| 187 |
|
|---|
| 188 |
<target name="pubevents.webapp" if="org.bedework.webpubevents.build.standalone.app" > |
|---|
| 189 |
<!-- ======================= pubevents - standalone ================= --> |
|---|
| 190 |
<ant antfile="${org.bedework.deployment.base}/webpublic/webapp/build.xml" |
|---|
| 191 |
inheritrefs="true" target="deploy" /> |
|---|
| 192 |
</target> |
|---|
| 193 |
|
|---|
| 194 |
<target name="pubevents.portal" if="org.bedework.webpubevents.portal.platform" > |
|---|
| 195 |
<!-- ======================= pubevents - portal ================= --> |
|---|
| 196 |
<ant antfile="${org.bedework.deployment.base}/webpublic/${pubevents.portal.platform}/build.xml" |
|---|
| 197 |
inheritrefs="true" target="deploy" /> |
|---|
| 198 |
</target> |
|---|
| 199 |
|
|---|
| 200 |
<target name="personal.webapp" if="org.bedework.webpersonal.build.standalone.app" > |
|---|
| 201 |
<!-- ======================= pubevents - standalone ================= --> |
|---|
| 202 |
<ant antfile="${org.bedework.deployment.base}/webuser/webapp/build.xml" |
|---|
| 203 |
inheritrefs="true" target="deploy" /> |
|---|
| 204 |
</target> |
|---|
| 205 |
|
|---|
| 206 |
<target name="personal.portal" if="org.bedework.webpersonal.portal.platform" > |
|---|
| 207 |
<!-- ======================= pubevents - portal ================= --> |
|---|
| 208 |
<ant antfile="${org.bedework.deployment.base}/webuser/${personal.portal.platform}/build.xml" |
|---|
| 209 |
inheritrefs="true" target="deploy" /> |
|---|
| 210 |
</target> |
|---|
| 211 |
|
|---|
| 212 |
<target name="public.caldav" if="org.bedework.install.public.caldav" > |
|---|
| 213 |
<!-- ======================= caldav - public ================= --> |
|---|
| 214 |
<ant antfile="${org.bedework.deployment.base}/publiccaldav/servlet/build.xml" |
|---|
| 215 |
inheritrefs="true" target="deploy" /> |
|---|
| 216 |
</target> |
|---|
| 217 |
|
|---|
| 218 |
<target name="personal.caldav" if="org.bedework.install.personal.caldav" > |
|---|
| 219 |
<!-- ======================= caldav - user ================= --> |
|---|
| 220 |
<ant antfile="${org.bedework.deployment.base}/usercaldav/servlet/build.xml" |
|---|
| 221 |
inheritrefs="true" target="deploy" /> |
|---|
| 222 |
</target> |
|---|
| 223 |
|
|---|
| 224 |
<!-- The cp.xalan task conditionally copies the xalan.jar file, if |
|---|
| 225 |
necessary --> |
|---|
| 226 |
<target name="cp.xalan" if="xalan.in.tomcat.common.endorsed"> |
|---|
| 227 |
<copy file="${org.bedework.default.lib}/xalan.jar" |
|---|
| 228 |
todir="${appserver.endorsed.dir}"/> |
|---|
| 229 |
</target> |
|---|
| 230 |
|
|---|
| 231 |
<target name="deploy.appserver.jdbcdriver" |
|---|
| 232 |
if="appserver.jdbcdriver.jar" > |
|---|
| 233 |
<!-- copy jdbc jar so datasources work --> |
|---|
| 234 |
<copy todir="${appserver.lib.dir}" file="${appserver.jdbcdriver.jar}"/> |
|---|
| 235 |
</target> |
|---|
| 236 |
|
|---|
| 237 |
<target name="deploy.appserver.javatools" |
|---|
| 238 |
if="java.tools.jar" > |
|---|
| 239 |
<!-- copy tools jar so jsps work --> |
|---|
| 240 |
<copy todir="${appserver.lib.dir}" file="${java.tools.jar}"/> |
|---|
| 241 |
</target> |
|---|
| 242 |
</project> |
|---|