You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2005/11/02 11:28:06 UTC
svn commit: r330229 - in /lenya/trunk/src: java/org/apache/lenya/lenya.roles
modules/notification/config/notifier.xroles targets/modules-build.xml
targets/webapp-build.xml
Author: andreas
Date: Wed Nov 2 02:27:56 2005
New Revision: 330229
URL: http://svn.apache.org/viewcvs?rev=330229&view=rev
Log:
allow to patch lenya.roles by publications and modules
Added:
lenya/trunk/src/modules/notification/config/notifier.xroles
Modified:
lenya/trunk/src/java/org/apache/lenya/lenya.roles
lenya/trunk/src/targets/modules-build.xml
lenya/trunk/src/targets/webapp-build.xml
Modified: lenya/trunk/src/java/org/apache/lenya/lenya.roles
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/lenya.roles?rev=330229&r1=330228&r2=330229&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/lenya.roles (original)
+++ lenya/trunk/src/java/org/apache/lenya/lenya.roles Wed Nov 2 02:27:56 2005
@@ -174,10 +174,6 @@
shorthand="publication-manager"
default-class="org.apache.lenya.cms.publication.PublicationManagerImpl"/>
- <role name="org.apache.lenya.notification.Notifier"
- shorthand="notifier"
- default-class="org.apache.lenya.notification.DefaultNotifier"/>
-
<role name="org.apache.lenya.cms.repository.NodeFactory"
shorthand="node-factory"
default-class="org.apache.lenya.cms.repository.SourceNodeFactory"/>
Added: lenya/trunk/src/modules/notification/config/notifier.xroles
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/notification/config/notifier.xroles?rev=330229&view=auto
==============================================================================
--- lenya/trunk/src/modules/notification/config/notifier.xroles (added)
+++ lenya/trunk/src/modules/notification/config/notifier.xroles Wed Nov 2 02:27:56 2005
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xroles xpath="/role-list" unless="/role-list/role[@name = 'org.apache.lenya.notification.Notifier']">
+
+ <role name="org.apache.lenya.notification.Notifier"
+ shorthand="notifier"
+ default-class="org.apache.lenya.notification.DefaultNotifier"/>
+
+</xroles>
Modified: lenya/trunk/src/targets/modules-build.xml
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/targets/modules-build.xml?rev=330229&r1=330228&r2=330229&view=diff
==============================================================================
--- lenya/trunk/src/targets/modules-build.xml (original)
+++ lenya/trunk/src/targets/modules-build.xml Wed Nov 2 02:27:56 2005
@@ -50,13 +50,30 @@
<isfalse value="${cocoon.xconf.isEqual}"/>
</condition>
<antcall target="copy-cocoon.xconf"/>
-<!--
- <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
--->
</target>
+ <target name="modules-patch-lenya-roles">
+ <copy file="${build.webapp}/WEB-INF/classes/org/apache/lenya/lenya.roles"
+ toFile="${build.webapp}/WEB-INF/classes/org/apache/lenya/lenya.roles.ant_patch"/>
+ <xpatch file="${build.webapp}/WEB-INF/classes/org/apache/lenya/lenya.roles.ant_patch"
+ srcdir="${build.modules}"
+ includes="*/config/*.xroles"
+ addComments="true"/>
+ <checksum
+ file="${build.webapp}/WEB-INF/classes/org/apache/lenya/lenya.roles.ant_patch"
+ property="lenya.roles.md5"/>
+ <checksum
+ file="${build.webapp}/WEB-INF/classes/org/apache/lenya/lenya.roles"
+ property="${lenya.roles.md5}"
+ verifyProperty="lenya.roles.isEqual"/>
+ <condition property="lenya.roles.copy">
+ <isfalse value="${lenya.roles.isEqual}"/>
+ </condition>
+ <antcall target="copy-lenya.roles"/>
+ </target>
+
<target name="deploy-modules"
- depends="copy-modules, modules-patch-cocoon-xconf">
+ depends="copy-modules, modules-patch-cocoon-xconf, modules-patch-lenya-roles">
</target>
</project>
Modified: lenya/trunk/src/targets/webapp-build.xml
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/targets/webapp-build.xml?rev=330229&r1=330228&r2=330229&view=diff
==============================================================================
--- lenya/trunk/src/targets/webapp-build.xml (original)
+++ lenya/trunk/src/targets/webapp-build.xml Wed Nov 2 02:27:56 2005
@@ -68,6 +68,40 @@
<antcall target="copy-cocoon.xconf"/>
<delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch" failonerror="false"/>
+
+ <!-- copy properties, xml configuration files and roles -->
+ <copy todir="${build.webapp}/WEB-INF/classes">
+ <fileset dir="${build.src}">
+ <include name="**/*.properties"/>
+ <include name="**/*.roles"/>
+ <include name="**/*.xml"/>
+ </fileset>
+ <fileset dir="${java.dir}">
+ <include name="**/*.roles"/>
+ </fileset>
+ </copy>
+
+
+ <!-- Patch lenya.roles -->
+ <copy file="${build.webapp}/WEB-INF/classes/org/apache/lenya/lenya.roles"
+ toFile="${build.webapp}/WEB-INF/classes/org/apache/lenya/lenya.roles.ant_patch"/>
+ <xpatch file="${build.webapp}/WEB-INF/classes/org/apache/lenya/lenya.roles.ant_patch"
+ srcdir="${build.webapp}/lenya/pubs"
+ includes="*/config/*.xroles"
+ addComments="true"/>
+ <checksum
+ file="${build.webapp}/WEB-INF/classes/org/apache/lenya/lenya.roles.ant_patch"
+ property="lenya.roles.md5"/>
+ <checksum
+ file="${build.webapp}/WEB-INF/classes/org/apache/lenya/lenya.roles"
+ property="${lenya.roles.md5}"
+ verifyProperty="lenya.roles.isEqual"/>
+ <condition property="lenya.roles.copy">
+ <isfalse value="${lenya.roles.isEqual}"/>
+ </condition>
+ <antcall target="copy-lenya.roles"/>
+ <delete file="${build.webapp}/WEB-INF/classes/org/apache/lenya/lenya.roles.ant_patch" failonerror="false"/>
+
<!-- Patch web.xml -->
<!--
<xpatch file="${build.webapp}/WEB-INF/web.xml"
@@ -85,18 +119,6 @@
includes="*/targets/test-build.xconf"
addComments="true"/>
- <!-- copy properties, xml configuration files and roles -->
- <copy todir="${build.webapp}/WEB-INF/classes">
- <fileset dir="${build.src}">
- <include name="**/*.properties"/>
- <include name="**/*.roles"/>
- <include name="**/*.xml"/>
- </fileset>
- <fileset dir="${java.dir}">
- <include name="**/*.roles"/>
- </fileset>
- </copy>
-
<!-- now create logs directory, where log4j can write to -->
<mkdir dir="${build.webapp}/WEB-INF/logs"/>
@@ -171,6 +193,14 @@
overwrite="true"/>
</target>
+ <!-- Copy lenya.roles -->
+ <target name="copy-lenya.roles" if="lenya.roles.copy">
+ <copy
+ file="${build.webapp}/WEB-INF/classes/org/apache/lenya/lenya.roles.ant_patch"
+ toFile="${build.webapp}/WEB-INF/classes/org/apache/lenya/lenya.roles"
+ overwrite="true"/>
+ </target>
+
<!--
The war target just packs up what was created in the webapp target
(and triggers the javadoc target with the dependency)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org