cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien ARBOGAST <>
Subject Starting a project with Cocoon and Maven
Date Thu, 07 Apr 2005 20:00:05 GMT

Thanks to this excellent article on
thanks to its authors, Eric and Ralph) I managed to setup a basic
development environment in order to begin a new web app project based on 
Cocoon and deployable on Tomcat. 
This is what I've done (it can help newbies to complete what's said in the 
article and it can clarify my situation as well)
1 - I extracted this
my development folder (let's say "C:\dev") to create
2 - I downloaded Cocoon 2.1.7 sources
<>and extracted them in "C:\dev"
3 - In "C:\dev\Cocoon-2.1.7\" I copied to
4 - I edited this new file and uncommented lines for samples, docs and 
javadocs of all kinds
5 - I made a "build war" in this directory
6 - I opened "c:\dev\cocoon-2.1.7\build\cocoon-2.1.7\cocoon.war" with Winrar
7 - I extracted all the files inside the archive to 
"C:\dev\myproject\src\webapp", keeping the save directory structure
8 - In the war archive I deleted all the files and directories except 
9 - In "C:\dev\myproject\src\webapp" I deleted only "WEB-INF\lib" so that 
the content of Cocoon war and webapp folder are complementary (since the 
main interest of using Maven is to manage jar dependencies)
10 - I copied the modified cocoon.war to my local repository and renamed it 
to get "C:\Documents and 
11 - In "C:\dev\myproject\" I updated project.xml and, 
especially to change cocoon dependency version in project.xml and 
login/password in
12 - Finally, knowing that Maven and its tomcat plugin were already 
installed on my system, I just add to run "maven tomcat:install" (after 
starting tomcat service) in "C:\dev\myproject\" to get a functional webapp 
in tomcat.

But now I have the following problem : when I update a file in 
"C:\dev\myproject\src\webapp\", let's say I want to change "welcome.xslt" to 
reflect my project name, of course the file is not automatically updated in 
"C:\dev\myproject\target\myproject" so I have to run "maven war:webapp" to 
do this and see the result of my changes in my browser, but then the pregoal 
to unwar Cocoon jars is always executed, even if it's not necessery, which 
makes my "update/compile/run" development process unnecessary long. Is there 
a way (I don't know jelly of configuration directives for maven at all) to 
make this pregoal conditional or at least to add parameters to the command 
line so that I can deactivate this pregoal if I know it's not necessary ?

Thanks in advance

Sebastien ARBOGAST

View raw message