I have just translated an ant project into maven however since maven does not really deal with deployment I introduce some antrun into the build. However when I try to execute it the plugin skips my tasks. for exemple when I run mvn clean antrun:run I get the following message: No ant target defined - SKIPPED. the same happends to the second phase in which I am trying to override the deployment phase to do an actual deploy rather to upload to a repository.
Please find below an extract of my pom.xml (type:pom):
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>clean</id>
<configuration>
<task>
<echo>Cleaning deployed website</echo>
</task>
<tasks>
<delete dir="${deployRoot}/mydir/${env}"/>
</tasks>
</configuration>
<phase>clean</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>deployment</id>
<configuration>
<task>
<echo>Deploying website</echo>
</task>
<tasks>
<echo>Copying website artifact to deployment </echo>
<mkdir dir="${deployRoot}/mydir/${env}" />
<unzip
src="${project.basedir}/target/${env}.${project.version}.zip"
dest="${deployRoot}/mydir/${env}" />
<chmod perm="ugo+rx">
<fileset dir="${deployRoot}/mydir/${env}/web-exploded/bin">
<include name="**/*.sh" />
<include name="**/*.bat" />
</fileset>
</chmod>
</tasks>
</configuration>
<phase>deploy</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>