Return-Path: Delivered-To: apmail-cocoon-docs-archive@www.apache.org Received: (qmail 39423 invoked from network); 11 Aug 2008 03:04:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Aug 2008 03:04:00 -0000 Received: (qmail 74476 invoked by uid 500); 11 Aug 2008 03:03:59 -0000 Delivered-To: apmail-cocoon-docs-archive@cocoon.apache.org Received: (qmail 74449 invoked by uid 500); 11 Aug 2008 03:03:58 -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 74438 invoked by uid 99); 11 Aug 2008 03:03:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Aug 2008 20:03:58 -0700 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT 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, 11 Aug 2008 03:03:11 +0000 Received: from cocoon.zones.apache.org (localhost [127.0.0.1]) by cocoon.zones.apache.org (8.13.8+Sun/8.13.8) with ESMTP id m7B2u94F012233 for ; Mon, 11 Aug 2008 02:56:09 GMT Message-ID: <6600282.1218423369152.JavaMail.daisy@cocoon.zones.apache.org> Date: Mon, 11 Aug 2008 02:56:09 +0000 (GMT+00:00) From: daisy@cocoon.zones.apache.org To: docs@cocoon.apache.org Subject: [DAISY] Updated: Your first Cocoon application using Maven 2 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/1159.html Document ID: 1159 Branch: main Language: default Name: Your first Cocoon application using Maven 2 (unchanged) Document Type: Cocoon Document (unchanged) Updated on: 8/11/08 2:55:49 AM Updated by: Mark Lundquist A new version has been created, state: draft Parts =3D=3D=3D=3D=3D Content ------- This part has been updated. Mime type: text/xml (unchanged) File name: (unchanged) Size: 7533 bytes (previous version: 7728 bytes) Content diff: (8 equal lines skipped)
  • Start the block as a web application and access it from your browse= r
  • =20 ---

    First, make sure that you have Maven 2.0.9 or above i= nstalled. --- You can check this by calling mvn --version from the command l= ine. If --- this doesn't work for you, read the +++

    Get Maven (2.0.9 or above)

    +++=20 +++

    Make sure that you have Maven 2.0.9 or above installed. You can chec= k this by +++ calling mvn --version from the command line. If this doesn't w= ork for +++ you, read the Maven in 5 Minutes tutorial.

    =20 (9 equal lines skipped) have a particular expected directory and file structure.

    =20 ---

    You could manually create your blocks, but a simpler = and less --- error-prone process is to use Maven's 'archetype' plugin.=C2=A0 This al= lows you to --- select from a list of block types and have Maven create them for you.= =C2=A0 By --- default, the list of Maven archetypes is quite large.=C2=A0 For conveni= ence, a --- catalog of Cocoon specific archetypes is available on the Cocoon web si= te and --- you will make use of this in the following instructions.

    +++

    You could manually create your blocks, but a simpler and less error-= prone +++ process is to use Maven's 'archetype' plugin.=C2=A0 This allows you to = select from a +++ list of block types and have Maven create them for you.

    =20

    Run the following Maven command:

    =20 (50 equal lines skipped) =20

    Import the block in Eclipse

    =20 ---

    Cocoon is not tied to Eclipse IDE by any means. This = step only --- describes what can be done to avoid tedious work of setting up project = in --- Eclipse manually.
    --- If you don't use Eclipse, you can either skip this step or find a simil= ar --- procedure to load the block in the IDE of your choice.

    +++

    Cocoon is not tied to Eclipse IDE by any means. This step only descr= ibes what +++ can be done to avoid tedious work of setting up project in Eclipse manu= ally. If +++ you don't use Eclipse, you can either skip this step or find a similar = procedure +++ to load the block in the IDE of your choice.

    =20

    Change into the myBlock1 directory and call

    =20 (17 equal lines skipped)
    mvn jetty:run
    =20

    and point your browser at http://localhost:8888/myBlock1/ a= nd get a --- hello world page.

    +++ "hello world" page.=C2=A0 You should see the message:

    =20 ---

    The mentioned minimal web application is automaticall= y created, --- when mvn jetty:run is invoked. This happens because the rcl go= al of the --- Cocoon plugin is bound to the Maven build lifecycle which is invoked to= o, when --- the jetty:run goal is executed. See the block's pom.xml for de= tails. ---

    +++
    This is a message coming from a Spring bean.
    +++ 
    =20 ---

    This process can be manually triggered with mvn --- cocoon:prepare too.

    +++

    The generated webapp is created, when mvn jetty:run is invo= ked, +++ because the rcl goal of the Cocoon plugin is bound to the 'compile' pha= se of the +++ Maven build lifecycle, which is triggered when the jetty:run goal is ex= ecuted +++ (see the block's pom.xml for details).=C2=A0 This process can = be also +++ manually invoked with mvn cocoon:prepare.

    =20

    Conclusion and further information

    =20 (43 equal lines skipped)