| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
|
|---|
| 3 |
<!-- =================================================================== |
|---|
| 4 |
Default admin web application deployer |
|---|
| 5 |
=================================================================== --> |
|---|
| 6 |
|
|---|
| 7 |
<project name="bwadmin.deploy" default="deploy" > |
|---|
| 8 |
<import file="${org.bedework.deployment.base}/deployprops.xml" /> |
|---|
| 9 |
|
|---|
| 10 |
<target name="init"> |
|---|
| 11 |
<!-- and define some properties based on those --> |
|---|
| 12 |
<property name="app.war.file" |
|---|
| 13 |
location="${dist.home}/${propval.app.war.name}.war" /> |
|---|
| 14 |
|
|---|
| 15 |
<dirname property="this.dir" file="${ant.file}"/> |
|---|
| 16 |
|
|---|
| 17 |
<property name="app.sou.dir" location="${org.bedework.deploy.app.sou}" /> |
|---|
| 18 |
|
|---|
| 19 |
<property name="org.bedework.use.dojo" value="true" /> |
|---|
| 20 |
|
|---|
| 21 |
<!-- Flag as struts --> |
|---|
| 22 |
<property name="org.bedework.strutsapp" value="true" /> |
|---|
| 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="app.resources.dir" |
|---|
| 29 |
location="${this.dir}/resources" /> |
|---|
| 30 |
</target> |
|---|
| 31 |
|
|---|
| 32 |
<!-- ================================================================= |
|---|
| 33 |
The "deploy" target first builds a configured component then copies |
|---|
| 34 |
all required files to the appropriate servlet container directories. |
|---|
| 35 |
|
|---|
| 36 |
Currently this only works for the quickstart distribution. |
|---|
| 37 |
For example, it does not handle deploying into jboss and copying |
|---|
| 38 |
resource files (images, stylesheets) to external locations. |
|---|
| 39 |
================================================================= --> |
|---|
| 40 |
|
|---|
| 41 |
<target name="deploy" depends="init,build.configured" > |
|---|
| 42 |
<delete dir="${org.bedework.appserver.dir}/${propval.app.resources.dir}" /> |
|---|
| 43 |
<copy todir="${org.bedework.appserver.dir}/${propval.app.resources.dir}"> |
|---|
| 44 |
<fileset dir="${app.resources.dir}" /> |
|---|
| 45 |
</copy> |
|---|
| 46 |
|
|---|
| 47 |
<!-- Deploy common resources --> |
|---|
| 48 |
<ant antfile="${org.bedework.common.resources}/build.xml" |
|---|
| 49 |
inheritrefs="true" target="deploy" > |
|---|
| 50 |
<property name="app.common.resources.dest.dir" |
|---|
| 51 |
location="${org.bedework.appserver.dir}/${propval.app.resources.dir}/resources" /> |
|---|
| 52 |
</ant> |
|---|
| 53 |
|
|---|
| 54 |
<echo message="***************************************************************" /> |
|---|
| 55 |
<echo message="Deploying standalone app ${app.war.file} into ${org.bedework.appserver.dir}/${propval.app.deploy.dir}" /> |
|---|
| 56 |
<echo message="***************************************************************" /> |
|---|
| 57 |
|
|---|
| 58 |
<!-- copy the war file. --> |
|---|
| 59 |
<copy todir="${org.bedework.appserver.dir}/${propval.app.deploy.dir}" file="${app.war.file}" |
|---|
| 60 |
overwrite="yes" /> |
|---|
| 61 |
|
|---|
| 62 |
<!-- Delete expanded version --> |
|---|
| 63 |
<delete dir="${org.bedework.appserver.dir}/${propval.app.deploy.dir}/${propval.app.war.name}" /> |
|---|
| 64 |
|
|---|
| 65 |
<!-- Delete the quickstart context def --> |
|---|
| 66 |
<delete file="${org.bedework.appserver.dir}/conf/Catalina/localhost/${propval.app.war.name}.xml" /> |
|---|
| 67 |
|
|---|
| 68 |
<if> |
|---|
| 69 |
<isset property="org.bedework.global.portal.platform" /> |
|---|
| 70 |
<then> |
|---|
| 71 |
<ant antfile="${org.bedework.deploy.type.dir}/${org.bedework.global.portal.platform}/build.xml" |
|---|
| 72 |
inheritrefs="true" target="deploy" /> |
|---|
| 73 |
</then> |
|---|
| 74 |
</if> |
|---|
| 75 |
</target> |
|---|
| 76 |
|
|---|
| 77 |
<target name="build.configured" depends="init" > |
|---|
| 78 |
<!-- =============================================================== |
|---|
| 79 |
Libraries for this application |
|---|
| 80 |
=============================================================== --> |
|---|
| 81 |
|
|---|
| 82 |
<!-- from the lib directory --> |
|---|
| 83 |
<fileset id="app.lib.files" dir="${org.bedework.empty.dir}" > |
|---|
| 84 |
</fileset> |
|---|
| 85 |
|
|---|
| 86 |
<!-- from the bin directory --> |
|---|
| 87 |
<fileset id="app.bin.files" dir="${bin.home}" > |
|---|
| 88 |
<include name="bw-webcommon*.jar" /> |
|---|
| 89 |
<include name="bw-webadmin*.jar" /> |
|---|
| 90 |
</fileset> |
|---|
| 91 |
|
|---|
| 92 |
<!-- from the temp jars directory --> |
|---|
| 93 |
<fileset id="app.temp.lib.files" dir="${org.bedework.temp.jars}" > |
|---|
| 94 |
<include name="${org.bedework.webadmin.jar.name}" /> |
|---|
| 95 |
</fileset> |
|---|
| 96 |
|
|---|
| 97 |
<!-- =============================================================== |
|---|
| 98 |
Build the war |
|---|
| 99 |
=============================================================== --> |
|---|
| 100 |
|
|---|
| 101 |
<ant antfile="${buildwar}" inheritRefs="true" target="build" /> |
|---|
| 102 |
</target> |
|---|
| 103 |
</project> |
|---|