Date: 2004-12-01T05:12:53
   Editor: EricJacob <[EMAIL PROTECTED]>
   Wiki: Cocoon Wiki
   Page: HowToBuildAndDeployCocoonWithMaven
   URL: http://wiki.apache.org/cocoon/HowToBuildAndDeployCocoonWithMaven

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -22,7 +22,7 @@
 
 == Option 1 (the hard way...) ==
 
-This option is the one I used to use before discovering the power of the 
''maven.xml'' (thanks to Self:RalphGoers :) ). It consists mainly in manually 
tracking all the Cocoon's JARs and putting them into your Maven repository. 
Here the steps:
+I used to build Cocoon this way before discovering Ralph's method. It consists 
mainly in manually tracking all the Cocoon's JARs and putting them into your 
Maven repository. Here the steps:
 
  1. Build Cocoon with only the desired properties and blocks (as explained in 
INSTALL.txt) by typing ''build'' or ''./build.sh'';
  1. Move all the generated JARs (build/webapp/WEB-INF/lib) into your Maven 
repository;
@@ -35,10 +35,12 @@
 
 == Option 2 (recommended) ==
 
+This method was introduced to me by Self:RalphGoers (thanks Ralph!). It 
consists in building Cocoon and put the generated WAR file on your Maven 
repository.
+
  1. Build Cocoon with only the desired properties and blocks (as explained in 
INSTALL.txt) by typing ''build'' or ''./build.sh'';
  1. Copy the generated WAR (build/cocoon-2.1.6/cocoon.war) into your Maven 
repository (you may want to rename it, for example cocoon-2.1.6.war);
  1. Add the WAR dependency to your Maven project descriptor;
- 1. In maven.xml, add a preGoal element containing an unwar instruction for 
expending the specified WAR;
+ 1. In maven.xml, add a preGoal element containing an unwar instruction for 
expending the specified WAR in your build directory;
  1. Build your project by typing ''build war'' or ''./build.sh war''. It will 
extract the Cocoon WAR into your build directory, add your stuff and create 
another WAR file.
 
 Note that this means that the vast majority of the JARs you will be using will 
be brought in via the Cocoon WAR file, dramatically reducing the number of 
dependencies that have to be changed with each Cocoon update.