cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@cocoon.zones.apache.org
Subject [DAISY] Updated: Your first Cocoon application using Maven 2
Date Sun, 06 May 2007 16:58:36 GMT
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/6/07 4:58:28 PM
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: 5235 bytes (previous version: 3862 bytes)
Content diff:
(4 equal lines skipped)
    
    <ol>
    <li>Create a Cocoon block (the application resources and logic)</li>
+++ <li>Import the block as project in Eclipse</li>
    <li>Start the block as web application and access it from your browser</li>
    </ol>
    
(38 equal lines skipped)
    
    <p>As you can see,  the web application and the block are at the same level.</p>
    
+++ <h1>Import the block in Eclipse</h1>
+++ 
+++ <p class="note">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>
+++ 
+++ <pre>mvn eclipse:eclipse</pre>
+++ 
+++ <p>This will create the necessary project descriptors for Eclipse. In Eclipse
+++ 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
+++ <a href="http://maven.apache.org/guides/mini/guide-ide-eclipse.html">Maven Guide
+++ using Eclipse with Maven 2.x</a>.</p>
+++ 
    <h1>Run the block as Java web application</h1>
    
--- <p class="fixme">Explain cocoon:rcl, jetty:run + corresponding pom.xml sections
--- here.</p>
+++ <p>After creating the block you probably want to run it. For this purpose there
+++ is a Maven plugin, that generates a minimal web application that loads your
+++ block. The pom.xml of your block already contains all necessary configurations.
+++ You can 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/block1/</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 baund to the Maven build lifecycle. See the block's pom.xml for
+++ details.</p>
+++ 
    <h1>Conclusion and further information</h1>
    
--- <p>So far you have created a Cocoon application that consists of a web
--- application and a block. You have also been able to run the application in
--- Jetty.<br/>
--- Probably you wonder how you can do some useful stuff like writing your own
--- Cocoon pipeline or some Java code. For this purpose there are two more
--- getting-started documents:</p>
+++ <p>So far you have created a block. You have also been able to run the block in
+++ Jetty. Of course, that was only the first step in order to get a  "Hello world"
+++ as result. If you wonder how you can do some useful stuff like writing your own
+++ Cocoon pipeline or some Java code, there are more tutorials:</p>
    
    <ul>
    <li><a href="daisy:1290">Your first XML pipeline</a><br/>
    Cocoon has become famous for XML pipelines. At this tutorial you will learn how
    to setup your first pipeline and will learn the most important things about
    Cocoon sitemaps.</li>
    <li><a href="daisy:1291">Adding a second block</a><br/>
--- This tutorial created a web application that has a dependency on one block.
--- There are use cases that require more than one block, e.g. you want to have all
--- style specific resources within a single block that can be easily exchanged at
--- deployment time (-&gt; skinning).</li>
+++ While following this tutorial, you will creat a web application that has a
+++ dependency on one block. There are use cases that require more than one block,
+++ e.g. you want to have all style specific resources within a single block that
+++ can be easily exchanged at deployment time (aka skinning).</li>
    <li><a href="daisy:1297">Usage of the reloading classloader plugin</a><br/>
    The reloading classloader plugin enables rapid development of Cocoon
    applications since you don't have to restart the servlet container whenever one
    of your Java classes changes. Additionally it provides all settings to enable
    the reload of Cocoon resources too.</li>
    <li><a href="daisy:1263">Deploying a Cocoon application<br/>
    </a>Although you have already been able to run this block, you most probably
--- need a Java web application in order to deploy it in the servlet container of
--- your choice.<a href="daisy:1263"><br/>
+++ need a Java web application (war file) in order to deploy it to the servlet
+++ container (Tomcat, Jetty, etc.) of your choice.<a href="daisy:1263"><br/>
    </a></li>
    </ul>
    
--- <p>For the time being, we recommend the usage of Maven 2 as build system (though
--- there is no hard dependency on it). This has the advantage that the build system
--- is standardized and Cocoon web applications can reuse the toolset (creating
--- Eclipse configuration files, releasing, create documentation, etc.) that Maven
--- offers. More inforamtion about maven can be found at the project
--- <a href="http://maven.apache.org">website</a>. Especially we recommend</p>
+++ <p>For the time being, we <em>recommend</em> the usage of <em>Maven
2</em> as
+++ build system (though there is no hard dependency on it). This has the advantage
+++ that the build system is standardized and Cocoon web applications can reuse the
+++ toolset (create Eclipse configuration files, release, produce documentation,
+++ etc.) that Maven offers. More information about Maven 2 can be found at the
+++ project <a href="http://maven.apache.org">website</a>. Especially we recommend
+++ reading</p>
    
    <ul>
    <li>
(8 equal lines skipped)


Mime
View raw message