Hawron
Offline Generation

Introduction

Cocoon's Offline-Generation-part (CocoonBean,CLI,Ant-Task) provides many useful options. Hawron provides most of them to be configurable from the GUI.

Global options, which configure Cocoon are located in the 'Project Settings'. The tasks enclose uri's, which should generated and maybe published in the same way.

A detailed overview of all options you will find on the Cocoon Offline Configuration site and a general overview on the Cocoon Offline Generation site.

Project

Choose 'New' from the menu or the toolbar. The 'Project Settings'-dialog choose a name for your project. Switch to the 'Cocoon-Main'-tab and set the Context-directory of your Cocoon-Application (or called 'webapp'-directory).

Hawron stores all project-related data (bookmarks, searchindex) in a directory '.hawron' inside the Context-directory, you can change this directory by setting a config-directory on the 'Main'-tab.

Tasks

With a Task you setup what the CocoonBean should generate. This can be single uri or a list of uri's.The concretely publishing is setup here too. The following table explains some options.

OptionMeaning
Follow LinksThe CocoonBean will follow all links in the page an generate the sub-pages too. This will build a complete site by setting only the start-page.
Confirm ExtensionThe CocoonBean append a extension on the generated file depending on the mime-type. This will not replace a extension. If you use 'foo/index' and serialize this as 'html' the result would be 'foo/index.html', serialize as 'xml' the result would be 'foo/index.xml'.
Build Only ChangesThis option allows to build only the modified documents.
Clean Directory before BuildingThis options is useful with the 'Build Only Changes'. Before all files were delete in the build-directory, so only the changed documents are in this directory after the offline generation.

Publishing

You must setup your FTP-,SFTP-,SMB-Share- or local-destination as 'Publish Target' in the Project-Settings. This allows to use the same destination in different tasks, without setup every time.

The tasks use the 'Publish Targets' and publish the result of the offline generation there.