| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
|
|---|
| 3 |
<!-- =================================================================== |
|---|
| 4 |
This file is called by other build files to create web applications. |
|---|
| 5 |
|
|---|
| 6 |
It is assumed that no changes will be made to this file. It should be |
|---|
| 7 |
possible to make all changes needed by modifying the configuration |
|---|
| 8 |
properties or a bedework.build.proeprties file |
|---|
| 9 |
|
|---|
| 10 |
An unwrapped web application will be built in the temp directory |
|---|
| 11 |
and a war and ear file will be left in the dist directory. |
|---|
| 12 |
|
|---|
| 13 |
Properties which must be defined on entry, apart from those described |
|---|
| 14 |
in the main build file are: |
|---|
| 15 |
app.root.dir Location of the root directory for the apps |
|---|
| 16 |
app.sou.dir Location of the application skeleton, |
|---|
| 17 |
app.name Name of the application. This wil be used to determine |
|---|
| 18 |
the name of the file containing the rest of the |
|---|
| 19 |
application properties, the directory we build in |
|---|
| 20 |
and the name of war and ear files. |
|---|
| 21 |
cal.j2ee Defined if this is a j2ee application |
|---|
| 22 |
cal.j2ee.jboss Defined if this is a jboss application |
|---|
| 23 |
cal.strutsapp Defined if this is a struts application |
|---|
| 24 |
These should be defined in the build properties for the application. |
|---|
| 25 |
|
|---|
| 26 |
It is possible to define any of the app.dest properties below to override |
|---|
| 27 |
the location of destination files. |
|---|
| 28 |
|
|---|
| 29 |
In the directory |
|---|
| 30 |
${apps.sou.dir} |
|---|
| 31 |
we expect an application skeleton formatted like a web-application |
|---|
| 32 |
For the purposes of this build it should contain a |
|---|
| 33 |
structure like |
|---|
| 34 |
war - docs (contains jsp and html for this app) |
|---|
| 35 |
WEB-INF - struts-config.xml |
|---|
| 36 |
web.xml |
|---|
| 37 |
jboss-web.xml (for jboss only) |
|---|
| 38 |
|
|---|
| 39 |
Authors: Mike Douglass douglm@rpi.edu |
|---|
| 40 |
=================================================================== --> |
|---|
| 41 |
|
|---|
| 42 |
<project name="bedework.buildwar" default="build" > |
|---|
| 43 |
<target name="init" depends="init.common,init.uportal2,init.j2ee,init.standalone" /> |
|---|
| 44 |
|
|---|
| 45 |
<target name="init.common"> |
|---|
| 46 |
<!-- Load the location of the libraries --> |
|---|
| 47 |
<property file="${org.bedework.project.bedework}/build/libjars.properties" /> |
|---|
| 48 |
|
|---|
| 49 |
<!-- |
|---|
| 50 |
<condition property="org.bedework.build.for.jetspeed2"> |
|---|
| 51 |
<equals arg1="jetspeed2" arg2="${propval.app.portal.platform}"/> |
|---|
| 52 |
</condition> |
|---|
| 53 |
|
|---|
| 54 |
<condition property="org.bedework.build.for.uportal2"> |
|---|
| 55 |
<equals arg1="uportal2" arg2="${propval.app.portal.platform}"/> |
|---|
| 56 |
</condition> |
|---|
| 57 |
|
|---|
| 58 |
<condition property="org.bedework.build.for.jboss"> |
|---|
| 59 |
<equals arg1="jboss" arg2="${org.bedework.global.j2ee.platform}"/> |
|---|
| 60 |
</condition> |
|---|
| 61 |
--> |
|---|
| 62 |
|
|---|
| 63 |
<condition property="org.bedework.war.build.freebusy"> |
|---|
| 64 |
<equals arg1="yes" arg2="${org.bedework.build.freebusy}"/> |
|---|
| 65 |
</condition> |
|---|
| 66 |
|
|---|
| 67 |
<!-- Destinations - where we build an unwrapped war --> |
|---|
| 68 |
<property name="app.dest.war" |
|---|
| 69 |
location="${org.bedework.temp.wars.home}/${propval.app.war.name}.war" /> |
|---|
| 70 |
<property name="app.dest.docs" |
|---|
| 71 |
location="${app.dest.war}/docs" /> |
|---|
| 72 |
<property name="app.dest.webinf" |
|---|
| 73 |
location="${app.dest.war}/WEB-INF" /> |
|---|
| 74 |
<property name="app.dest.classes" |
|---|
| 75 |
location="${app.dest.webinf}/classes" /> |
|---|
| 76 |
<property name="app.dest.properties" |
|---|
| 77 |
location="${app.dest.classes}/properties/calendar" /> |
|---|
| 78 |
|
|---|
| 79 |
<!--temp web.xml location --> |
|---|
| 80 |
<property name="app.dest.web.xml" |
|---|
| 81 |
location="${app.dest.webinf}/web.xml" /> |
|---|
| 82 |
|
|---|
| 83 |
<property name="app.war.file" |
|---|
| 84 |
location="${dist.home}/${propval.app.war.name}.war" /> |
|---|
| 85 |
|
|---|
| 86 |
<!-- These may have been set already --> |
|---|
| 87 |
<property name="app.web.xml" |
|---|
| 88 |
value="${app.sou.dir}/war/WEB-INF/web.xml" /> |
|---|
| 89 |
<property name="app.sou.properties" |
|---|
| 90 |
location="${app.sou.dir}/war/WEB-INF/classes/servlet.properties" /> |
|---|
| 91 |
</target> |
|---|
| 92 |
|
|---|
| 93 |
<target name="init.uportal2" if="org.bedework.build.for.uportal2" > |
|---|
| 94 |
<property name="propval.app.servlet.class" |
|---|
| 95 |
value="org.apache.portals.bridges.struts.PortletServlet" /> |
|---|
| 96 |
|
|---|
| 97 |
<property name="propval.app.ignoreContentType" |
|---|
| 98 |
value="true" /> |
|---|
| 99 |
|
|---|
| 100 |
<property name="propval.app.genurl.taglib.tld" |
|---|
| 101 |
value="bedework-uportal2.tld" /> |
|---|
| 102 |
</target> |
|---|
| 103 |
|
|---|
| 104 |
<target name="init.standalone" if="org.bedework.global.build.standalone.app"> |
|---|
| 105 |
<property name="propval.app.servlet.class" |
|---|
| 106 |
value="org.apache.struts.action.ActionServlet" /> |
|---|
| 107 |
|
|---|
| 108 |
<property name="propval.app.ignoreContentType" |
|---|
| 109 |
value="false" /> |
|---|
| 110 |
|
|---|
| 111 |
<property name="propval.app.portlet.mapping" value="" /> |
|---|
| 112 |
|
|---|
| 113 |
<property name="propval.app.genurl.taglib.tld" |
|---|
| 114 |
value="struts-html.tld" /> |
|---|
| 115 |
|
|---|
| 116 |
<property name="app.dest.lib" |
|---|
| 117 |
location="${app.dest.webinf}/lib" /> |
|---|
| 118 |
</target> |
|---|
| 119 |
|
|---|
| 120 |
<target name="init.j2ee" if="org.bedework.global.j2ee.platform"> |
|---|
| 121 |
<property name="propval.app.servlet.class" |
|---|
| 122 |
value="org.apache.struts.action.ActionServlet" /> |
|---|
| 123 |
|
|---|
| 124 |
<property name="propval.app.ignoreContentType" |
|---|
| 125 |
value="false" /> |
|---|
| 126 |
|
|---|
| 127 |
<property name="propval.app.portlet.mapping" value="" /> |
|---|
| 128 |
|
|---|
| 129 |
<property name="propval.app.genurl.taglib.tld" |
|---|
| 130 |
value="struts-html.tld" /> |
|---|
| 131 |
|
|---|
| 132 |
<property name="app.dest.lib" |
|---|
| 133 |
location="${org.bedework.temp.dir}/earlib" /> |
|---|
| 134 |
</target> |
|---|
| 135 |
|
|---|
| 136 |
<target name="build" depends="init"> |
|---|
| 137 |
<delete dir="${app.dest.war}" /> |
|---|
| 138 |
|
|---|
| 139 |
<!-- Add modifed login pages --> |
|---|
| 140 |
<copy todir="${app.dest.docs}/login" failonerror="false" > |
|---|
| 141 |
<fileset dir="${app.root.dir}/resources/login" /> |
|---|
| 142 |
<filterset> |
|---|
| 143 |
<filter token="DISPLAY-NAME" value="${propval.app.display.name}"/> |
|---|
| 144 |
</filterset> |
|---|
| 145 |
</copy> |
|---|
| 146 |
|
|---|
| 147 |
<!-- =============================================================== |
|---|
| 148 |
We copy 3 sets of properties. |
|---|
| 149 |
|
|---|
| 150 |
First (for struts) are the servlet properties which ends up as |
|---|
| 151 |
classes/servlet.properties |
|---|
| 152 |
Next we copy in a set of generic property files and then with |
|---|
| 153 |
overwrite we copy in a set of base specific files. |
|---|
| 154 |
|
|---|
| 155 |
All are updated with new values. |
|---|
| 156 |
=============================================================== --> |
|---|
| 157 |
|
|---|
| 158 |
<filterset id="property.filters" > |
|---|
| 159 |
<filter token="BW-APP-NAME" |
|---|
| 160 |
value="${org.bedework.deploy.name}"/> |
|---|
| 161 |
|
|---|
| 162 |
<filter token="HIBERNATE-DIALECT" |
|---|
| 163 |
value="${org.bedework.global.hibernate.dialect}" /> |
|---|
| 164 |
|
|---|
| 165 |
<filter token="DIRECTORY-BROWSING-DISALLOWED" |
|---|
| 166 |
value="${org.bedework.global.directory.browsing.disallowed}" /> |
|---|
| 167 |
|
|---|
| 168 |
<filter token="IGNORE-CONTENT-TYPE" |
|---|
| 169 |
value="${propval.app.ignoreContentType}" /> |
|---|
| 170 |
|
|---|
| 171 |
<filter token="APP-DESCRIPTION" |
|---|
| 172 |
value="${propval.app.description}" /> |
|---|
| 173 |
|
|---|
| 174 |
<filter token="PORTAL-PLATFORM" |
|---|
| 175 |
value="${propval.app.portal.platform}"/> |
|---|
| 176 |
|
|---|
| 177 |
<filter token="PORTLET-NAME" |
|---|
| 178 |
value="${propval.app.portlet.name}"/> |
|---|
| 179 |
|
|---|
| 180 |
<filter token="CAL-SUITE" |
|---|
| 181 |
value="${propval.app.cal.suite}"/> |
|---|
| 182 |
|
|---|
| 183 |
<filter token="SERVLET-CLASS" |
|---|
| 184 |
value="${propval.app.servlet.class}"/> |
|---|
| 185 |
|
|---|
| 186 |
<filter token="GENURL-TAGLIB-TLD" |
|---|
| 187 |
value="${propval.app.genurl.taglib.tld}"/> |
|---|
| 188 |
|
|---|
| 189 |
<filter token="SECURITY-DOMAIN" |
|---|
| 190 |
value="${propval.app.security.domain}"/> |
|---|
| 191 |
<filter token="SECURITY-PREFIX" |
|---|
| 192 |
value="${propval.app.security.prefix}"/> |
|---|
| 193 |
<filter token="TRANSPORT-GUARANTEE" |
|---|
| 194 |
value="${propval.app.transport.guarantee}"/> |
|---|
| 195 |
|
|---|
| 196 |
<filter token="DISPLAY-NAME" |
|---|
| 197 |
value="${propval.app.display.name}"/> |
|---|
| 198 |
<filter token="CONTEXT-ROOT" |
|---|
| 199 |
value="${propval.app.context.root}" /> |
|---|
| 200 |
<filter token="APP-NAME" |
|---|
| 201 |
value="${propval.app.name}"/> |
|---|
| 202 |
<filter token="APP-VERSION" |
|---|
| 203 |
value="${propval.app.version}"/> |
|---|
| 204 |
|
|---|
| 205 |
<filter token="DEFAULT-CONTENTTYPE" |
|---|
| 206 |
value="${propval.app.default.contenttype}" /> |
|---|
| 207 |
<filter token="NOXSLT" |
|---|
| 208 |
value="${propval.app.noxslt}" /> |
|---|
| 209 |
<filter token="APPLICATION-ROOT" |
|---|
| 210 |
value="${propval.app.root}" /> |
|---|
| 211 |
|
|---|
| 212 |
<filter token="APP-GUESTMODE" |
|---|
| 213 |
value="${propval.app.guestmode}" /> |
|---|
| 214 |
|
|---|
| 215 |
<!-- Change this to be an app par --> |
|---|
| 216 |
<filter token="RUN-AS-USER" |
|---|
| 217 |
value="${org.bedework.syspar.public.user}" /> |
|---|
| 218 |
|
|---|
| 219 |
<!-- ??????? |
|---|
| 220 |
<filter token="CALFILE-NAME" |
|---|
| 221 |
value="${propval.app.calfile.name}" /> --> |
|---|
| 222 |
<filter token="ADMIN-URI" |
|---|
| 223 |
value="${org.bedework.global.public.admin.uri}" /> |
|---|
| 224 |
<filter token="PUBEVENTS-URI" |
|---|
| 225 |
value="${org.bedework.global.public.calendar.uri}" /> |
|---|
| 226 |
<filter token="PERSONAL-URI" |
|---|
| 227 |
value="${org.bedework.global.personal.calendar.uri}" /> |
|---|
| 228 |
</filterset> |
|---|
| 229 |
|
|---|
| 230 |
<available file="${app.sou.dir}/properties" type="dir" |
|---|
| 231 |
property="org.bedework.properties.dir.exists" /> |
|---|
| 232 |
|
|---|
| 233 |
<available file="${app.sou.properties}" type="file" |
|---|
| 234 |
property="org.bedework.servlet.properties.exists" /> |
|---|
| 235 |
|
|---|
| 236 |
<available file="${app.sou.dir}/war/docs" type="dir" |
|---|
| 237 |
property="org.bedework.war.docs.exists" /> |
|---|
| 238 |
|
|---|
| 239 |
<antcall target="copy.properties" inheritRefs="true" /> |
|---|
| 240 |
<antcall target="copy.servlet.properties" inheritRefs="true" /> |
|---|
| 241 |
<antcall target="copy.war.docs" inheritRefs="true" /> |
|---|
| 242 |
|
|---|
| 243 |
<!-- Create the env.properties file --> |
|---|
| 244 |
<mkdir dir="${app.dest.properties}" /> |
|---|
| 245 |
|
|---|
| 246 |
<copy tofile="${app.dest.properties}/env.properties" |
|---|
| 247 |
file="${org.bedework.config.properties}" /> |
|---|
| 248 |
|
|---|
| 249 |
<copy tofile="${app.dest.properties}/options.xml" |
|---|
| 250 |
file="${org.bedework.config.options}" > |
|---|
| 251 |
<filterset> |
|---|
| 252 |
<filter token="RPI-DEBUG" value="${app.debug.val}"/> |
|---|
| 253 |
</filterset> |
|---|
| 254 |
<filterset refid="property.filters" /> |
|---|
| 255 |
</copy> |
|---|
| 256 |
|
|---|
| 257 |
<!-- Make a modified copy of the web.xml file --> |
|---|
| 258 |
<copy tofile="${app.dest.web.xml}" |
|---|
| 259 |
file="${app.web.xml}" |
|---|
| 260 |
overwrite="yes" > |
|---|
| 261 |
<filterset> |
|---|
| 262 |
<filter token="RPI-DEBUG" value="${app.debug.val}"/> |
|---|
| 263 |
</filterset> |
|---|
| 264 |
<filterset refid="property.filters" /> |
|---|
| 265 |
</copy> |
|---|
| 266 |
|
|---|
| 267 |
<antcall target="struts-stuff" inheritRefs="true" /> |
|---|
| 268 |
|
|---|
| 269 |
<!-- =============================================================== |
|---|
| 270 |
Add hibernate jars and property files from calendar api. |
|---|
| 271 |
=============================================================== --> |
|---|
| 272 |
|
|---|
| 273 |
<copy todir="${app.dest.classes}"> |
|---|
| 274 |
<fileset dir="${org.bedework.project.calendarapi}/calCore/resources/properties" /> |
|---|
| 275 |
<filterset refid="property.filters" /> |
|---|
| 276 |
</copy> |
|---|
| 277 |
|
|---|
| 278 |
<copy todir="${app.dest.classes}"> |
|---|
| 279 |
<fileset dir="${org.bedework.project.calendarapi}/calCore/resources/hbms" /> |
|---|
| 280 |
<filterset refid="property.filters" /> |
|---|
| 281 |
</copy> |
|---|
| 282 |
|
|---|
| 283 |
<copy todir="${app.dest.lib}"> |
|---|
| 284 |
<fileset dir="${hibernate.jars.dir}"> |
|---|
| 285 |
<include name="*.jar"/> |
|---|
| 286 |
</fileset> |
|---|
| 287 |
</copy> |
|---|
| 288 |
|
|---|
| 289 |
<antcall target="jboss-stuff" inheritRefs="true" /> |
|---|
| 290 |
<antcall target="bexchange-stuff" inheritRefs="true" /> |
|---|
| 291 |
<antcall target="domino-stuff" inheritRefs="true" /> |
|---|
| 292 |
<antcall target="google-stuff" inheritRefs="true" /> |
|---|
| 293 |
|
|---|
| 294 |
<!-- =============================================================== |
|---|
| 295 |
Any jar files required |
|---|
| 296 |
=============================================================== --> |
|---|
| 297 |
|
|---|
| 298 |
<copy todir="${app.dest.lib}" overwrite="yes"> |
|---|
| 299 |
<fileset dir="${bin.home}"> |
|---|
| 300 |
<!-- jars from sub-projects needed by all --> |
|---|
| 301 |
<include name="rpiaccess*.jar"/> |
|---|
| 302 |
<include name="rpiutil*.jar"/> |
|---|
| 303 |
<include name="bw-davdefs*.jar"/> |
|---|
| 304 |
<include name="bw-davio*.jar"/> |
|---|
| 305 |
|
|---|
| 306 |
<!-- Calendar api jars --> |
|---|
| 307 |
<include name="bw-calcore*.jar"/> |
|---|
| 308 |
<include name="bw-calcorei*.jar"/> |
|---|
| 309 |
<include name="bw-calenv*.jar"/> |
|---|
| 310 |
<include name="bw-calfacade*.jar"/> |
|---|
| 311 |
<include name="bw-calsvc*.jar"/> |
|---|
| 312 |
<include name="bw-calsvci*.jar"/> |
|---|
| 313 |
<include name="bw-icalendar*.jar"/> |
|---|
| 314 |
<include name="bw-locale*.jar"/> |
|---|
| 315 |
<include name="bw-logging*.jar"/> |
|---|
| 316 |
|
|---|
| 317 |
<!-- Common jars for web apps --> |
|---|
| 318 |
<include name="bw-appcommon*.jar"/> |
|---|
| 319 |
</fileset> |
|---|
| 320 |
</copy> |
|---|
| 321 |
|
|---|
| 322 |
<!-- any extra bin files--> |
|---|
| 323 |
<copy todir="${app.dest.lib}" > |
|---|
| 324 |
<fileset refid="app.bin.files" /> |
|---|
| 325 |
</copy> |
|---|
| 326 |
|
|---|
| 327 |
<!-- Some more standard libs --> |
|---|
| 328 |
<copy todir="${app.dest.lib}" file="${log4j.jar}"/> |
|---|
| 329 |
<copy todir="${app.dest.lib}" file="${ical4j.jar}"/> |
|---|
| 330 |
<copy todir="${app.dest.lib}" file="${commons-codec.jar}"/> |
|---|
| 331 |
<copy todir="${app.dest.lib}" file="${commons-collections.jar}"/> |
|---|
| 332 |
<copy todir="${app.dest.lib}" file="${commons-lang.jar}"/> |
|---|
| 333 |
<copy todir="${app.dest.lib}" file="${commons-ssl.jar}"/> |
|---|
| 334 |
|
|---|
| 335 |
|
|---|
| 336 |
<!-- add the jdbcdriver if defined --> |
|---|
| 337 |
<antcall target="add.jdbcdriver" inheritRefs="true" /> |
|---|
| 338 |
|
|---|
| 339 |
<!-- free busy --> |
|---|
| 340 |
<antcall target="add.freebusy" inheritRefs="true" /> |
|---|
| 341 |
|
|---|
| 342 |
<!-- any extra lib files--> |
|---|
| 343 |
<copy todir="${app.dest.lib}" > |
|---|
| 344 |
<fileset refid="app.lib.files" /> |
|---|
| 345 |
<!-- <fileset refid="app.temp.lib.files" /> --> |
|---|
| 346 |
</copy> |
|---|
| 347 |
|
|---|
| 348 |
<!-- build the war file --> |
|---|
| 349 |
<mkdir dir="${dist.home}" /> |
|---|
| 350 |
<delete file="${app.war.file}" /> |
|---|
| 351 |
|
|---|
| 352 |
<war warfile="${app.war.file}" |
|---|
| 353 |
webxml="${app.dest.web.xml}" |
|---|
| 354 |
basedir="${app.dest.war}" |
|---|
| 355 |
excludes="${app.dest.web.xml}" /> |
|---|
| 356 |
|
|---|
| 357 |
<!-- build the ear file for a j2ee app |
|---|
| 358 |
<antcall target="build.ear" inheritRefs="true" /> |
|---|
| 359 |
--> |
|---|
| 360 |
</target> |
|---|
| 361 |
|
|---|
| 362 |
<target name="add.freebusy" if="org.bedework.war.build.freebusy"> |
|---|
| 363 |
<copy todir="${app.dest.lib}" file="${org.bedework.fbclient.jar}" /> |
|---|
| 364 |
<copy todir="${app.dest.lib}" file="${org.bedework.fbaggregator.jar}" /> |
|---|
| 365 |
</target> |
|---|
| 366 |
|
|---|
| 367 |
<target name="add.jdbcdriver" if="app.jdbcdriver.jar"> |
|---|
| 368 |
<copy todir="${app.dest.lib}" file="${app.jdbcdriver.jar}"/> |
|---|
| 369 |
</target> |
|---|
| 370 |
|
|---|
| 371 |
<target name="copy.properties" if="org.bedework.properties.dir.exists"> |
|---|
| 372 |
<!-- =============================================================== |
|---|
| 373 |
Any property files we need for configuration, other than the |
|---|
| 374 |
standard struts file, should be in the "${app.sou.dir}/properties |
|---|
| 375 |
directory. They will be copied into the appropriate place for the |
|---|
| 376 |
war and transformed by the above filter. |
|---|
| 377 |
=============================================================== --> |
|---|
| 378 |
<copy todir="${app.dest.properties}" overwrite="yes" > |
|---|
| 379 |
<fileset dir="${app.sou.dir}/properties" |
|---|
| 380 |
includes="*.properties"/> |
|---|
| 381 |
<filterset refid="property.filters" /> |
|---|
| 382 |
</copy> |
|---|
| 383 |
</target> |
|---|
| 384 |
|
|---|
| 385 |
<target name="copy.servlet.properties" if="org.bedework.servlet.properties.exists"> |
|---|
| 386 |
<copy tofile="${app.dest.classes}/servlet.properties" file="${app.sou.properties}"> |
|---|
| 387 |
<filterset refid="property.filters" /> |
|---|
| 388 |
</copy> |
|---|
| 389 |
</target> |
|---|
| 390 |
|
|---|
| 391 |
<target name="copy.war.docs" if="org.bedework.war.docs.exists"> |
|---|
| 392 |
<copy todir="${app.dest.docs}"> |
|---|
| 393 |
<fileset dir="${app.sou.dir}/war/docs" /> |
|---|
| 394 |
</copy> |
|---|
| 395 |
</target> |
|---|
| 396 |
|
|---|
| 397 |
<target name="bexchange-stuff" if="org.bedework.build.caldav.bexchange"> |
|---|
| 398 |
<copy tofile="${app.dest.properties}/timezones.xml" |
|---|
| 399 |
file="${org.bedework.resources.base}/bwtimezones.xml" /> |
|---|
| 400 |
</target> |
|---|
| 401 |
|
|---|
| 402 |
<target name="domino-stuff" if="org.bedework.build.caldav.domino"> |
|---|
| 403 |
<copy tofile="${app.dest.properties}/timezones.xml" |
|---|
| 404 |
file="${org.bedework.resources.base}/bwtimezones.xml" /> |
|---|
| 405 |
</target> |
|---|
| 406 |
|
|---|
| 407 |
<target name="google-stuff" if="org.bedework.build.caldav.google"> |
|---|
| 408 |
<copy todir="${app.dest.lib}"> |
|---|
| 409 |
<fileset dir="${google.dir}"> |
|---|
| 410 |
<include name="*.jar"/> |
|---|
| 411 |
</fileset> |
|---|
| 412 |
</copy> |
|---|
| 413 |
|
|---|
| 414 |
<copy tofile="${app.dest.properties}/timezones.xml" |
|---|
| 415 |
file="${org.bedework.resources.base}/bwtimezones.xml" /> |
|---|
| 416 |
</target> |
|---|
| 417 |
|
|---|
| 418 |
<!-- ================================================================= |
|---|
| 419 |
If this is a struts app the following gets executed. |
|---|
| 420 |
We create an updated struts-config.xml file and add some jars. |
|---|
| 421 |
================================================================= --> |
|---|
| 422 |
|
|---|
| 423 |
<target name="struts-stuff" if="org.bedework.strutsapp"> |
|---|
| 424 |
<!-- Copy a dummy startup file into the war. --> |
|---|
| 425 |
<copy todir="${app.dest.war}"> |
|---|
| 426 |
<fileset dir="${app.sou.dir}/war/" includes="setup.do" /> |
|---|
| 427 |
</copy> |
|---|
| 428 |
|
|---|
| 429 |
<copy todir="${app.dest.webinf}" |
|---|
| 430 |
file="${app.sou.dir}/war/WEB-INF/struts-config.xml"/> |
|---|
| 431 |
|
|---|
| 432 |
<mkdir dir="${app.dest.webinf}/tlds"/> |
|---|
| 433 |
<copy todir="${app.dest.webinf}/tlds" > |
|---|
| 434 |
<fileset dir="${struts.tlds.dir}"> |
|---|
| 435 |
<include name="*"/> |
|---|
| 436 |
</fileset> |
|---|
| 437 |
</copy> |
|---|
| 438 |
<copy todir="${app.dest.webinf}/tlds" > |
|---|
| 439 |
<fileset dir="${org.bedework.default.lib}/tlds"> |
|---|
| 440 |
<include name="*"/> |
|---|
| 441 |
</fileset> |
|---|
| 442 |
</copy> |
|---|
| 443 |
|
|---|
| 444 |
<antcall target="add.xalan" inheritRefs="true" /> |
|---|
| 445 |
<antcall target="add.jetspeed2" inheritRefs="true" /> |
|---|
| 446 |
<antcall target="add.uportal2" inheritRefs="true" /> |
|---|
| 447 |
|
|---|
| 448 |
<copy todir="${app.dest.lib}"> |
|---|
| 449 |
<fileset dir="${struts.dir}"> |
|---|
| 450 |
<include name="*.jar"/> |
|---|
| 451 |
</fileset> |
|---|
| 452 |
</copy> |
|---|
| 453 |
|
|---|
| 454 |
<copy todir="${app.dest.lib}" file="${antlr.jar}"/> |
|---|
| 455 |
<copy todir="${app.dest.lib}" file="${commons-beanutils.jar}"/> |
|---|
| 456 |
<copy todir="${app.dest.lib}" file="${digester.jar}"/> |
|---|
| 457 |
<copy todir="${app.dest.lib}" file="${commons-fileupload.jar}"/> |
|---|
| 458 |
<copy todir="${app.dest.lib}" file="${commons-logging.jar}"/> |
|---|
| 459 |
<copy todir="${app.dest.lib}" file="${commons-validator.jar}"/> |
|---|
| 460 |
<copy todir="${app.dest.lib}" file="${jakarta-oro.jar}"/> |
|---|
| 461 |
</target> |
|---|
| 462 |
|
|---|
| 463 |
<target name="add.jetspeed2" if="org.bedework.build.for.jetspeed2" > |
|---|
| 464 |
<copy todir="${app.dest.webinf}" |
|---|
| 465 |
file="${org.bedework.deploy.type.dir}/jetspeed2/${propval.app.war.name}/portlet.xml" |
|---|
| 466 |
overwrite="yes" |
|---|
| 467 |
failonerror="no" /> |
|---|
| 468 |
<copy todir="${app.dest.webinf}" |
|---|
| 469 |
file="${org.bedework.deploy.type.dir}/jetspeed2/struts-portlet-config.xml" |
|---|
| 470 |
overwrite="yes" |
|---|
| 471 |
failonerror="no" /> |
|---|
| 472 |
|
|---|
| 473 |
<copy todir="${app.dest.lib}" > |
|---|
| 474 |
<fileset dir="${org.bedework.default.lib}/${jetspeed2.jars.dir}/portals-bridges-struts"> |
|---|
| 475 |
<include name="*.jar"/> |
|---|
| 476 |
</fileset> |
|---|
| 477 |
</copy> |
|---|
| 478 |
|
|---|
| 479 |
<copy todir="${app.dest.webinf}/tlds" > |
|---|
| 480 |
<fileset dir="${org.bedework.default.lib}/${jetspeed2.jars.dir}/portals-bridges-struts"> |
|---|
| 481 |
<include name="*.tld"/> |
|---|
| 482 |
</fileset> |
|---|
| 483 |
</copy> |
|---|
| 484 |
|
|---|
| 485 |
<!-- Add the portal bridge controller def --> |
|---|
| 486 |
<replace file="${app.dest.webinf}/struts-config.xml"> |
|---|
| 487 |
<replacetoken><![CDATA[<!-- Jetspeed2 controller def here -->]]></replacetoken> |
|---|
| 488 |
<replacevalue><![CDATA[<controller pagePattern="$M$P" inputForward="true" |
|---|
| 489 |
processorClass="org.apache.portals.bridges.struts.PortletRequestProcessor"/>]]> |
|---|
| 490 |
</replacevalue> |
|---|
| 491 |
</replace> |
|---|
| 492 |
</target> |
|---|
| 493 |
|
|---|
| 494 |
<target name="add.uportal2" if="org.bedework.build.for.uportal2" > |
|---|
| 495 |
<copy todir="${app.dest.webinf}" |
|---|
| 496 |
file="${org.bedework.deploy.type.dir}/uportal2/portlet.xml" |
|---|
| 497 |
overwrite="yes" |
|---|
| 498 |
failonerror="no" > |
|---|
| 499 |
<filterset refid="property.filters" /> |
|---|
| 500 |
</copy> |
|---|
| 501 |
|
|---|
| 502 |
<copy todir="${app.dest.webinf}" |
|---|
| 503 |
file="${org.bedework.deploy.type.dir}/uportal2/struts-portlet-config.xml" |
|---|
| 504 |
overwrite="yes" |
|---|
| 505 |
failonerror="no" /> |
|---|
| 506 |
|
|---|
| 507 |
<copy todir="${app.dest.lib}" > |
|---|
| 508 |
<fileset dir="${portals-bridges.jars.dir}"> |
|---|
| 509 |
<include name="*.jar"/> |
|---|
| 510 |
</fileset> |
|---|
| 511 |
<fileset dir="${bin.home}"> |
|---|
| 512 |
<include name="bw-uportal*.jar"/> |
|---|
| 513 |
</fileset> |
|---|
| 514 |
</copy> |
|---|
| 515 |
|
|---|
| 516 |
<copy todir="${app.dest.webinf}/tlds" |
|---|
| 517 |
overwrite="yes" |
|---|
| 518 |
failonerror="no" > |
|---|
| 519 |
<fileset dir="${org.bedework.deploy.type.dir}/uportal2" > |
|---|
| 520 |
<include name="*.tld"/> |
|---|
| 521 |
</fileset> |
|---|
| 522 |
</copy> |
|---|
| 523 |
|
|---|
| 524 |
<copy todir="${app.dest.lib}" file="${org.bedework.uportal.jar}" /> |
|---|
| 525 |
|
|---|
| 526 |
<!-- Add the portlet servlet mapping --> |
|---|
| 527 |
<replace file="${app.dest.webinf}/web.xml"> |
|---|
| 528 |
<replacetoken><![CDATA[<!-- uPortal2 portlet servlet mapping here -->]]></replacetoken> |
|---|
| 529 |
<replacevalue><![CDATA[<servlet-mapping> |
|---|
| 530 |
<servlet-name>@PORTLET-NAME@</servlet-name> |
|---|
| 531 |
<url-pattern>/@PORTLET-NAME@/*</url-pattern> |
|---|
| 532 |
</servlet-mapping>]]> |
|---|
| 533 |
</replacevalue> |
|---|
| 534 |
</replace> |
|---|
| 535 |
|
|---|
| 536 |
<replace file="${app.dest.webinf}/web.xml"> |
|---|
| 537 |
<replacefilter token="@PORTLET-NAME@" value="${propval.app.portlet.name}"/> |
|---|
| 538 |
</replace> |
|---|
| 539 |
|
|---|
| 540 |
<!-- Add the portal bridge controller def --> |
|---|
| 541 |
<replace file="${app.dest.webinf}/struts-config.xml"> |
|---|
| 542 |
<replacetoken><![CDATA[<!-- Jetspeed2 controller def here -->]]></replacetoken> |
|---|
| 543 |
<replacevalue><![CDATA[<controller pagePattern="$M$P" inputForward="true" |
|---|
| 544 |
processorClass="org.apache.portals.bridges.struts.PortletRequestProcessor"/>]]> |
|---|
| 545 |
</replacevalue> |
|---|
| 546 |
</replace> |
|---|
| 547 |
</target> |
|---|
| 548 |
|
|---|
| 549 |
<target name="add.xalan" unless="xalan.in.tomcat.common.endorsed" > |
|---|
| 550 |
<copy todir="${app.dest.lib}" file="${xalan.jar}"/> |
|---|
| 551 |
</target> |
|---|
| 552 |
|
|---|
| 553 |
<!-- ================================================================= |
|---|
| 554 |
If this is a j2ee app the following gets executed. |
|---|
| 555 |
We create an uodated jboss-web.xml file (for jboss) and a ear |
|---|
| 556 |
================================================================= --> |
|---|
| 557 |
|
|---|
| 558 |
<target name="jboss-stuff" if="org.bedework.build.for.jboss"> |
|---|
| 559 |
<copy todir="${app.dest.webinf}" |
|---|
| 560 |
file="${app.sou.dir}/war/WEB-INF/jboss-web.xml"> |
|---|
| 561 |
<filterset refid="property.filters" /> |
|---|
| 562 |
</copy> |
|---|
| 563 |
<antcall target="jboss-virtual-host" inheritRefs="true" /> |
|---|
| 564 |
</target> |
|---|
| 565 |
|
|---|
| 566 |
<target name="jboss-virtual-host" if="org.bedework.global.virtual.host"> |
|---|
| 567 |
<replace file="${app.dest.webinf}/jboss-web.xml"> |
|---|
| 568 |
<replacetoken><![CDATA[<!-- Virtual host -->]]></replacetoken> |
|---|
| 569 |
<replacevalue><![CDATA[<virtual-host>@VIRTUAL-HOST@</virtual-host> |
|---|
| 570 |
]]> |
|---|
| 571 |
</replacevalue> |
|---|
| 572 |
</replace> |
|---|
| 573 |
<replace file="${app.dest.webinf}/jboss-web.xml"> |
|---|
| 574 |
<replacefilter token="@VIRTUAL-HOST@" value="${org.bedework.global.virtual.host}"/> |
|---|
| 575 |
</replace> |
|---|
| 576 |
</target> |
|---|
| 577 |
|
|---|
| 578 |
<target name="build.ear" if="cal.j2ee"> |
|---|
| 579 |
<ant antfile="${buildear}" |
|---|
| 580 |
inheritRefs="true" target="build" /> |
|---|
| 581 |
</target> |
|---|
| 582 |
</project> |
|---|