cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Billard <olivier.billard.coc...@laposte.net>
Subject Re: Cocoon Maven plugin - Merging deployer & rcl
Date Thu, 05 Jul 2007 08:15:37 GMT
Reinhard Poetz wrote:
> Olivier Billard wrote:
>> Guys,
>>
>> I plug into your thread because I'm right into it : I checked-out the 
>> Cocoon ACEGI sample, completed it and tested it, it's great.
>> But I've got trouble with the xweb file : using the block-only rcl 
>> webapp, patch is correctly applied, but I would like to make my app 
>> security with ACEGI a block (seems promising with ACEGI as a filter 
>> and xweb), but such a block included into a webapp block does not 
>> triggers web.xml patching when calling "mvn package".
>>
>> Did I missed something ?
> 
> Yes, you have to use the deployer goal ('mvn cocoon:deploy') in order to 
> get your xweb patches applied. The package plugin isn't aware of 
> Cocoon's xweb patching mechanism.
> 


Thank you for your answer Reinhard, I really missed this plugin part, sorry.

<note>
This could be continued in the users list if you think this is more suited.
Nevertheless, as this seems to be a bug in the dev version (not released yet), I continue
on the dev list for the moment.
</note>

This perfectly works with the "deploy" mojo, but not for the "deploy-war" one, with exactly
the same configuration.
I meet a strange phenomenon, that could possibly be a bug in the cocoon-maven-plugin ? web.xml
patch is not applied with the "deploy-war", except 
after a "deploy" mojo call :). Of course these mojos are not meant to be called one after
the other, but this could be a clue for resolution: maybe a 
context is not properly initialized when "deploy-war" mojo is called alone?


Maven outputs below.

--
Olivier Billard


--> This works:
<snip/>
[INFO] ----------------------------------------------------------------------------
[INFO] Building ACEGI Security Sample - Webapp
[INFO]    task-segment: [clean, cocoon:deploy]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
<snip/>
[INFO] [cocoon:deploy]
[INFO] Exploding webapp...
[INFO] Assembling webapp webapp in <snip/>\webapp\target\webapp-1.0-SNAPSHOT
[INFO] Copy webapp webResources to <snip/>\webapp\target\webapp-1.0-SNAPSHOT
[INFO] Copy webapp webResources to <snip/>\webapp\target\webapp-1.0-SNAPSHOT
[INFO] Applying patches to: WEB-INF/web.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
<snip/>

--> This does not work:
<snip/>
[INFO] ----------------------------------------------------------------------------
[INFO] Building ACEGI Security Sample - Webapp
[INFO]    task-segment: [clean, cocoon:deploy-war]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
<snip/>
[INFO] [cocoon:deploy-war]
[INFO] Exploding webapp...
[INFO] Assembling webapp webapp in <snip/>\webapp\target\webapp-1.0-SNAPSHOT
[INFO] Copy webapp webResources to <snip/>\webapp\target\webapp-1.0-SNAPSHOT
[INFO] Copy webapp webResources to <snip/>\webapp\target\webapp-1.0-SNAPSHOT
[INFO] No patches to apply    <-- *oops*
[INFO] Generating war E:\Dev\soprano-ng\sources\sandbox\example-apps\acegi-example\webapp\target\webapp-1.0-SNAPSHOT.war
[INFO] Building war: E:\Dev\soprano-ng\sources\sandbox\example-apps\acegi-example\webapp\target\webapp-1.0-SNAPSHOT.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
<snip/>

--> This works, but hum...
<snip/>
[INFO] ----------------------------------------------------------------------------
[INFO] Building ACEGI Security Sample - Webapp
[INFO]    task-segment: [clean, cocoon:deploy, cocoon:deploy-war]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
<snip/>
[INFO] [cocoon:deploy]
[INFO] Exploding webapp...
[INFO] Assembling webapp webapp in E:\Dev\soprano-ng\sources\sandbox\example-apps\acegi-example\webapp\target\webapp-1.0-SNAPSHOT
[INFO] Copy webapp webResources to E:\Dev\soprano-ng\sources\sandbox\example-apps\acegi-example\webapp\target\webapp-1.0-SNAPSHOT
[INFO] Copy webapp webResources to E:\Dev\soprano-ng\sources\sandbox\example-apps\acegi-example\webapp\target\webapp-1.0-SNAPSHOT
[INFO] Applying patches to: WEB-INF/web.xml   <-- *patch applied 1 time ...*
[INFO] [cocoon:deploy-war]
[INFO] Exploding webapp...
[INFO] Assembling webapp webapp in E:\Dev\soprano-ng\sources\sandbox\example-apps\acegi-example\webapp\target\webapp-1.0-SNAPSHOT
[INFO] Copy webapp webResources to E:\Dev\soprano-ng\sources\sandbox\example-apps\acegi-example\webapp\target\webapp-1.0-SNAPSHOT
[INFO] Copy webapp webResources to E:\Dev\soprano-ng\sources\sandbox\example-apps\acegi-example\webapp\target\webapp-1.0-SNAPSHOT
[INFO] Applying patches to: WEB-INF/web.xml   <-- *and again a second time. Here deploy-war
mojo applies the patch*
[INFO] Generating war E:\Dev\soprano-ng\sources\sandbox\example-apps\acegi-example\webapp\target\webapp-1.0-SNAPSHOT.war
[INFO] Building war: E:\Dev\soprano-ng\sources\sandbox\example-apps\acegi-example\webapp\target\webapp-1.0-SNAPSHOT.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
<snip/>


Mime
View raw message