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
=====
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)
<li>Start the block as a web application and access it from your
browser</li>
</ol>
--- <p class="note">First, make sure that you have Maven 2.0.9 or above
installed.
--- You can check this by calling <tt>mvn --version</tt> from the command line.
If
--- this doesn't work for you, read the
+++ <h1>Get Maven (2.0.9 or above)</h1>
+++
+++ <p>Make sure that you have Maven 2.0.9 or above installed. You can check
this by
+++ calling <tt>mvn --version</tt> from the command line. If this doesn't work
for
+++ you, read the
<a
href="http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html">Maven
in 5 Minutes</a> tutorial.</p>
(9 equal lines skipped)
have a particular expected <a href="daisy:1263">directory and file
structure</a>.</p>
--- <p class="note">You could manually create your blocks, but a simpler and
less
--- error-prone process is to use Maven's 'archetype' plugin. This allows you
to
--- select from a list of block types and have Maven create them for you. By
--- default, the list of Maven archetypes is quite large. For convenience, a
--- catalog of Cocoon specific archetypes is available on the Cocoon web site
and
--- you will make use of this in the following instructions.</p>
+++ <p>You could manually create your blocks, but a simpler and less error-prone
+++ process is to use Maven's 'archetype' plugin. This allows you to select
from a
+++ list of block types and have Maven create them for you.</p>
<p>Run the following Maven command:</p>
(50 equal lines skipped)
<h1>Import the block in Eclipse</h1>
--- <p class="note">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.<br/>
--- 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.</p>
+++ <p>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 similar
procedure
+++ to load the block in the IDE of your choice.</p>
<p>Change into the <tt>myBlock1</tt> directory and call</p>
(17 equal lines skipped)
<pre>mvn jetty:run</pre>
<p>and point your browser at <tt>http://localhost:8888/myBlock1/</tt> and
get a
--- hello world page.</p>
+++ "hello world" page. You should see the message:</p>
--- <p class="note">The mentioned minimal web application is automatically
created,
--- when <tt>mvn jetty:run</tt> is invoked. This happens because the rcl goal
of the
--- Cocoon plugin is bound to the Maven build lifecycle which is invoked too,
when
--- the jetty:run goal is executed. See the block's <tt>pom.xml </tt>for
details.
--- </p>
+++ <pre>This is a message coming from a Spring bean.
+++ </pre>
--- <p class="note">This process can be manually triggered with <tt>mvn
--- cocoon:prepare</tt> too.</p>
+++ <p>The generated webapp is created, when <tt>mvn jetty:run</tt> is invoked,
+++ because the rcl goal of the Cocoon plugin is bound to the 'compile' phase
of the
+++ Maven build lifecycle, which is triggered when the jetty:run goal is
executed
+++ (see the block's <tt>pom.xml </tt>for details). This process can be also
+++ manually invoked with <tt>mvn cocoon:prepare</tt>.</p>
<h1>Conclusion and further information</h1>
(43 equal lines skipped)