Skip to main content

 Publishing

Publishing PageSeeder data to print, the Web or both

Task publish

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

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

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

AttributeDescriptionRequiredDefault
groupThe full name of the group to publishYes
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 scriptYes
typeThe publish action type [export|publish|process]Yes
targetThe target name in the scriptYes
loglevelThe level of logging the script should output [info|verbose|warn|error|debug]Noinfo
failonerrorIf true, stop ANT build script on errorNotrue
pollingintervalThe number of milliseconds between each check to see if the upload is completeNo5000
configUniversal PS config nameNodefault

Elements

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

Element <parameter>

If specified, passes 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 using ${ps.param.[name]} after calling the <ps:config /> task.

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.
  • username – username of member for publish
  • user.token or jsessionid or password – access token or jsessionid or  username’s 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 exist 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