| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
|
|---|
| 3 |
<!-- =================================================================== |
|---|
| 4 |
Standalone apps terminations tasks. |
|---|
| 5 |
=================================================================== --> |
|---|
| 6 |
|
|---|
| 7 |
<project name="bwdeploy.termination" default="deploy" > |
|---|
| 8 |
<import file="${org.bedework.deployment.base}/deployprops.xml" /> |
|---|
| 9 |
|
|---|
| 10 |
<target name="init"> |
|---|
| 11 |
<dirname property="this.dir" file="${ant.file}"/> |
|---|
| 12 |
|
|---|
| 13 |
<property name="app.ear.file.name" |
|---|
| 14 |
value="${org.bedework.global.ear.name}.ear" /> |
|---|
| 15 |
<property name="app.ear.file" |
|---|
| 16 |
location="${dist.home}/${app.ear.file.name}" /> |
|---|
| 17 |
</target> |
|---|
| 18 |
|
|---|
| 19 |
<target name="deploy" depends="init,build.configured" > |
|---|
| 20 |
<!-- Deploy common resources --> |
|---|
| 21 |
<ant antfile="${org.bedework.common.resources}/build.xml" |
|---|
| 22 |
inheritrefs="true" target="deploy" /> |
|---|
| 23 |
|
|---|
| 24 |
<if> |
|---|
| 25 |
<isset property="org.bedework.global.build.ear" /> |
|---|
| 26 |
<then> |
|---|
| 27 |
<echo message="***************************************************************" /> |
|---|
| 28 |
<echo message="Building ear file for jboss deployment" /> |
|---|
| 29 |
<echo message="***************************************************************" /> |
|---|
| 30 |
|
|---|
| 31 |
<jar jarfile="${org.bedework.ear.properties.jar}"> |
|---|
| 32 |
<fileset dir="${org.bedework.ear.properties.dir}"/> |
|---|
| 33 |
</jar> |
|---|
| 34 |
|
|---|
| 35 |
<path id="app.xml.cp"> |
|---|
| 36 |
<pathelement location="${org.bedework.deployutil.jar}"/> |
|---|
| 37 |
</path> |
|---|
| 38 |
|
|---|
| 39 |
<taskdef name="applicationXml" |
|---|
| 40 |
classname="org.bedework.deployment.ApplicationXmlTask"> |
|---|
| 41 |
<classpath refid="app.xml.cp"/> |
|---|
| 42 |
</taskdef> |
|---|
| 43 |
|
|---|
| 44 |
<!-- We have to drop some of the libraries so they don't conflict --> |
|---|
| 45 |
<copy toDir="${ear.dir}"> |
|---|
| 46 |
<fileset dir="${org.bedework.temp.dir}/earlib" |
|---|
| 47 |
excludes="${org.bedework.global.ear.lib.excludes}" /> |
|---|
| 48 |
</copy> |
|---|
| 49 |
|
|---|
| 50 |
<applicationXml displayName="Bedework calendar suite" |
|---|
| 51 |
outFile="${ear.dir}/META-INF/application.xml" |
|---|
| 52 |
warDir="${org.bedework.temp.dir}/wars" |
|---|
| 53 |
contexts="${org.bedework.global.context.roots}"> |
|---|
| 54 |
<fileset dir="${ear.dir}"> |
|---|
| 55 |
<include name="*.jar"/> |
|---|
| 56 |
</fileset> |
|---|
| 57 |
</applicationXml> |
|---|
| 58 |
|
|---|
| 59 |
<manifest file="${ear.dir}/META-INF/MANIFEST.MF" /> |
|---|
| 60 |
|
|---|
| 61 |
<copy toDir="${ear.dir}"> |
|---|
| 62 |
<fileset dir="${org.bedework.temp.wars.home}"/> |
|---|
| 63 |
</copy> |
|---|
| 64 |
|
|---|
| 65 |
<zip destfile="${app.ear.file}" |
|---|
| 66 |
basedir="${ear.dir}"/> |
|---|
| 67 |
|
|---|
| 68 |
<!-- copy the ear - at the moment copy the uncompressed. --> |
|---|
| 69 |
|
|---|
| 70 |
<if> |
|---|
| 71 |
<isset property="org.bedework.appserver.deploy.dir" /> |
|---|
| 72 |
<then> |
|---|
| 73 |
<delete dir="${org.bedework.appserver.deploy.dir}/${app.ear.file.name}" /> |
|---|
| 74 |
<mkdir dir="${org.bedework.appserver.deploy.dir}/${app.ear.file.name}" /> |
|---|
| 75 |
<copy todir="${org.bedework.appserver.deploy.dir}/${app.ear.file.name}"> |
|---|
| 76 |
<fileset dir="${ear.dir}"/> |
|---|
| 77 |
</copy> |
|---|
| 78 |
</then> |
|---|
| 79 |
</if> |
|---|
| 80 |
</then> |
|---|
| 81 |
</if> |
|---|
| 82 |
</target> |
|---|
| 83 |
|
|---|
| 84 |
<target name="build.configured" depends="init" > |
|---|
| 85 |
</target> |
|---|
| 86 |
</project> |
|---|