antrun:run

Full name:

org.apache.maven.plugins:maven-antrun-plugin:1.7:run

Description:

Maven AntRun Mojo.
This plugin provides the capability of calling Ant tasks from a POM by running the nested ant tasks inside the <tasks/> parameter. It is encouraged to move the actual tasks to a separate build.xml file and call that file with an <ant/> task.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • The goal is thread-safe and supports parallel builds.

Optional Parameters

Name Type Since Description
customTaskPrefix String 1.5 The xml tag prefix to use for the built in Ant tasks. This prefix needs to be prepended to each task referenced in the antrun target config. For example, a prefix of "mvn" means that the attachartifact task is referenced by "<mvn:attachartifact>" The default value of an empty string means that no prefix is used for the tasks.
exportAntProperties boolean 1.7 Specifies whether the Ant properties should be propagated to the Maven properties.
Default value is: false.
failOnError boolean 1.7 Specifies whether a failure in the ant build leads to a failure of the Maven build. If this value is 'true', the Maven build will proceed even if the ant build fails. If it is 'false', then the Maven build fails if the ant build fails.
Default value is: true.
propertyPrefix String 1.4 String to prepend to project and dependency property names.
skip boolean 1.7 Specifies whether the Antrun execution should be skipped.
Default value is: false.
sourceRoot File - Deprecated. Use the build-helper-maven-plugin to bind source directories
target PlexusConfiguration 1.5 The XML for the Ant target. You can add anything you can add between <target> and </target> in a build.xml.
tasks PlexusConfiguration - Deprecated. Use target instead
testSourceRoot File - Deprecated. Use the build-helper-maven-plugin to bind test source directories
versionsPropertyName String - The name of a property containing the list of all dependency versions. This is used for the removing the versions from the filenames.
Default value is: maven.project.dependencies.versions.

Parameter Details

customTaskPrefix:

The xml tag prefix to use for the built in Ant tasks. This prefix needs to be prepended to each task referenced in the antrun target config. For example, a prefix of "mvn" means that the attachartifact task is referenced by "<mvn:attachartifact>" The default value of an empty string means that no prefix is used for the tasks.
  • Type: java.lang.String
  • Since: 1.5
  • Required: No

exportAntProperties:

Specifies whether the Ant properties should be propagated to the Maven properties.
  • Type: boolean
  • Since: 1.7
  • Required: No
  • Default: false

failOnError:

Specifies whether a failure in the ant build leads to a failure of the Maven build. If this value is 'true', the Maven build will proceed even if the ant build fails. If it is 'false', then the Maven build fails if the ant build fails.
  • Type: boolean
  • Since: 1.7
  • Required: No
  • Default: true

propertyPrefix:

String to prepend to project and dependency property names.
  • Type: java.lang.String
  • Since: 1.4
  • Required: No

skip:

Specifies whether the Antrun execution should be skipped.
  • Type: boolean
  • Since: 1.7
  • Required: No
  • Expression: ${maven.antrun.skip}
  • Default: false

sourceRoot:

Deprecated. Use the build-helper-maven-plugin to bind source directories
This folder is added to the list of those folders containing source to be compiled. Use this if your ant script generates source code.
  • Type: java.io.File
  • Required: No
  • Expression: ${sourceRoot}

target:

The XML for the Ant target. You can add anything you can add between <target> and </target> in a build.xml.
  • Type: org.codehaus.plexus.configuration.PlexusConfiguration
  • Since: 1.5
  • Required: No

tasks:

Deprecated. Use target instead
The XML for the Ant task. You can add anything you can add between <target> and </target> in a build.xml.
  • Type: org.codehaus.plexus.configuration.PlexusConfiguration
  • Required: No

testSourceRoot:

Deprecated. Use the build-helper-maven-plugin to bind test source directories
This folder is added to the list of those folders containing source to be compiled for testing. Use this if your ant script generates test source code.
  • Type: java.io.File
  • Required: No
  • Expression: ${testSourceRoot}

versionsPropertyName:

The name of a property containing the list of all dependency versions. This is used for the removing the versions from the filenames.
  • Type: java.lang.String
  • Required: No
  • Default: maven.project.dependencies.versions