Hi Steve,

I followed the Getting started documentation as well, so I don't think
the documentation contains errors or is missing important steps.

So I'll try to recapitulate shortly the steps to create a webapp with 2
blocks.

In your workspace folder do following:

- Run "mvn archetype:generate
-DarchetypeCatalog=http://cocoon.apache.org"; and choose option 2
(simplest archetype) for each block you want to create.
- Run "mvn archetype:generate
-DarchetypeCatalog=http://cocoon.apache.org"; and choose option 3 for the
webapp archetype

In ${workspacefolder} you should now have 3 folders... 
- myblock1
- myblock2
- mywebapp

Just to be sure install all 3 projects once (first the blocks and then
the webapp) after having created them with "mvn install" in the
corresponding folder.

Create a new folder for your parent pom (E.g. mywebappparent) and create
the parent pom in this folder. copy the example of the cocoon docs to
get started.
Add the 3 projects as 
<modules>
  <module>myblock1</module>
  <module>myblock2</module>
  <module>mywebapp</module>
</modules>

I actually also listed all dependencies for the webapp in the parent
pom, so all blocks will use the same version by default

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-core</artifactId>
        <version>2.2.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-servlet-service-components</artifactId>
        <version>1.0.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-template-impl</artifactId>
        <version>1.1.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-flowscript-impl</artifactId>
        <version>1.0.0</version>
      </dependency>    
      <dependency>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-forms-impl</artifactId>
        <version>1.1.0</version>
      </dependency>    
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.4</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>net.sf.saxon</groupId>
        <artifactId>saxon</artifactId>
        <version>8.7</version>
        <scope>provided</scope>
      </dependency>
          <!-- test dependencies -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.4</version>
        <!--<scope>test</scope>-->
      </dependency>
    </dependencies>
  </dependencyManagement>


Now in the 3 projects you need to add a reference to your parent pom:
  <parent>
    <groupId>com.mycompany</groupId>
    <artifactId>mywebappparent</artifactId>
    <version>1.0-SNAPSHOT</version>
    <relativePath>../mywebappparent/pom.xml</relativePath>    
  </parent>

Also in the mywebapp pom.xml  do not forget to add the 2 blocks as
dependencies.


Now try to run "mvn install" in the mywebappparent folder.  This SHOULD
trigger a reactor build and you should see some Maven output:

- build mywebappparent pom
- building myblock1
- building myblock2
- building mywebapp

And in the end you should see myblock1.jar, myblock2.jar, mywebapp.war
in the resp. target folders.

Hope you might find a solution based on this info.

Kind regards,
Robby Pelssers



-----Original Message-----
From: Steven D. Majewski [mailto:sd...@virginia.edu] 
Sent: Wednesday, September 23, 2009 6:04 PM
To: users@cocoon.apache.org
Subject: Re: problems with "Getting Started" 2.2 [was: Starting out with
Cocoon 2.2]



myBlock1 & myBlock2 seem to have all the right dependencies (and they  
work on their own),
but myCocoonWebapp has only the jars from those two blocks:

[INFO]  
------------------------------------------------------------------------
[INFO] [dependency:tree {execution: default-cli}]
[INFO] edu.virginia.lib:myCocoonWebApp:war:1.0.0
[INFO] +- edu.virginia.lib:myBlock1:jar:1.0-SNAPSHOT:compile
[INFO] \- edu.virginia.lib:myBlock2:jar:1.0-SNAPSHOT:compile
[INFO]  
------------------------------------------------------------------------

Obviously something is missing from the webapp, but I don't think I  
missed
any steps in the tutorial. ( But as I noted in previous message, an  
earlier
step or two seem to have been left out. )

I guess I'll go read the maven docs and see if I can find a clue.

-- Steve Majewski




On Sep 23, 2009, at 4:13 AM, Dominic Mitchell wrote:

> On Wed, Sep 23, 2009 at 8:22 AM, Dominic Mitchell
<d...@happygiraffe.net 
> > wrote:
> My first question would h
> ave been: are the dependencies correct?  What happens if you run mvn  
> dependency:tree in the webapp?  It should include spring dependencies.
>
> For reference, this is what I get when running mvn dependency:tree  
> on the webapp from the tutorial.
>
> [INFO] [dependency:tree {execution: default-cli}]
> [INFO] com.mycompany:myCocoonWebApp:war:1.0-SNAPSHOT
> [INFO] +- com.mycompany:myBlock1:jar:1.0-SNAPSHOT:compile
> [INFO] |  +- org.apache.cocoon:cocoon-core:jar:2.2.0:compile
> [INFO] |  |  +- org.apache.cocoon:cocoon-spring-configurator:jar: 
> 1.0.2:compile
> [INFO] |  |  |  +- org.springframework:spring-core:jar:2.5.1:compile
> [INFO] |  |  |  +- org.springframework:spring-context:jar: 
> 2.5.1:compile
> [INFO] |  |  |  |  \- aopalliance:aopalliance:jar:1.0:compile
> [INFO] |  |  |  +- org.springframework:spring-beans:jar:2.5.1:compile
> [INFO] |  |  |  +- org.springframework:spring-aop:jar:2.5.1:compile
> [INFO] |  |  |  \- org.springframework:spring-web:jar:2.5.1:compile
> [INFO] |  |  +- org.apache.cocoon:cocoon-configuration-api:jar: 
> 1.0.2:compile
> [INFO] |  |  +- org.apache.cocoon:cocoon-pipeline-components:jar: 
> 1.0.0:compile
> [INFO] |  |  |  +- org.apache.cocoon:cocoon-pipeline-impl:jar: 
> 1.0.0:compile
> [INFO] |  |  |  |  +- org.apache.cocoon:cocoon-pipeline-api:jar: 
> 1.0.0:compile
> [INFO] |  |  |  |  |  \- org.apache.excalibur.components:excalibur- 
> xmlutil:jar:2.2.1:compile
> [INFO] |  |  |  |  +- org.apache.excalibur.containerkit:excalibur- 
> instrument-api:jar:2.2.1:compile
> [INFO] |  |  |  |  \- jakarta-regexp:jakarta-regexp:jar:1.4:compile
> [INFO] |  |  |  +- org.apache.cocoon:cocoon-util:jar:1.0.0:compile
> [INFO] |  |  |  \- org.apache.cocoon:cocoon-xml-api:jar:1.0.0:compile
> [INFO] |  |  +- org.apache.cocoon:cocoon-sitemap-impl:jar: 
> 1.0.0:compile
> [INFO] |  |  |  +- org.apache.cocoon:cocoon-sitemap-api:jar: 
> 1.0.0:compile
> [INFO] |  |  |  +- commons-collections:commons-collections:jar: 
> 3.2:compile
> [INFO] |  |  |  \- commons-jxpath:commons-jxpath:jar:1.2:compile
> [INFO] |  |  |     \- junit:junit:jar:3.8:compile
> [INFO] |  |  +- org.apache.cocoon:cocoon-sitemap-components:jar: 
> 1.0.0:compile
> [INFO] |  |  +- org.apache.cocoon:cocoon-xml-resolver:jar: 
> 1.0.0:compile
> [INFO] |  |  |  \- org.apache.cocoon:cocoon-xml-impl:jar:1.0.0:compile
> [INFO] |  |  +- org.apache.cocoon:cocoon-thread-api:jar:1.0.0:compile
> [INFO] |  |  |  \- concurrent:concurrent:jar:1.3.4:compile
> [INFO] |  |  +- org.apache.cocoon:cocoon-xml-util:jar:1.0.0:compile
> [INFO] |  |  +- org.apache.excalibur.components:excalibur-pool- 
> api:jar:2.2.1:compile
> [INFO] |  |  |  \- org.apache.avalon.framework:avalon-framework- 
> api:jar:4.3.1:compile
> [INFO] |  |  +- org.apache.excalibur.containerkit:excalibur- 
> logger:jar:2.2.1:compile
> [INFO] |  |  +- org.apache.excalibur.components:excalibur-store:jar: 
> 2.2.1:compile
> [INFO] |  |  +- org.apache.avalon.framework:avalon-framework- 
> impl:jar:4.3.1:compile
> [INFO] |  |  +- commons-io:commons-io:jar:1.3.1:compile
> [INFO] |  |  +- commons-logging:commons-logging:jar:1.1:compile
> [INFO] |  |  +- commons-jexl:commons-jexl:jar:1.0:compile
> [INFO] |  |  +- xalan:xalan:jar:2.7.0:compile
> [INFO] |  |  +- xerces:xercesImpl:jar:2.8.1:compile
> [INFO] |  |  +- xml-apis:xml-apis:jar:1.3.02:compile
> [INFO] |  |  +- xml-resolver:xml-resolver:jar:1.2:compile
> [INFO] |  |  +- log4j:log4j:jar:1.2.14:compile
> [INFO] |  |  +- org.apache.cocoon:cocoon-store-impl:jar:1.0.0:runtime
> [INFO] |  |  |  \- net.sf.ehcache:ehcache:jar:1.2.4:runtime
> [INFO] |  |  \- org.apache.cocoon:cocoon-thread-impl:jar:1.0.0:runtime
> [INFO] |  +- org.apache.cocoon:cocoon-servlet-service-components:jar: 
> 1.0.0:compile
> [INFO] |  |  +- org.apache.cocoon:cocoon-servlet-service-impl:jar: 
> 1.0.0:compile
> [INFO] |  |  |  \- org.apache.excalibur.components:excalibur- 
> sourceresolve:jar:2.2.3:compile
> [INFO] |  |  \- org.apache.cocoon:cocoon-linkrewriter-impl:jar: 
> 1.0.0:compile
> [INFO] |  +- org.apache.cocoon:cocoon-template-impl:jar:1.1.0:compile
> [INFO] |  |  +- org.apache.cocoon:cocoon-expression-language-api:jar: 
> 1.0.0:compile
> [INFO] |  |  \- org.apache.cocoon:cocoon-expression-language- 
> impl:jar:1.0.0:compile
> [INFO] |  |     \- commons-lang:commons-lang:jar:2.3:compile
> [INFO] |  +- org.apache.cocoon:cocoon-flowscript-impl:jar: 
> 1.0.0:compile
> [INFO] |  |  \- rhino:js:jar:1.6R7:compile
> [INFO] |  \- org.apache.cocoon:cocoon-fop-impl:jar:1.0.0:compile
> [INFO] |     +- fop:fop:jar:0.20.5:compile
> [INFO] |     \- org.apache.cocoon:cocoon-batik-impl:jar:1.0.0:compile
> [INFO] |        +- batik:batik-awt-util:jar:1.6-1:compile
> [INFO] |        +- batik:batik-bridge:jar:1.6-1:compile
> [INFO] |        +- batik:batik-css:jar:1.6-1:compile
> [INFO] |        +- batik:batik-dom:jar:1.6-1:compile
> [INFO] |        +- batik:batik-ext:jar:1.6-1:compile
> [INFO] |        |  \- xml-apis:xmlParserAPIs:jar:2.0.2:compile
> [INFO] |        +- batik:batik-extension:jar:1.6-1:compile
> [INFO] |        +- batik:batik-gui-util:jar:1.6-1:compile
> [INFO] |        +- batik:batik-gvt:jar:1.6-1:compile
> [INFO] |        +- batik:batik-parser:jar:1.6-1:compile
> [INFO] |        +- batik:batik-rasterizer-ext:jar:1.6-1:compile
> [INFO] |        +- batik:batik-rasterizer:jar:1.6-1:compile
> [INFO] |        +- batik:batik-script:jar:1.6-1:compile
> [INFO] |        +- batik:batik-slideshow:jar:1.6-1:compile
> [INFO] |        +- batik:batik-squiggle:jar:1.6-1:compile
> [INFO] |        +- batik:batik-svg-dom:jar:1.6-1:compile
> [INFO] |        +- batik:batik-svggen:jar:1.6-1:compile
> [INFO] |        +- batik:batik-svgpp:jar:1.6-1:compile
> [INFO] |        +- batik:batik-swing:jar:1.6-1:compile
> [INFO] |        +- batik:batik-transcoder:jar:1.6-1:compile
> [INFO] |        +- batik:batik-ttf2svg:jar:1.6-1:compile
> [INFO] |        +- batik:batik-util:jar:1.6-1:compile
> [INFO] |        \- batik:batik-xml:jar:1.6-1:compile
> [INFO] \- com.mycompany:myBlock2:jar:1.0-SNAPSHOT:compile
>
>
> -Dom
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org

Reply via email to