---
title: "Tasks"
source: https://dev.pageseeder.com/guide/publishing/ant_api/tasks.html
description: "The Ant tasks API provides programmatic access to PageSeeder functionality, enabling developers to invoke encapsulated processes. Tasks can run within the Publisher or standalone, with proper configuration and jar files required for each context."
last_updated: 2026-09-14T15:03:38+10:00
tokens: ~381
---

# Ant tasks

The [publish API](/guide/publishing/ant_api.md) is based on a set of Ant tasks that provide programmatic access to PageSeeder functionality. Through the Ant API, PageSeeder exposes processes that are encapsulated as Ant tasks and can be invoked as:

```xml

<ps:mytask src="[source]" ... />
```

Where the Ant task is insufficient for a particular challenge, [Ant Extensions](/guide/publishing/ant_api/extensions.md) are available. 

## Usage

PageSeeder Ant task can usually be run in two different contexts: within the PageSeeder [Publisher](/reference/glossary/publisher.md) or as standalone (in the command-line or a code editor such as Eclipse).

### Publisher

Using PageSeeder Ant tasks in [publish scripts](/reference/glossary/publish_script.md) with the Publish Engine requires no additional download. If properly installed, the existing environment is already configured appropriately.

### Standalone

When running the Ant tasks as standalone scripts, the different jar files must be on the Ant classpath: the main API jar file (pageseeder-publish-api-x.jar) – [Download](/download/install.md).

> **Note:** The version of the `pageseeder-publish-api` must be the same as the PageSeeder Server. The version is listed on the lower left of all PageSeeder pages in v5 or on the user account drop down menu in v6.

Tasks must be defined in the Ant script. Add the following attribute to the `<project>` element at the top of the Ant file:

```xml
     xmlns:ps="antlib:com.pageseeder.publishapi.ant"
```

