A document has been updated:

http://cocoon.zones.apache.org/daisy/documentation/1362.html

Document ID: 1362
Branch: main
Language: default
Name: Deploying a Cocoon application (unchanged)
Document Type: Cocoon Document (unchanged)
Updated on: 5/22/07 6:16:19 AM
Updated by: Reinhard Pötz

A new version has been created, state: publish

Parts
=====

Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name:  (unchanged)
Size: 5602 bytes (previous version: 5646 bytes)
Content diff:
(18 equal lines skipped)
    
    <h1>Creating a Cocoon web application</h1>
    
--- <p>First, make sure that you have Maven 2.0.6 or above installed. You can 
check
--- this by calling</p>
--- 
--- <pre>mvn --version</pre>
--- 
--- <p>from command line. If this doesn't work for you, read the
+++ <p class="note">First, make sure that you have Maven 2.0.6 or above 
installed.
+++ You can check this by calling mvn --version from command line. If this 
doesn't
+++ work for you, read the
    <a 
href="http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html";>Maven
    in 5 Minutes</a> tutorial.</p>
    
--- <p>Next create a new directory which will be the root directory of your 
Cocoon
--- application. For this tutorial, let's name it <tt>getting-started-app</tt>.
--- Change into it and invoke the <tt>cocoon-22-archetype-webapp</tt> 
archetype:</p>
+++ <p>Change into it and invoke the <tt>cocoon-22-archetype-webapp</tt> 
archetype:
+++ </p>
    
    <pre>mvn archetype:create
      -DarchetypeGroupId=org.apache.cocoon
      -DarchetypeArtifactId=cocoon-22-archetype-webapp
---   -DarchetypeVersion=1.0.0-M2
+++   -DarchetypeVersion=1.0.0-RC1
      -DgroupId=com.mycompany
      -DartifactId=<tt>myCocoonWebapp</tt>
    </pre>
    
    <p class="note">For copy and paste without line feeds:<br/>
    <tt>mvn archetype:create -DarchetypeGroupId=org.apache.cocoon
--- -DarchetypeArtifactId=cocoon-22-archetype-webapp -DarchetypeVersion=1.0.0-M2
+++ -DarchetypeArtifactId=cocoon-22-archetype-webapp 
-DarchetypeVersion=1.0.0-RC1
    -DgroupId=com.mycompany -DartifactId=</tt><tt>myCocoonWebapp</tt></p>
    
    <h1>Using a block within the web application</h1>
(35 equal lines skipped)
    
    <h1>Creating a parent pom</h1>
    
--- <p>For your convenience you can create a parent pom for the two Maven 
modules.
+++ <p>For your convenience you can create a parent pom for the three Maven 
modules.
    Create a file <tt>getting-started-app/pom.xml</tt> with following 
content:</p>
    
    <pre>&lt;project xmlns="http://maven.apache.org/POM/4.0.0"; 
(12 equal lines skipped)
      &lt;modules&gt;
        &lt;module&gt;<strong><tt>myCocoonWebapp</tt></strong>&lt;/module&gt;
        &lt;module&gt;<strong>myBlock1</strong>&lt;/module&gt;
---   &lt;/modules&gt;
+++     &lt;module&gt;<strong>myBlock2</strong>&lt;/module&gt;
+++   &lt;/modules&gt;
    &lt;/project&gt;
    </pre>
    
(3 equal lines skipped)
    according to the dependency graph, in the correct order.</p>
    
    <p>If you want to inherit information (e.g. plugin configurations, 
properties,
--- etc.) from the new parent pom to the two modules, you have to add the parent
--- element to <tt>getting-started-app/myCocoonWebapp/pom.xml</tt> and
--- <tt>getting-started-app/myBlock1/pom.xml</tt>:</p>
+++ etc.) from the new parent pom to its child modules, you have to add the 
parent
+++ element to <tt>getting-started-app/myCocoonWebapp/pom.xml</tt> ,
+++ <tt>getting-started-app/myBlock1/pom.xml</tt> and
+++ <tt>getting-started-app/myBlock2/pom.xml</tt>:</p>
    
    <pre>&lt;project xmlns="http://maven.apache.org/POM/4.0.0"; 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
(34 equal lines skipped)