Hi,
Thanks to this excellent article on wiki
(special 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 archive to my development folder (let's say "C:\dev") to create "C:\dev\myproject"
2 - I downloaded Cocoon 2.1.7 sources and extracted them in "C:\dev" too
3 - In "C:\dev\Cocoon-2.1.7\" I copied build.properties to local.build.properties
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 "WEB-INF/lib"
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
Settings\<my_nickname>\.maven\repository\cocoon\wars\cocoon-2.1.7-minimal.war"
11 - In "C:\dev\myproject\" I updated project.xml and
project.properties, especially to change cocoon dependency version in
project.xml and login/password in project.properties
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
Regards
__________________
Sebastien ARBOGAST
- Starting a project with Cocoon and Maven Sébastien ARBOGAST
- Starting a project with Cocoon and Maven Sébastien ARBOGAST
