| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
|
|---|
| 3 |
<!-- =================================================================== |
|---|
| 4 |
Default public events web application deployer |
|---|
| 5 |
=================================================================== --> |
|---|
| 6 |
|
|---|
| 7 |
<project name="bwpublic.deploy" default="deploy" > |
|---|
| 8 |
<target name="init"> |
|---|
| 9 |
<!-- and define some properties based on those --> |
|---|
| 10 |
<property name="app.war.file" |
|---|
| 11 |
location="${dist.home}/${propval.app.war.name}.war" /> |
|---|
| 12 |
|
|---|
| 13 |
<dirname property="this.dir" file="${ant.file}"/> |
|---|
| 14 |
|
|---|
| 15 |
<property name="app.sou.dir" location="${org.bedework.webclient.base}" /> |
|---|
| 16 |
|
|---|
| 17 |
<!-- Flag as struts --> |
|---|
| 18 |
<property name="org.bedework.strutsapp" value="true" /> |
|---|
| 19 |
|
|---|
| 20 |
<!-- Properties that differ from the personal client --> |
|---|
| 21 |
<property name="app.web.xml" |
|---|
| 22 |
value="${app.sou.dir}/war/WEB-INF/publicweb.xml" /> |
|---|
| 23 |
|
|---|
| 24 |
<!-- This should be in the config stuff --> |
|---|
| 25 |
<property name="propval.directory.browsing.disallowed" |
|---|
| 26 |
value="${app.directory.browsing.disallowed}" /> |
|---|
| 27 |
|
|---|
| 28 |
<property name="propval.app.guestmode" value="true" /> |
|---|
| 29 |
|
|---|
| 30 |
<property name="app.resources.dir" |
|---|
| 31 |
location="${this.dir}/resources" /> |
|---|
| 32 |
</target> |
|---|
| 33 |
|
|---|
| 34 |
<!-- ================================================================= |
|---|
| 35 |
The "deploy" target first builds a configured component then copies |
|---|
| 36 |
all required files to the appropriate servlet container directories. |
|---|
| 37 |
|
|---|
| 38 |
Currently this only works for the quickstart distribution. |
|---|
| 39 |
For example, it does not handle deploying into jboss and copying |
|---|
| 40 |
resource files (images, stylesheets) to external locations. |
|---|
| 41 |
================================================================= --> |
|---|
| 42 |
|
|---|
| 43 |
<target name="deploy" depends="init,build.configured" > |
|---|
| 44 |
<!-- First copy the resources into the server --> |
|---|
| 45 |
<echo message="###################${app.resources.dir}/${propval.app.skinset.name}" /> |
|---|
| 46 |
<delete dir="${org.bedework.appserver.dir}/${propval.app.resources.dir}" /> |
|---|
| 47 |
<copy todir="${org.bedework.appserver.dir}/${propval.app.resources.dir}"> |
|---|
| 48 |
<fileset dir="${app.resources.dir}/${propval.app.skinset.name}" /> |
|---|
| 49 |
</copy> |
|---|
| 50 |
|
|---|
| 51 |
<echo message="***************************************************************" /> |
|---|
| 52 |
<echo message="Deploying standalone app ${app.war.file} into ${org.bedework.appserver.dir}/${propval.app.deploy.dir}" /> |
|---|
| 53 |
<echo message="***************************************************************" /> |
|---|
| 54 |
|
|---|
| 55 |
<!-- copy the war file. --> |
|---|
| 56 |
<copy todir="${org.bedework.appserver.dir}/${propval.app.deploy.dir}" file="${app.war.file}" |
|---|
| 57 |
overwrite="yes" /> |
|---|
| 58 |
|
|---|
| 59 |
<!-- Delete expanded version --> |
|---|
| 60 |
<delete dir="${org.bedework.appserver.dir}/${propval.app.deploy.dir}/${propval.app.context.root}" /> |
|---|
| 61 |
</target> |
|---|
| 62 |
|
|---|
| 63 |
<target name="build.configured" depends="init" > |
|---|
| 64 |
<!-- =============================================================== |
|---|
| 65 |
Libraries for this application |
|---|
| 66 |
=============================================================== --> |
|---|
| 67 |
|
|---|
| 68 |
<!-- from the lib directory --> |
|---|
| 69 |
<fileset id="app.lib.files" dir="${org.bedework.empty.dir}" > |
|---|
| 70 |
</fileset> |
|---|
| 71 |
|
|---|
| 72 |
<!-- from the temp jars directory --> |
|---|
| 73 |
<fileset id="app.temp.lib.files" dir="${org.bedework.temp.jars}" > |
|---|
| 74 |
<include name="${org.bedework.webclient.jar.name}" /> |
|---|
| 75 |
</fileset> |
|---|
| 76 |
|
|---|
| 77 |
<!-- =============================================================== |
|---|
| 78 |
Build the war |
|---|
| 79 |
=============================================================== --> |
|---|
| 80 |
|
|---|
| 81 |
<ant antfile="${buildwar}" inheritRefs="true" target="build" /> |
|---|
| 82 |
</target> |
|---|
| 83 |
</project> |
|---|
| 84 |
|
|---|