Task publish
This task lets the Ant Script remotely invoke ANT scripts on a PageSeeder server.
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
Attribute | Description | Required | Default |
---|---|---|---|
group | The full name of the group to publish | Yes | |
uri | The URI ID of the document to publish (document publish scripts only) | No | |
documenttype | The document type of the document to publish (document publish scripts only) | No | |
project | The project containing the ANT script | Yes | |
type | The publish action type [export|publish|process] | Yes | |
target | The target name in the script | Yes | |
loglevel | The level of logging the script should output [info|verbose|warn|error|debug] | No | info |
failonerror | If true , stop ANT build script on error | No | true |
pollinginterval | The number of milliseconds between each check to see if the upload is complete | No | 5000 |
config | Universal PS config name | No | default |
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.
Attribute | Description | Required |
---|---|---|
name | The name of the parameter | Yes |
value | The value of the parameter | Yes |
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