Return-Path: Delivered-To: apmail-cocoon-docs-archive@www.apache.org Received: (qmail 7300 invoked from network); 22 May 2007 06:16:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 May 2007 06:16:46 -0000 Received: (qmail 58799 invoked by uid 500); 22 May 2007 06:16:52 -0000 Delivered-To: apmail-cocoon-docs-archive@cocoon.apache.org Received: (qmail 58762 invoked by uid 500); 22 May 2007 06:16:52 -0000 Mailing-List: contact docs-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: docs@cocoon.apache.org List-Id: Delivered-To: mailing list docs@cocoon.apache.org Received: (qmail 58751 invoked by uid 99); 22 May 2007 06:16:52 -0000 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.67] (HELO cocoon.zones.apache.org) (140.211.11.67) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2007 23:16:51 -0700 Message-ID: <4543417.1179814585944.JavaMail.daisy@cocoon.zones.apache.org> Date: Tue, 22 May 2007 06:16:25 +0000 (GMT+00:00) From: daisy@cocoon.zones.apache.org To: docs@cocoon.apache.org Subject: [DAISY] Updated: Deploying a Cocoon application Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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=C3=B6tz A new version has been created, state: publish Parts =3D=3D=3D=3D=3D 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) =20

Creating a Cocoon web application

=20 ---

First, make sure that you have Maven 2.0.6 or above installed. You c= an check --- this by calling

---=20 ---
mvn --version
---=20 ---

from command line. If this doesn't work for you, read the +++

First, make sure that you have Maven 2.0.6 or above i= nstalled. +++ You can check this by calling mvn --version from command line. If this = doesn't +++ work for you, read the Maven in 5 Minutes tutorial.

=20 ---

Next create a new directory which will be the root directory of your= Cocoon --- application. For this tutorial, let's name it getting-started-app. --- Change into it and invoke the cocoon-22-archetype-webapp arche= type:

+++

Change into it and invoke the cocoon-22-archetype-webapp ar= chetype: +++

=20
mvn archetype:create
      -DarchetypeGroupId=3Dorg.apache.cocoon
      -DarchetypeArtifactId=3Dcocoon-22-archetype-webapp
---   -DarchetypeVersion=3D1.0.0-M2
+++   -DarchetypeVersion=3D1.0.0-RC1
      -DgroupId=3Dcom.mycompany
      -DartifactId=3DmyCocoonWebapp
    
=20

For copy and paste without line feeds:
mvn archetype:create -DarchetypeGroupId=3Dorg.apache.cocoon --- -DarchetypeArtifactId=3Dcocoon-22-archetype-webapp -DarchetypeVersion= =3D1.0.0-M2 +++ -DarchetypeArtifactId=3Dcocoon-22-archetype-webapp -DarchetypeVersion= =3D1.0.0-RC1 -DgroupId=3Dcom.mycompany -DartifactId=3DmyCocoonWebapp =20

Using a block within the web application

(35 equal lines skipped) =20

Creating a parent pom

=20 ---

For your convenience you can create a parent pom for the two Maven m= odules. +++

For your convenience you can create a parent pom for the three Maven= modules. Create a file getting-started-app/pom.xml with following conte= nt:

=20
<project xmlns=3D"http://maven.apache.org/POM/4.0.0"=20
(12 equal lines skipped)
      <modules>
        <module>myCocoonWebapp</module&g=
t;
        <module>myBlock1</module>
---   </modules>
+++     <module>myBlock2</module>
+++  =C2=A0</modules>
    </project>
    
=20 (3 equal lines skipped) according to the dependency graph, in the correct order.

=20

If you want to inherit information (e.g. plugin configurations, prop= erties, --- etc.) from the new parent pom to the two modules, you have to add the p= arent --- element to getting-started-app/myCocoonWebapp/pom.xml and --- getting-started-app/myBlock1/pom.xml:

+++ etc.) from the new parent pom to its child modules, you have to add the= parent +++ element to getting-started-app/myCocoonWebapp/pom.xml , +++ getting-started-app/myBlock1/pom.xml and +++ getting-started-app/myBlock2/pom.xml:

=20
<project xmlns=3D"http://maven.apache.org/POM/4.0.0"=20
     xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"=20
(34 equal lines skipped)