---
title: "Task config"
source: https://dev.pageseeder.com/guide/publishing/ant_api/tasks/task_config.html
description: "The Universal Ant PS Config centralizes PageSeeder configuration parameters through XML elements and properties. It supports loading properties from files, setting individual entries, and provides access to system, document, batch, and user-related properties."
last_updated: 2026-08-11T16:17:52+10:00
tokens: ~2537
---

# Task config

The Universal Ant PS Config is used to centralize common configuration parameters and to maintain transparency about the config in use.

## Definition

```xml

<ps:config name="[name]" file="[file]">
  <entry key="[key]" value="[value]"/>
</ps:config>
```

## Attributes

| **Attribute** | Description | Required | Default |
| --- | --- | --- | --- |
| **name** | The name of the config - set to `default` if not specified | No |  |
| **file** | The path of a file containing the properties to load | No |  |
| **load-default** | Whether to load the default properties from PageSeeder (only applicable if script is run within PageSeeder). *When running a script within PageSeeder this MUST be `false` if setting the `password` or `client.id` properties.* | No | `true` |

## Entries

Entries can also be specified individually using the inner element

```xml

<entry key="[key]" value="[value]">
```

Each entry overwrites any existing one with the same name.

## Examples

Simplest case:

```xml
<ps:config />
```

 Reading properties from file:

```xml
<ps:config file="ps.properties" />
```

Named configuration:

```xml
<ps:config name="A" file="ps.properties" />
<ps:config name="B" file="ps.properties" />
```

Overriding file properties:

```xml
<ps:config file="ps.properties" >
  <entry key="scheme" value="https"/>
</ps:config>
```

Connect to a remote PageSeeder:

```xml
<ps:config name="destination"
           file="remote.properties"
           load-default="false" />
```

The `remote.properties` file (v6 only):

```properties
scheme=https
host=ps.example.org
port=443
site.prefix=/ps
client.id=cd4302db4b7a65b2
client.secret=R12Db1m_LGWZDV_nqUbqyx
```

> **Note:** If the OAuth `client.secret` is correct and the client’s grant type is `client_credentials` the `user.token` and `username` properties are set automatically.

## Properties

The task adds a list of properties to the current project. Each property can be accessed using the following pattern: 

```properties
ps.config.[config].[property]
```

where `[config]` is the name of the config (if none was specified, `default` is used) and `[property]` is the name of the property.

```properties
ps.config.default.[property]
```

Following are the names of properties created by the PS config. They correspond to the old ps-\* Ant properties except where '*new property*' is specified.

| **Property** | **Description** |
| --- | --- |
| `jsessionid` | The jsessionid for a PageSeeder user |
| `host` | Usually `localhost` unless publishing from a different PageSeeder. |
| `port` | Usually `8282` (the same as `apiPort`) unless publishing from a different PageSeeder. |
| `servlet.prefix` | The servletPrefix from PageSeeder `global.properties` – *DEPRECATED in v6.3 use **site.prefix** plus `/api` instead.* |
| `site.prefix` | The sitePrefix from PageSeeder `global.properties` |
| `global.template` | globalTemplate name from PageSeeder `global.properties` (e.g. `acmedefault`) |
| `group.id` | ID of group initiating the publish (e.g. `12`) |
| `group.name` | Name of group initiating the publish (e.g. `acme-demo`) |
| `group.folder` | Path of default group folder |
|  | `  /ps/acme/demo` |
| `group.folder.no.prefix` | Path of default group folder with no site prefix |
|  | `  /acme/demo` |
| `group.scheme` | Scheme to find URIs with (should be `http`) – *new property* |
| `group.host` | Usually the host in the PageSeeder URL (e.g. `ps.mycompany.com`) |
| `group.port` | Port to find URIs with (should be **`80`**) |
| `group.template` | Template of group/default group for URI (e.g. `acme`) – *previously ps-style-owner* |
| `custom.folder` | globalTemplate name from `global.properties` (e.g. `acmedefault`) – *DEPRECATED in v5.99 use `global.template` instead.* |
| `working` | Path to local unique working folder for this `group/document` |
| `working.root` | Path to root for all local working folders |
| `working.download` | Whether “Allow download of the working files” was ticked (see note). *Requires PageSeeder v6.3 or higher.* |
| `documents.root` | Path to PageSeeder documents folder |
| `web.root` | Path to the root for result files (see `session.folder`). |
| `engine.url` | The external URL used to contact the Publish Engine (e.g. `http://mycompany.com/ps/publish`) |
| `session.folder` | A unique folder name for the current PS user session to copy result files to (i.e. `${ps.config.default.web.root}/session/${ps.config.default.session.folder}` ) |

> **Note:** If the working folders are using too much storage space, your ANT script can delete them when it is finished, but this must only be done when not downloading the working files or an error is logged. The following ANT code achieves this. *Requires PageSeeder v6.3 or higher.* ```xml <target name="my-script"> ... <condition property="delete.working"> <equals arg1="${ps.config.default.working.download}" arg2="false" /> </condition> <antcall target="-delete-working" /> </target> <target name="-delete-working" if="delete.working"> <echo message="Deleting working folder" /> <delete dir="${working}" /> </target> ```

### Document/folder

The following parameters are only passed when a **Document/folder** is being published (not when a **Group** or **Batch** is being published and not when the document is in the Loading Zone):

| **Property** | **Description** |
| --- | --- |
| `uri.id` | URI id (e.g. `123`) |
| `uri.scheme` | URI scheme (e.g. `http`) |
| `uri.host` | URI host (e.g. `ps.mycompany.com`) |
| `uri.port` | URI port (e.g. **`80`**) |
| `uri.path` | URI path |
|  | `  /ps/acme/demo/minutes/2006-12-08.xml` |
| `uri.path.no.prefix` | URI path without prefix |
|  | `  /acme/demo/minutes/2006-12-08.xml` |
| `uri.path.no.group` | URI path without group prefix |
|  | `  /minutes/2006-12-08.xml` |
| `uri.folder` | URI folder |
|  | `  /ps/acme/demo/minutes` |
| `uri.folder.no.prefix` | URI folder with /ps prefix |
|  | ` /acme/demo/minutes` |
| `uri.folder.no.group` | URI folder without group prefix |
|  | `  /minutes` |
| `uri.filename` | Filename (e.g.  `2006-12-08.xml`) |
| `uri.filename.no.ext` | Filename without extension (e.g.  `2006-12-08`) |
| `uri.extension` | File extension (e.g.  `xml`) |
| `uri.document.id` | URI docid (e.g. `mydoc1`) |
| `uri.document.type` | PSML document type (e.g. `definition`) |
| `uri.publication.id` | The ID of the publication that URI is the root of (e.g. `mypub1`) |
| `uri.publication.type` | The type of the publication that URI is the root of (e.g. `report`) otherwise `default`. |
| `uri.publication.config` | The path to the `publication-config.xml` file for publication that URI is the root of. *Requires PageSeeder v6.3 or higher.* |
| `uri.word.export.config` | The path to the `word-export-config.xml` file for publication that URI is the root of. *Requires PageSeeder v6.3 or higher.* |
| `uri.word.export.template` | The path to the `word-export-template.docx` file for publication that URI is the root of. *Requires PageSeeder v6.3 or higher.* |

> **Note:** When exporting a folder it’s path is `uri.path` and it’s parent folder path is `uri.folder`.

### Batch

The following parameters are for processing a **Batch** of documents *(requires PageSeeder v5.98 or higher)*:

| **Parameter** | **Description** |
| --- | --- |
| `batch.ids` | A comma-separated list of URI IDs in the batch. For example: `123,456,789` |
| `search.question` | The search question used to select the batch IDs from (optional). For example: `green` |
| `search.question.fields` | The search question fields used to select the batch IDs from (optional). For example: `pstitle,pscontent,psfilename,psdocid,psid` |
| `search.filters` | The search filters used to select the batch IDs from (optional). For example: `psdocumenttype:product,pslabel:simple` |
| `search.ranges` | The search ranges used to select the batch IDs from (optional). For example: `psproperty-title:[A;C},ranges=psxrefcount:{50;]` |

### Loading Zone

The following parameters are only passed when a **Document** in the **Loading Zone** is being published.

| **Property** | **Description** |
| --- | --- |
| `upload.path` | Document path |
|  | `  /minutes/2006-12-08.xml` |
| `upload.folder` | Document folder |
|  |  `/minutes` |
| `upload.filename` | Filename (e.g.  `2006-12-08.xml`) |
| `upload.filename.no.ext` | Filename without extension (e.g.  `2006-12-08`) |
| `upload.extension` | File extension (e.g.  `xml`) |
| `upload.confirmed` | If script is run before displaying the Upload confirmation then `false`, otherwise `true` |

### Current user

The following parameters are only passed when the current user is logged in:

| **Property** | **Description** |
| --- | --- |
| `username` | The current user’s username (e.g.  `jsmith`) |
| `user.id` | The current users ID (e.g `123`) |
| `user.firstname` | The current user’s first name (e.g.  `John`) |
| `user.surname` | The current user’s surname (e.g.  `Smith`) |
| `user.token` | The current user’s access token (only if script was started using an access token) |

### Set manually

The following properties can only be set manually:

| **Property** | **Description** |
| --- | --- |
| `password` | The password used to connect to PageSeeder. When setting this property use `load-default="false"` on `<ps:config>` to ensure that the default **jsessionid** does not override the password. |
| `client.id` | The OAuth client ID used to connect to a remote PageSeeder server. When setting this property use `load-default="false"` on `<ps:config>` to ensure that the default **jsessionid** does not override the `user.token`. *Requires `client.secrect` and PageSeeder v6 or higher.* |
| `client.secret` | The OAuth client secret used to connect to a remote PageSeeder server. If the secret is correct the `user.token` and `username` properties are set automatically and may be used to access the remote PageSeeder. *Requires `client.id` and PageSeeder v6 or higher.* |

> **Note:** To see the list of configuration properties while running a script, you can either use the DEBUG or VERBOSE mode (developer only) or use the echo properties Ant task \<echoproperties /\>  

