Search:

Apache » Lenya
project logo
  • Project
  • Developer
  • Community
  • Version 2.2
  • Version 2.0
  • Version 1.2
  • Version 1.2
    • Installation
      • Download
      • Subversion Access
      • Install Instructions
    • Tutorial
      • Introduction
      • 1. Understanding Lenya
      • 2. Installing Lenya
      • 3. Anatomy of the Pipeline
      • 4. Editing in Lenya
      • 5. Custom Navigation in Lenya
      • 6a. Mod Proxy and Lenya
      • 6b. Mod Proxy and Lenya
    • How-To
      • FAQ
      • New Publication
      • Deploy Publication
      • Look and Feel
      • Custom Resource Type
      • Adding Mime Types
      • Site Navigation
      • LDAP Authentication
      • CMS Menus
      • CMS Screens
      • Search Publications
      • External Data
      • Unit Tests
    • Components
      • Access Control
        • Basic Terms
        • Access Controllers
        • Access Controller Resolvers
        • Authenticators
        • Authorizers
        • Policies and Policy Managers
        • Accreditable Managers
        • SSL Encryption
      • Authoring
        • Adding a new document creator
        • Image Upload
        • OpenOffice
      • Deployment
        • Proxying
      • Editors
        • HTML Form Editor
        • HTML One Form Editor
        • Bitflux Editor
        • Kupu
        • Xopus
      • Layout
        • Navigation
        • XHTML templating
        • Serving static resources
        • Lenya Menubar
      • Publication
        • PageEnvelopeModule
        • Site tree
      • Resource Types
        • Resource Types
      • Revision Control
        • Revision Controller
        • RCML
        • Check In
        • Check Out
        • Revisions
        • Rollback
      • Repository
        • WebDAV Servers
      • Search
        • Searching with Lucene
      • URI Handling
        • URI Parametrizer
        • URI Scheme
        • Usecases
      • Asset Management
        • Asset Management
      • Link Management
        • Link Management
      • Meta Data
        • Meta Data Handling
      • Multilingual Documents
        • Multilingual Document Handling
      • Tasks
        • The Task Concept
        • Defining Tasks
        • The TaskAction
        • Scheduling a Task
        • Included tasks
          • AntTask
          • DefaultFilePublisher
          • StaticHTMLExporter
          • MailTask
        • Developing Tasks
      • Workflow
        • Terms
        • The State Machine
        • Configuration
        • Implementation
      • Site Management
        • Archive
        • Copy
        • Deactivate
        • Delete
        • Delete the trash
        • Move
        • Move Up/Down
        • Rename
        • Restore
    • Miscellaneous
      • Namespaces
      • Reserved Names
      • XInclude Processor
    • 1.2 API (Javadoc)

Current Event

Meeting Bad Säckingen 2009

Built with 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:

  • publication-id : the publication identifier
  • authoring-path : the authoring path
  • tree-authoring-path : the location of the tree.xml file
  • live-path : the live path
  • tree-live-path : the location of the tree.xml file
  • sources : a comma-separated list of files to publish

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.

Copyright © 1999-2009 The Apache Software Foundation. All rights reserved.