You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by gr...@apache.org on 2005/03/08 03:47:15 UTC
svn commit: r156483 -
lenya/branches/BRANCH_1_2_X/src/targets/webapp-build.xml
Author: gregor
Date: Mon Mar 7 18:47:13 2005
New Revision: 156483
URL: http://svn.apache.org/viewcvs?view=rev&rev=156483
Log:
Only copy cocoon.xconf if it has changed. Patch by Felix Roethenbacher. This resolves http://issues.apache.org/bugzilla/show_bug.cgi?id=33847
Modified:
lenya/branches/BRANCH_1_2_X/src/targets/webapp-build.xml
Modified: lenya/branches/BRANCH_1_2_X/src/targets/webapp-build.xml
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/targets/webapp-build.xml?view=diff&r1=156482&r2=156483
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/targets/webapp-build.xml (original)
+++ lenya/branches/BRANCH_1_2_X/src/targets/webapp-build.xml Mon Mar 7 18:47:13 2005
@@ -69,11 +69,25 @@
<!-- Patch cocoon.xconf -->
<echo>INFO: Patch cocoon.xconf</echo>
- <xpatch file="${build.webapp}/WEB-INF/cocoon.xconf"
+ <copy file="${build.webapp}/WEB-INF/cocoon.xconf"
+ toFile="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
+ <xpatch file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"
srcdir="${build.webapp}/lenya/pubs"
includes="*/config/*.xconf"
excludes="*/config/publication.xconf"
addComments="true"/>
+ <checksum
+ file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"
+ property="cocoon.xconf.md5"/>
+ <checksum
+ file="${build.webapp}/WEB-INF/cocoon.xconf"
+ property="${cocoon.xconf.md5}"
+ verifyProperty="cocoon.xconf.isEqual"/>
+ <condition property="cocoon.xconf.copy">
+ <istrue value="${cocoon.xconf.isEqual}"/>
+ </condition>
+ <antcall target="copy-cocoon.xconf"/>
+ <antcall target="delete-cocoon.xconf.ant_patch"/>
<!-- Patch web.xml -->
<!--
@@ -171,6 +185,19 @@
</condition>
<antcall target="successfully-built-message-jetty"/>
+ </target>
+
+ <!-- Copy cocoon.xconf -->
+ <target name="copy-cocoon.xconf" if="cocoon.xconf.copy">
+ <echo>INFO: Apply new cocoon.xconf.</echo>
+ <copy
+ file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"
+ toFile="${build.webapp}/WEB-INF/cocoon.xconf"/>
+ </target>
+ <!-- ... or delete patch file -->
+ <target name="delete-cocoon.xconf.ant_patch" unless="cocoon.xconf.copy">
+ <echo>INFO: Discard patched cocoon.xconf.</echo>
+ <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
</target>
<!--
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org