Jenkins : Ant Plugin

Plugin Information

View Ant on the plugin site for more information.

Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:


This plugin adds Apache Ant support to Jenkins.This functionality used to be a part of the core, but as of Jenkins 1.431, it was split off into separate plugins.

Installation and usage


For this plugin to be used, an Ant installation must be specified in the global Jenkins configuration. It can be installed automatically:

Or manually:


  • Ant Version: Ant Installation to use. See previous section.
  • Targets: Ant targets to invoke. If left blank, default target will be invoked.
  • Build File: Build file to use. If left blank, plugin will look for build.xml in the root directory.
  • Properties: Additional parameters (typical properties file format) to pass to the build. They are passed like -D(name)=(value)
  • Java Options: Custom ANT_OPS.

An example of using the Ant task inside Pipeline DSL. This code snippet must be put inside a step block when using the declarative syntax.

withAnt(installation: 'myinstall') {
dir("scoring") {
if (isUnix()) {
sh "ant mytarget"
    } else {
bat "ant mytarget"

Change Log

Version 1.10 and later

See GitHub releases.

Version 1.9 (2018-10-29)

  • JENKINS-54133 - No ANSI coloring on slave agents in pipeline Closed as applied to Ant console notes.
  • JENKINS-52139 - Tests fail sometimes depending on the order Resolved

Version 1.8 (Jan 22, 2018)

Version 1.7 (Aug 21, 2017)

Version 1.6 (Aug 08, 2017)

Now requires Jenkins 1.642.x or newer.

Version 1.5 (May 9, 2017)

  • Add description to POM [JENKINS-40002]
  • Ant plugin does not correctly resolve and property resolving empty build parameter [JENKINS-41801]
  • AntInstallation not setting PATH+ANT [JENKINS-42382]
  • Improve test coverage

Version 1.4 (Aug 30, 2016)

  • Descriptors annotated with @Symbol [JENKINS-37388]
  • Update test dependencies.

Version 1.3 (May 11, 2016)

Version 1.2 (Feb 20, 2013)

  • Mmproved documentation
  • Translations
  • Label in Plugin Manager

Version 1.1 (Sep 19, 2011)

  • First release, split off from the core.

Version 1.0 (Sep 19, 2011)

  • Erroneous release. Initial release is 1.1


ant-buildstep.png (image/png)
ant-buildstep.png (image/png)
automatic.png (image/png)
manual.png (image/png)
usage.png (image/png)