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.
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.
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.
| Option | Meaning |
| Follow Links | The 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 Extension | The 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 Changes | This option allows to build only the modified documents. |
| Clean Directory before Building | This 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. |
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.
Add a Publish Target in the ProjectSettings dialog. Choose the 'Publishing'-Tab of 'Project Settings'. You will see a list with your Targets. For a new Target fill out the fields below the list and hit 'Add'. The passwords are stored encrypt, but you can omit the password-field (before publishing Hawron will always popup a dialog for the password then).
The following table will gives a short overview:
| Field | Example | Hint |
| Title | my ftp-site | |
| URL | ftp://www.my-site.com | Supported protocols: ftp, sftp, smb, webdav, file. The smb-protocol needs the share-name append on the url. |
| Username | myusername | |
| Password | mypassword | You can omit this if you. |
Select the Task which results you want publish. Add there a Publishing Destination. Set a title, choose the source-directory, set the destination directory (relative/absolute to the URL from the publish-target) and select the PublishTarget). You can setup as much as you need.
The following table gives a short overview
| Field | Example | Hint |
| Title | news-pages | The title for the list above |
| Publish from | foo/index.html | use the absolute or relative (to the build-directory) path of your generated files. Regard uri-append/insert/replace-pattern you have choose on the 'Processing'-tab |
| Publish to | html | The SFTP-Target needs an absolute path to the destination directory ('/home/username/html' instead of 'html'). |
| Publish Target | Select the Publish Target you want to use (like 'my ftp-site'). |