Return-Path:
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
+++ 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.Get Maven (2.0.9 or above)
+++=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.
=20Run the following Maven command:
=20 (50 equal lines skipped) =20Cocoon 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.
=20Change 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