apache > lenya
 

The DefaultFilePublisher Task

The DefaultFilePublisher is a task that copies XML source files from the authoring directory to another location, usually the live directory. It needs the following parameters:

All paths are relative to the publication directory. Usually, the path information is read from the [publication-directory]/config/publishing/publisher.xconf file:


<publication>
  <authoring>
    <documents href="content/authoring"/>
    <tree href="content/authoring/tree.xml"/>
  </authoring>
  <live>
    <documents href="content/live"/>
    <tree href="content/live/tree.xml"/>
  </live>
  ...
</publication>

You can override the paths in the task configuration file tasks.xconf, e. g. to use several publishers to publish into different directories:


<tasks>

  <task id="publish-test" class="org.apache.lenya.cms.publishing.DefaultFilePublisher">
    <label>Publish</label>
    <parameter name="live-path" value="content/live-test"/>
    <parameter name="tree-live-path" value="content/live-test/tree.xml"/>
  </task>
  
  <task id="publish-real" class="org.apache.lenya.cms.publishing.DefaultFilePublisher">
    <label>Publish</label>
    <parameter name="live-path" value="content/live"/>
    <parameter name="tree-live-path" value="content/live/tree.xml"/>
  </task>

</tasks>

The remaining parameters, publication-id and sources, are passed to the task as request parameters.