| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
|
|---|
| 3 |
<!-- =================================================================== |
|---|
| 4 |
This file builds a runnable application wrapped up as a zip file. |
|---|
| 5 |
Unpacking the zip should result in a directory containing a shell |
|---|
| 6 |
script, a set of jars and any other resources needed. |
|---|
| 7 |
|
|---|
| 8 |
Properties we need: |
|---|
| 9 |
app.core.env.pname core properties source |
|---|
| 10 |
app.run.shellscr location of the skeleton shell script. |
|---|
| 11 |
app.run.jar.file application jar file |
|---|
| 12 |
app.run.main.class main class for application. |
|---|
| 13 |
|
|---|
| 14 |
Authors: Mike Douglass douglm rpi.edu |
|---|
| 15 |
=================================================================== --> |
|---|
| 16 |
|
|---|
| 17 |
<project name="bw.buildsh" default="build"> |
|---|
| 18 |
<import file="${build.dir}/buildfilters.xml" /> |
|---|
| 19 |
|
|---|
| 20 |
<import file="${build.dir}/platforms/${org.bedework.global.deploy.platform}Service.xml" /> |
|---|
| 21 |
|
|---|
| 22 |
<target name="init"> |
|---|
| 23 |
<!-- Destinations - where we build stuff --> |
|---|
| 24 |
<property name="app.dest.home" |
|---|
| 25 |
location="${org.bedework.temp.shellscr.home}/${propval.app.zip.name}" /> |
|---|
| 26 |
<property name="app.dest.lib" |
|---|
| 27 |
location="${app.dest.home}/lib" /> |
|---|
| 28 |
<property name="app.dest.classes" |
|---|
| 29 |
location="${app.dest.home}/classes" /> |
|---|
| 30 |
<property name="app.dest.properties" |
|---|
| 31 |
location="${app.dest.classes}/properties/calendar" /> |
|---|
| 32 |
<property name="app.dest.data" |
|---|
| 33 |
location="${app.dest.home}/data" /> |
|---|
| 34 |
|
|---|
| 35 |
<property name="app.zip.file" |
|---|
| 36 |
location="${dist.home}/${propval.app.zip.name}.zip" /> |
|---|
| 37 |
</target> |
|---|
| 38 |
|
|---|
| 39 |
<!-- ================================================================ |
|---|
| 40 |
build target |
|---|
| 41 |
================================================================ --> |
|---|
| 42 |
|
|---|
| 43 |
<target name="build" depends="init"> |
|---|
| 44 |
<delete dir="${app.dest.home}" /> |
|---|
| 45 |
|
|---|
| 46 |
<!-- Library stuff --> |
|---|
| 47 |
|
|---|
| 48 |
<mkdir dir="${app.dest.lib}" /> |
|---|
| 49 |
|
|---|
| 50 |
<!-- Platform specific --> |
|---|
| 51 |
<antcall target="addLibs" inheritRefs="true" /> |
|---|
| 52 |
|
|---|
| 53 |
<copy todir="${app.dest.classes}"> |
|---|
| 54 |
<fileset dir="${org.bedework.project.calendarapi}/calCore/resources/properties" /> |
|---|
| 55 |
<filterset refid="property.filters" /> |
|---|
| 56 |
</copy> |
|---|
| 57 |
|
|---|
| 58 |
<copy todir="${app.dest.classes}"> |
|---|
| 59 |
<fileset dir="${org.bedework.project.calendarapi}/calCore/resources/hbms" /> |
|---|
| 60 |
<filterset refid="property.filters" /> |
|---|
| 61 |
</copy> |
|---|
| 62 |
|
|---|
| 63 |
<copy tofile="${app.dest.classes}/sysevents.properties" |
|---|
| 64 |
file="${org.bedework.config.sysevents.properties}" /> |
|---|
| 65 |
|
|---|
| 66 |
<if> |
|---|
| 67 |
<isreference refid="org.bedework.extra.resources" /> |
|---|
| 68 |
<then> |
|---|
| 69 |
<copy todir="${app.dest.classes}" overwrite="yes" > |
|---|
| 70 |
<fileset refid="org.bedework.extra.resources" /> |
|---|
| 71 |
<filterset refid="property.filters" /> |
|---|
| 72 |
</copy> |
|---|
| 73 |
</then> |
|---|
| 74 |
</if> |
|---|
| 75 |
|
|---|
| 76 |
<!-- Platform specific hibernate properties --> |
|---|
| 77 |
<antcall target="doHibProps" inheritRefs="true" /> |
|---|
| 78 |
|
|---|
| 79 |
<!-- Create the env.properties file --> |
|---|
| 80 |
<mkdir dir="${app.dest.properties}" /> |
|---|
| 81 |
|
|---|
| 82 |
<copy tofile="${app.dest.properties}/options.xml" |
|---|
| 83 |
file="${org.bedework.config.options}" /> |
|---|
| 84 |
|
|---|
| 85 |
<!-- =============================================================== |
|---|
| 86 |
Add any resource files |
|---|
| 87 |
=============================================================== --> |
|---|
| 88 |
|
|---|
| 89 |
<!-- Platform specific --> |
|---|
| 90 |
<antcall target="addResources" inheritRefs="true" /> |
|---|
| 91 |
|
|---|
| 92 |
<!-- =============================================================== |
|---|
| 93 |
Add any data files |
|---|
| 94 |
=============================================================== --> |
|---|
| 95 |
|
|---|
| 96 |
<if> |
|---|
| 97 |
<isreference refid="org.bedework.shellscr.data" /> |
|---|
| 98 |
<then> |
|---|
| 99 |
<mkdir dir="${app.dest.data}" /> |
|---|
| 100 |
|
|---|
| 101 |
<copy todir="${app.dest.data}" overwrite="yes" > |
|---|
| 102 |
<fileset refid="org.bedework.shellscr.data" /> |
|---|
| 103 |
<filterset refid="property.filters" /> |
|---|
| 104 |
</copy> |
|---|
| 105 |
</then> |
|---|
| 106 |
</if> |
|---|
| 107 |
|
|---|
| 108 |
<!-- =============================================================== |
|---|
| 109 |
Add any extra stuff |
|---|
| 110 |
=============================================================== --> |
|---|
| 111 |
|
|---|
| 112 |
<!-- Platform specific --> |
|---|
| 113 |
<antcall target="addExtras" inheritRefs="true" /> |
|---|
| 114 |
|
|---|
| 115 |
<!-- ================================================================ |
|---|
| 116 |
Build the zip file |
|---|
| 117 |
================================================================ --> |
|---|
| 118 |
|
|---|
| 119 |
<mkdir dir="${dist.home}" /> |
|---|
| 120 |
<delete file="${app.zip.file}" /> |
|---|
| 121 |
|
|---|
| 122 |
<zip destfile="${app.zip.file}" > |
|---|
| 123 |
<zipfileset prefix="${propval.app.zip.name}" dir="${app.dest.home}" /> |
|---|
| 124 |
</zip> |
|---|
| 125 |
</target> |
|---|
| 126 |
</project> |
|---|