cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <>
Subject Re: XPatch support for maven-cocoon-deployer-plugin
Date Tue, 05 Sep 2006 07:27:43 GMT
Giacomo Pati wrote:
> I'm not sure what this xpatch stuff is all about (I thought we've been 
> over it with patching in 2.2). But what about
>    src/test/webapp/WEB-INF/web.xml
>    src/test/webapp/sitemap.xmap
We've been discussing a variation of this approach here [1]. My point was:

there is myblock-opensessioninview-enabler. It has a patch to web.xml:

<?xml version="1.0"?>
<xweb xpath="/web-app"
       unless="comment()[contains(., 'OpenSessionInView')]"
     <!-- OpenSessionInView -->

If the patch is carried along with the myblock-opensessioninview-enabler 
block any other block (say myblock-client-interface) is able to have 
web.xml patched just by stating dependency on 

There are already some blocks in cocoon that are used alike:

The only thing the block does is ensuring the proper class gets loaded.

 >    src/test/webapp/WEB-INF/web.xml
 >    src/test/webapp/sitemap.xmap

Those are not the only files that need patching right now.

> if you need special ones for testing your block (packaging=jar)?
> For packaging=webapp you don't really need patching at all as you are in 
> total control of it!

Same goes for webapp. Even if I have a total control over webapp I want 
this definition to look exactly the same in all projects in my company. 
This way I make my myapp-webapp depend on 
myblock-opensessioninview-enabler and thats it.


Leszek Gawron, IT Manager                          MobileBox sp. z o.o.
+48 (61) 855 06 67                    
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

View raw message