Tag Archives: maven-antrun-plugin

Maven – Run maven-antrun-plugin without attaching to a lifecycle phase

Long time ago, i had a post about running Ant in Maven using the maven-antrun-plugin but the Ant script would be attached to the Maven lifecycle phase.


Sometimes you may just want to run a standalone Ant task in Maven without being involved in any lifecycle phase. In that case, you can try configure the maven-antrun-plugin as follow.

      <echo message="Hello world"/>


You can run it directly by

  • mvn antrun:run


Done =)

Reference: StackOverflow – How to call maven-antrun-plugin target without attach execution to a maven phase ?