When executing 'mvn antrun:run' my tasks are not run.. I have an echo task, but no output is shown.. When running the phases that the tasks are bound to, they do get executed..
How do I specifically execute the tasks from the commandline?
When executing 'mvn antrun:run' my tasks are not run.. I have an echo task, but no output is shown.. When running the phases that the tasks are bound to, they do get executed..
How do I specifically execute the tasks from the commandline?
Assuming something like this is added to your pom.xml
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase><!--Change this to control when it runs -->
<configuration>
<tasks>
<echo message="Hello, maven"/>
</tasks>
</configuration>
<goals>
<goal>run</goal><!-- this is to call antrun:run -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Executing mvn package
will result in the following on your console
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[echo] Hello, maven
[INFO] Executed tasks
You can change the phase
to have your ant script run at whatever point you need.