Publishing

Publishing PageSeeder data to print, the Web or both

Task publish

This task lets the Ant Script remotely invoking ANT scripts on a PageSeeder server.

Note

This task is available in PageSeeder v5.8900 and above.

Definition

<ps:publish
    group="[full groupname]"
    uri="[uri ID]"
    documenttype="[PSML document type]"
    project="[project containing script]"
    type="[import|export|publish|process|preview]"
    target="[target name]"
    loglevel="[info|verbose|warn|error|debug]"
    failonerror="[true|false]"
    pollinginterval="[milliseconds]"
    config="[config name]">
  <parameter name="[param name]"
             value="[param value]"/>
  ... 
</ps:publish>

 

Attributes

AttributeDescriptionRequired
groupThe full name of the group to publish.Yes
uriThe URI ID of the document to publish (document publish scripts only).No
documenttypeThe document type of the document to publish (document publish scripts only).No
projectThe project containing the ANT script.Yes
typeThe publish action type [import|export|publish|process].Yes
targetThe target name in the script.Yes
loglevelThe level of logging the script should output [info|verbose|warn|error|debug] - default "info".No
failonerrorIf "true", stop ANT build script on error - default "true".No
pollingintervalThe number of milliseconds between each check to see if the upload is complete - default "5000".No
configUniversal PS config name - default "default".No

Elements

Elements are not required but can be used to set more options.

Element <parameter>

If specified will pass one or more parameter values to the ANT script.

AttributeDescriptionRequired
nameThe name of the parameterYes
valueThe value of the parameterYes

Parameter values can be used in the ANT script via ${ps.param.[name]} after calling the <ps:config /> task. e.g.

<ps:config />
<echo>The xyz parameter is ${ps.param.xyz}</echo>

Environment

This task uses the following PS config environment properties:

  • scheme – scheme for connecting to PageSeeder,
  • host – host for connecting to PageSeeder,
  • port – port for connecting to PageSeeder,
  • servlet.prefix – servlet prefix for connecting to PageSeeder – default  /ps/servlet,
  • site.prefix – site prefix for connecting to PageSeeder – default  /ps,
  • jsessionid or username/password – jsessionid pr username/password for connecting to PageSeeder.

Errors

Possible errors are:

  • Error connecting to the Pageseeder server – if scheme, host or port are incorrect.
  • Failed to publish – Invalid HTTP Status: 401 – if username or password are incorrect.
  • Failed to publish – Invalid HTTP Status: 403 – if group doesn't exists or user doesn't have access to it.
  • An error occurred while running the Ant script.

Examples

<ps:config file="pageseeder.properties"/>

    <ps:publish group="acme-demo"
                project="acme"
                type="publish"
                target="my-publish">

      <parameter name="index"
                 value="true"/>
  </ps:publish>

In pageseeder.properties file:

scheme=http
host=ps.acme.com
port=8282
servlet.prefix=/ps/servlet
site.prefix=/ps
username=myusername
password=mypassword

Created on , last edited on