antrun:run

Full name:

org.apache.maven.plugins:maven-antrun-plugin:3.0.0: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 <target/> 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.

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 false, the Maven build will proceed even if the Ant build fails. If it is true, 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.
User property is: maven.antrun.skip.
<sourceRoot> File - Deprecated. Use the build-helper-maven-plugin to bind source directories. For version 3.0.0, this parameter is only defined to break the build if you use it!
User property is: sourceRoot.
<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. For version 3.0.0, this parameter is only defined to break the build if you use it!
<testSourceRoot> File - Deprecated. Use the build-helper-maven-plugin to bind test source directories. For version 3.0.0, this parameter is only defined to break the build if you use it!
User property is: testSourceRoot.
<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 false, the Maven build will proceed even if the Ant build fails. If it is true, 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
  • User Property: maven.antrun.skip
  • Default: false

<sourceRoot>

Deprecated. Use the build-helper-maven-plugin to bind source directories. For version 3.0.0, this parameter is only defined to break the build if you use it!
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
  • User Property: 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. For version 3.0.0, this parameter is only defined to break the build if you use it!
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. For version 3.0.0, this parameter is only defined to break the build if you use it!
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
  • User Property: 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