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: 5/22/07 6:11:26 AM
Updated by: Reinhard Pötz
A new version has been created, state: publish
Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 5658 bytes (previous version: 5941 bytes)
Content diff:
<html>
<body>
--- <p class="fixme">The Maven archetype has to be changed in order to use the
--- Cocoon plugin!!!</p>
---
<p>In this tutorial, you will:</p>
<ol>
(11 equal lines skipped)
<pre>mvn archetype:create
-DarchetypeGroupId=org.apache.cocoon
-DarchetypeArtifactId=cocoon-22-archetype-block
--- -DarchetypeVersion=1.0.0-M5
+++ -DarchetypeVersion=1.0.0-RC1
-DgroupId=com.mycompany
-DartifactId=myBlock1
</pre>
<p class="note">Once again for copy and paste without line feeds:<br/>
<tt>mvn archetype:create -DarchetypeGroupId=org.apache.cocoon
--- -DarchetypeArtifactId=cocoon-22-archetype-block -DarchetypeVersion=1.0.0-M5
+++ -DarchetypeArtifactId=cocoon-22-archetype-block -DarchetypeVersion=1.0.0-RC
-DgroupId=com.mycompany -DartifactId=myBlock1</tt></p>
--- <p class="note"><tt>Note: if you are using a cocoon binary build from svn
trunk
--- then you probably want to change the archetypeVersion to the most recent
one,
--- matching the svn trunk. (see
--- [cocoon-svn]/tools/archetypes/cocoon-22-archetype-block/pom.xml)</tt></p>
+++ <p class="note">Note: if you are using a cocoon binary build from svn trunk
then
+++ you probably want to change the archetypeVersion to the most recent one,
+++ matching the svn trunk. (see
+++
<tt>[<tt>c</tt></tt><tt>ocoon-svn]/tools/archetypes/cocoon-22-archetype-block/pom.xml</tt>)
+++ </p>
--- <p>Change into the <tt>myBlock1</tt> directory and call</p>
---
--- <pre>mvn install</pre>
---
--- <p>from there. This installs the block into your local Maven repository in
--- <tt>~/.m2/repository</tt>.</p>
---
<p>Looking at the filesystem, you should find following directory
structure:</p>
<pre>getting-started-app
--- +-<tt>myCocoonWebapp
--- | +-pom.xml
--- | +-src
--- | +-[...]
--- +-</tt><tt>myBlock1
+++ <tt> +-</tt><tt>myBlock1
+-pom.xml
+-src
+-[...]
(14 equal lines skipped)
you can import the project into your workspace: <em>File - Import - General
-
Existing Projects</em>.</p>
--- <p>If that's the first time you use Eclipse together with a project
created by
--- Maven, we recomment to read the
+++ <p>If that's the first time you use Eclipse together with a project created
by
+++ Maven 2, we recomment to read the
<a href="http://maven.apache.org/guides/mini/guide-ide-eclipse.html">Maven
Guide
using Eclipse with Maven 2.x</a>.</p>
(11 equal lines skipped)
<p>You can then run</p>
--- <pre>mvn compile</pre>
---
--- <p>and then</p>
---
<pre>mvn jetty:run</pre>
<p>and point your browser at <tt>http://localhost:8888/myBlock1/</tt> and
get a
hello world page.</p>
<p class="note">The mentioned minimal web application is automatically
created,
--- when mvn compile is invoked. This happens because the rcl goal of the Cocoon
--- plugin is bound to the Maven build lifecycle. See the block's pom.xml for
--- details.</p>
+++ 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>
--- <p class="note">This process can be manually triggered with mvn
cocoon:rcl</p>
+++ <p class="note">This process can be manually triggered with <tt>mvn
+++ cocoon:rcl</tt>.</p>
<h1>Conclusion and further information</h1>
(45 equal lines skipped)