Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add example of using with pipeline


  • 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 can be put inside a stage or a step when using the declarative syntax.

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

Change Log

Version 1.7 (Aug 21, 2017)