Return-Path: Delivered-To: apmail-cocoon-docs-archive@www.apache.org Received: (qmail 35856 invoked from network); 23 Jun 2008 14:58:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Jun 2008 14:58:58 -0000 Received: (qmail 64325 invoked by uid 500); 23 Jun 2008 14:59:00 -0000 Delivered-To: apmail-cocoon-docs-archive@cocoon.apache.org Received: (qmail 64297 invoked by uid 500); 23 Jun 2008 14:59:00 -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 64279 invoked by uid 99); 23 Jun 2008 14:59:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jun 2008 07:59:00 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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, 23 Jun 2008 14:58:16 +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 m5NEp5xl005474 for ; Mon, 23 Jun 2008 14:51:05 GMT Message-ID: <5833311.1214232665190.JavaMail.daisy@cocoon.zones.apache.org> Date: Mon, 23 Jun 2008 14:51:05 +0000 (GMT+00:00) From: daisy@cocoon.zones.apache.org To: docs@cocoon.apache.org Subject: [DAISY] Updated: Modularize Cocoon apps (Using blocks) 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/1291.html Document ID: 1291 Branch: main Language: default Name: Modularize Cocoon apps (Using blocks) (unchanged) Document Type: Cocoon Document (unchanged) Updated on: 6/23/08 2:50:59 PM Updated by: David Legg 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: 8780 bytes (previous version: 8644 bytes) Content diff: (25 equal lines skipped) =20

First choose the archetype: -

=20 ---
Choose archetype:
+++ 
...
+++ Choose archetype:
    1: remote -> cocoon-22-archetype-block-plain (Creates an empty Cocoo=
n block; useful
    =C2=A0if you want to add another block to a Cocoon application)
    2: remote -> cocoon-22-archetype-block (Creates a Cocoon block conta=
ining some small
(10 equal lines skipped)
    Define value for version:  1.0-SNAPSHOT: : 1.0.0
    Define value for package: : com.mycompany.myBlock2
   =20
--- 

The result is a second block and you should find directory structure= of your --- application now looks as follows: -

+++

The result is a second Cocoon block called myBlock2.=C2=A0 You shoul= d find the +++ directory structure of your application now looks as follows: -

=20
getting-started-app
    =C2=A0+-myBlock1
(11 equal lines skipped)
   =20
    
mvn install eclipse:eclipse
=20 ---

This builds and copies the second block into your local Maven reposi= tory and --- then creates the necessary files to allow you to import the block as a = project --- in Eclipse.

+++

This builds and copies the second block into your local Maven reposi= tory so +++ that other dependent blocks and projects can see it and then creates th= e +++ necessary files to allow you to import the block as a project in Eclips= e.

=20

Connect two blocks

=20 ---

Let's assume that you want to use a pipeline defined in block2 from --- within block1. You have to establish the connection between th= e two --- blocks. Edit +++

Let's assume that you want to use a pipeline defined in myBlock2= +++ from within myBlock1. You have to establish the connection bet= ween the +++ two blocks. Edit getting-started-app/myBlock1/src/main/resources/ME= TA-INF/cocoon/spring/block-servlet-service.xml:

=20 (15 equal lines skipped) </beans>
=20 ---

Additionally add the new block as dependency to the block's Maven pr= oject --- descriptor (getting-started-app/myBlock1/pom.xml):

+++

Additionally, you have to record the fact that myBlock1 has a depend= ency on +++ myBlock2 by editing myBlock1's Maven project descriptor +++ (getting-started-app/myBlock1/pom.xml):

=20
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
    <project>
(132 equal lines skipped)