| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
|
|---|
| 3 |
<!-- =================================================================== |
|---|
| 4 |
This file is imported by platform specific build files to force the build |
|---|
| 5 |
of a runnable form. It adds the targets: |
|---|
| 6 |
runnableDoHibProps: builds a set of properties for the service |
|---|
| 7 |
runnableAddLibs: add libraries for this platform |
|---|
| 8 |
runnableAddResources: add anything we want in the resources directory |
|---|
| 9 |
runnableAddExtras: add scripts for runnable versions |
|---|
| 10 |
runnableDeployService: deploy the service |
|---|
| 11 |
=================================================================== --> |
|---|
| 12 |
|
|---|
| 13 |
<project name="bedework.runnableService" default="runnableDoHibProps" > |
|---|
| 14 |
<target name="runnableDoHibProps" > |
|---|
| 15 |
<echo file="${app.dest.classes}/hibernate.properties"> |
|---|
| 16 |
hibernate.query.substitutions true 'T', false 'F', yes 'Y', no 'N' |
|---|
| 17 |
hibernate.dialect=${org.bedework.global.hibernate.dialect} |
|---|
| 18 |
hibernate.connection.driver_class=${org.bedework.global.jdbcdriver} |
|---|
| 19 |
hibernate.connection.username=${org.bedework.global.jdbcid} |
|---|
| 20 |
hibernate.connection.password=${org.bedework.global.jdbcpw} |
|---|
| 21 |
hibernate.connection.url=${org.bedework.global.jdbcurl} |
|---|
| 22 |
hibernate.bytecode.use_reflection_optimizer=false |
|---|
| 23 |
hibernate.cache.use_second_level_cache=false |
|---|
| 24 |
|
|---|
| 25 |
hibernate.jdbc.use_streams_for_binary false |
|---|
| 26 |
# |
|---|
| 27 |
# Here for better debugging |
|---|
| 28 |
# |
|---|
| 29 |
hibernate.jdbc.batch_size=0 |
|---|
| 30 |
</echo> |
|---|
| 31 |
</target> |
|---|
| 32 |
|
|---|
| 33 |
<!-- ================================================================ |
|---|
| 34 |
Add libraries |
|---|
| 35 |
================================================================ --> |
|---|
| 36 |
|
|---|
| 37 |
<target name="runnableAddLibs"> |
|---|
| 38 |
<!-- any extra files --> |
|---|
| 39 |
<copy todir="${app.dest.lib}" > |
|---|
| 40 |
<fileset dir="${org.bedework.temp.extrajars.dir}" /> |
|---|
| 41 |
</copy> |
|---|
| 42 |
|
|---|
| 43 |
<!-- jdbc stuff --> |
|---|
| 44 |
|
|---|
| 45 |
<if> |
|---|
| 46 |
<available file="${org.bedework.global.ext.lib}/jdbc" type="dir" /> |
|---|
| 47 |
<then> |
|---|
| 48 |
<!-- jdbc drivers --> |
|---|
| 49 |
<copy todir="${app.dest.lib}" flatten="yes" > |
|---|
| 50 |
<!-- local jdbc drivers --> |
|---|
| 51 |
<fileset dir="${org.bedework.global.ext.lib}/jdbc"> |
|---|
| 52 |
<include name="*.jar"/> |
|---|
| 53 |
</fileset> |
|---|
| 54 |
</copy> |
|---|
| 55 |
</then> |
|---|
| 56 |
</if> |
|---|
| 57 |
</target> |
|---|
| 58 |
|
|---|
| 59 |
<!-- ================================================================ |
|---|
| 60 |
Add resources |
|---|
| 61 |
================================================================ --> |
|---|
| 62 |
|
|---|
| 63 |
<target name="runnableAddResources"> |
|---|
| 64 |
<property name="app.dest.resources" |
|---|
| 65 |
location="${app.dest.home}/resources" /> |
|---|
| 66 |
|
|---|
| 67 |
<mkdir dir="${app.dest.resources}"/> |
|---|
| 68 |
|
|---|
| 69 |
<copy tofile="${app.dest.resources}/log4j.xml" |
|---|
| 70 |
file="${org.bedework.runsh.log4j.xml}" |
|---|
| 71 |
failonerror="false" /> |
|---|
| 72 |
</target> |
|---|
| 73 |
|
|---|
| 74 |
<!-- ================================================================ |
|---|
| 75 |
Add extras |
|---|
| 76 |
================================================================ --> |
|---|
| 77 |
|
|---|
| 78 |
<target name="runnableAddExtras"> |
|---|
| 79 |
<!-- =============================================================== |
|---|
| 80 |
Build the classpath |
|---|
| 81 |
=============================================================== --> |
|---|
| 82 |
|
|---|
| 83 |
<path id="app.run.path"> |
|---|
| 84 |
<fileset dir="${app.dest.lib}"> |
|---|
| 85 |
<include name="*.jar"/> |
|---|
| 86 |
</fileset> |
|---|
| 87 |
<pathelement location="${app.dest.resources}" /> |
|---|
| 88 |
</path> |
|---|
| 89 |
<pathconvert property="app.run.cp" refid="app.run.path" |
|---|
| 90 |
targetos="unix" > |
|---|
| 91 |
<map from="${app.dest.lib}" to="./lib"/> |
|---|
| 92 |
<map from="${app.dest.resources}" to="./resources"/> |
|---|
| 93 |
</pathconvert> |
|---|
| 94 |
<pathconvert property="app.run.wincp" refid="app.run.path" |
|---|
| 95 |
targetos="windows" > |
|---|
| 96 |
<map from="${app.dest.lib}" to="./lib"/> |
|---|
| 97 |
<map from="${app.dest.resources}" to="./resources"/> |
|---|
| 98 |
</pathconvert> |
|---|
| 99 |
|
|---|
| 100 |
<!-- =============================================================== |
|---|
| 101 |
Copy and modify the shell script |
|---|
| 102 |
=============================================================== --> |
|---|
| 103 |
|
|---|
| 104 |
<copy tofile="${app.dest.home}/${propval.app.shellscr.name}" |
|---|
| 105 |
file="${app.run.shellscr}" > |
|---|
| 106 |
<filterset> |
|---|
| 107 |
<filter token="CP" |
|---|
| 108 |
value=".:./classes:${app.run.cp}"/> |
|---|
| 109 |
</filterset> |
|---|
| 110 |
<filterset refid="property.filters" /> |
|---|
| 111 |
</copy> |
|---|
| 112 |
|
|---|
| 113 |
<copy tofile="${app.dest.home}/${propval.app.batscr.name}" |
|---|
| 114 |
file="${app.run.batscr}" > |
|---|
| 115 |
<filterset> |
|---|
| 116 |
<filter token="CP" |
|---|
| 117 |
value=".;./classes;${app.run.wincp}"/> |
|---|
| 118 |
</filterset> |
|---|
| 119 |
<filterset refid="property.filters" /> |
|---|
| 120 |
</copy> |
|---|
| 121 |
|
|---|
| 122 |
<!-- build the zip file --> |
|---|
| 123 |
<mkdir dir="${dist.home}" /> |
|---|
| 124 |
<delete file="${app.zip.file}" /> |
|---|
| 125 |
|
|---|
| 126 |
<zip destfile="${app.zip.file}" > |
|---|
| 127 |
<zipfileset prefix="${propval.app.zip.name}" dir="${app.dest.home}" /> |
|---|
| 128 |
</zip> |
|---|
| 129 |
</target> |
|---|
| 130 |
|
|---|
| 131 |
<!-- ================================================================ |
|---|
| 132 |
Deploy the service |
|---|
| 133 |
================================================================ --> |
|---|
| 134 |
|
|---|
| 135 |
<target name="runnableDeployService"> |
|---|
| 136 |
<!-- Nothing to do for runnable services --> |
|---|
| 137 |
</target> |
|---|
| 138 |
</project> |
|---|