Hi all,
Attached is a patch which modify the build.xml like this :
- add a clean target which erase the classes and webapp in build dir .
This target is called before the target install is called. Perhaps it
should be called at other places.
- change copy operations so they always use overwrite="true" : without
this files aren't updated if there is already files with same name in
the destination folder of the copy.
- read a user property file before reading the default build property
file (a minor improvement)
--
Cordialement,
Ludo - http://www.ubik-products.com
---
"L'amour pour principe et l'ordre pour base; le progres pour but" (A.Comte)
Index: /Users/ludo/Workspaces/UbikDevSite/lokahi/build.xml
===================================================================
--- /Users/ludo/Workspaces/UbikDevSite/lokahi/build.xml (revision 450355)
+++ /Users/ludo/Workspaces/UbikDevSite/lokahi/build.xml (working copy)
@@ -2,9 +2,14 @@
<target name="build"
depends="init,jar,copy-www,copy-db,build-agent,copy-docs,post-process"/>
- <target name="install" depends="build">
+ <target name="clean" depends="init">
+ <delete dir="${app.compile}" failonerror="true"/>
+ <delete dir="${app.build}" failonerror="true"/>
+ </target>
+
+ <target name="install" depends="clean,build">
<mkdir dir="${install.location}${app.name}"/>
- <copy todir="${install.location}${app.name}">
+ <copy todir="${install.location}${app.name}" overwrite="true">
<fileset dir="${app.build.context}"/>
</copy>
</target>
@@ -12,13 +17,13 @@
<target name="post-process" depends="copy-dependent-libs,copy-etc"/>
<target name="copy-www">
- <copy todir="${app.build.context}">
+ <copy todir="${app.build.context}" overwrite="true">
<fileset dir="${app.src.www}"/>
</copy>
</target>
<target name="copy-db">
- <copy todir="${app.build.db}">
+ <copy todir="${app.build.db}" overwrite="true">
<fileset dir="${app.src.db}"/>
<filterchain>
<replacetokens begintoken="@" endtoken="@">
@@ -29,19 +34,19 @@
</target>
<target name="copy-docs">
- <copy todir="${app.build}">
+ <copy todir="${app.build}" overwrite="true">
<fileset dir="${app.src.doc}"/>
</copy>
</target>
<target name="copy-dependent-libs">
- <copy todir="${app.build.web-inf.lib}" flatten="true">
+ <copy todir="${app.build.web-inf.lib}" flatten="true" overwrite="true">
<fileset refid="libs"/>
</copy>
</target>
<target name="copy-etc">
- <copy todir="${app.build.web-inf}">
+ <copy todir="${app.build.web-inf}" overwrite="true">
<fileset dir="${app.conf}">
<exclude name="dbpool.props"/>
<exclude name="ApplicationResources.properties"/>
@@ -59,7 +64,7 @@
</replacetokens>
</filterchain>
</copy>
- <copy todir="${app.build.web-inf.classes}">
+ <copy todir="${app.build.web-inf.classes}" overwrite="true">
<fileset dir="${app.conf}">
<include name="lokahi.properties"/>
<include name="db.properties"/>
@@ -67,7 +72,7 @@
<include name="function.xml"/>
</fileset>
</copy>
- <copy todir="${app.build.web-inf.classes}/lokahi">
+ <copy todir="${app.build.web-inf.classes}/lokahi" overwrite="true">
<fileset dir="${app.conf}">
<include name="ApplicationResources.properties"/>
</fileset>
@@ -190,9 +195,11 @@
<target name="init">
+ <property file="build.${user.name}.properties"/>
<property file="build.properties"/>
<fileset id="libs" dir="${app.lib}">
<include name="**/*.jar"/>
</fileset>
</target>
+
</project>