You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by da...@cocoon.zones.apache.org on 2005/06/10 20:16:53 UTC

[DAISY] Created: The Cocoon 2.1.x Build System

A new document has been created.

Document ID: 28
Branch: main
Language: default
Name: The Cocoon 2.1.x Build System
Document Type: Simple Document
Created: 6/10/05 12:59:36 PM
Creator (owner): Mark Leicester
State: draft

Parts
=====

Content
-------
Mime type: text/xml
Size: 2833 bytes
Content:
<html imagetoolbarenabled="true">
<body>

<p>Cocoon's build system and its various options can be daunting for a first
time user, but you do not need to delve deeply to get a usable starting point
for your own application. If you are just starting out, it's recommended that
you <a href="daisy:12">build the default build</a> with everything enabled to
get a feel for what Cocoon is and can do. After that, come back here and follow
the steps below.</p>

<h1>Including and excluding blocks with local.blocks.properties</h1>

<p>The core Cocoon framework provides the necessary services for blocks. Blocks
add optional extra services. The build system allows you to remove them from the
build.</p>

<p>To configure the blocks you want included in your installation of Cocoon, do
not modify blocks.properties directly. Instead:</p>

<ol>
<li>Copy blocks.properties to new file called local.blocks.properties.</li>
<li>Edit local.blocks.properties, uncommenting the excludes for blocks you don't
want included.</li>
<li>Run "build clean".</li>
<li>Rebuild Cocoon with "build".</li>
</ol>

<p>Most user-oriented options are simple true/false/omitted settings but some
<br/>
have values that can be useful to set. For explanations of the options, see
<br/>
<a href="http://wiki.apache.org/cocoon/BuildProperties">BuildProperties</a>.</p>

<p>Read INSTALL.txt in the root directory. Here are some more details about how
the blocks build works:</p>

<p>Blocks are under:</p>

<pre>src/blocks/</pre>

<p>The code is in</p>

<pre>src/blocks/(blockname)/java</pre>

<p>The configuration x* files (which patch cocoon.roles, cocoon.xconf,
logkit.xconf, web.xml, sitemap.xmap, and the block-samples.xml file as needed)
are in:</p>

<pre>src/blocks/(blockname)/conf</pre>

<h4>How is it done?</h4>

<p>module.xml has been checked in the cocoon root; it's the
<a href="http://jakarta.apache.org/gump/">Gump</a> descriptor. Each block must
have a &lt;project&gt; section with dependencies, and other info. See supplied
module.xml and the <a href="http://jakarta.apache.org/gump/">Gump</a> project
for details.</p>

<p>Dependencies without the version attribute are intended to be compiled by the
build system. Otherwise, there is version="supplied".</p>

<p>The compile target has been changed. It calls a stylesheet in</p>

<pre>tools/src/build-blocks.xsl</pre>

<p>on the module.xml file and creates an Ant file that can resolve the
dependencies between docs, call the main compile-core target, and compile each
block.</p>

<p>The blocks are built in</p>

<pre>build/cocoon/blocks/(blockname)</pre>

<p>Each block will result in a (blockname)-block.jar in the build dir.</p>

<p>The confs are copied in the</p>

<pre>build/cocoon/blocks</pre>

<p>dir and then all inserted in the relevant descriptors during the webapp
target.</p>

</body>
</html>

Collections
===========
The document belongs to the following collections: ciatutorial