[ http://issues.apache.org/jira/browse/COCOON-1898?page=comments#action_12432356 ] Leszek Gawron commented on COCOON-1898: ---------------------------------------
To tell you the truth I like XPatch syntax better than your solution. You can understand what the xpatch does even if you never seen the syntax before. Your format has to be well described, otherwise it does not look like a patch file at all. XPatch is more similar to a xsl stylesheet, which is good. XPatch due to it's full XPath (no 'c' before 'h' :)) ) support is way more powerful. What is it that you dislike in XPatch. Maybe we could fix it. I want to implement some more features for cocoon:deploy XPatching: 1. the ability to patch any xml file in cocoon webapp by putting the patch file into /src/main/resources/META-INF/xpatch/blocks/myblock/sitemap.xmap.patch.001.description or /src/main/resources/META-INF/xpatch/WEB-INF/cocoon/cocoon.xconf.001.description-here I figured you have the same path resolution in your solution. 2. xpatch sorting: /src/main/resources/META-INF/xpatch/WEB-INF/cocoon/cocoon.xconf.001.description-here /src/main/resources/META-INF/xpatch/WEB-INF/cocoon/cocoon.xconf.002.other-patch-here this way you may control what patch gets applied first 3. xpatching for both development mode and full cocoon webapp 4. xpatch profiles you will be able to apply only some patches depending on what profile you want enabled (dev,prod,test). This may conflict a little bit with 1). > [PATCH] XPatch support for maven-cocoon-deployer-plugin > ------------------------------------------------------- > > Key: COCOON-1898 > URL: http://issues.apache.org/jira/browse/COCOON-1898 > Project: Cocoon > Issue Type: Improvement > Components: - Build System: Maven > Affects Versions: 2.2-dev (Current SVN) > Reporter: Lars Trieloff > Attachments: maven-cocoon-deployer-plugin-with-xpatch-support.patch > > > The cocoon-deployer-plugin has currently no support for XPatch, which makes > it difficult to modify the web.xml when developing cocoon blocks. For example > the cocoon-xmldb-impl block should add, when deployed, a servlet for xindice > and a servlet mapping for the xindice servlet. This was possible in 2.1 using > the XConfToolTask, but is no longer possible with the current state of the > deployer-plugin. > My patch adds support for patching the web.xml file using *.xweb files in the > /conf directory of a block by filtering the block's jar file during > deployment for conf/*.xweb files, caching the patch document temporarily and > applying them (using code from the orgiginal XConfToolTask in 2.1) to the > web.xml. The patch has currently no support for other files than conf/*.xweb > files and does not support any property expansion. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
