You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by laredotornado-3 <la...@gmail.com> on 2011/09/08 19:01:50 UTC

Trouble getting antrun plugin to run

Hi,

I'm using Maven 3.0.3.  I have the below in the <build><plugins> section of
my pom.  However, when I run "mvn clean deploy" the echo message is never
printed out.  Does anyone know why my antrun plugin isn't running?

                                        <plugin>
                                               
<artifactId>maven-antrun-plugin</artifactId>
                                                <version>1.6</version>
                                                <executions>
                                                        <execution>
                                                               
<phase>install</phase>
                                                               
<configuration>
                                                                       
<echo message="Executing target" />
                                                                       
<condition property="is-release">
                                                                               
<not>
                                                                                       
<contains string="${project.version}" substring="SNAPSHOT"/>
                                                                               
</not>
                                                                       
</condition>
                                                                       
<fail if="is-release" message="You can only release snapshot versions of
this project."/>
                                                               
</configuration>
                                                                <goals>
                                                                       
<goal>run</goal>
                                                                </goals>
                                                        </execution>
                                                </executions>
                                        </plugin>

Thanks, - Dave

--
View this message in context: http://maven.40175.n5.nabble.com/Trouble-getting-antrun-plugin-to-run-tp4783208p4783208.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Trouble getting antrun plugin to run

Posted by Guillaume Polet <gu...@gmail.com>.
I think you need to attach it to a phase:

   	<execution>
             <phase>package</phase>  <!-- for example here package-->
             ...
           </execution>


Cheers,

Guillaume
Le 8/09/2011 19:01, laredotornado-3 a écrit :
> Hi,
>
> I'm using Maven 3.0.3.  I have the below in the<build><plugins>  section of
> my pom.  However, when I run "mvn clean deploy" the echo message is never
> printed out.  Does anyone know why my antrun plugin isn't running?
>
>                                          <plugin>
>
> <artifactId>maven-antrun-plugin</artifactId>
>                                                  <version>1.6</version>
>                                                  <executions>
>                                                          <execution>
>
> <phase>install</phase>
>
> <configuration>
>
> <echo message="Executing target" />
>
> <condition property="is-release">
>
> <not>
>
> <contains string="${project.version}" substring="SNAPSHOT"/>
>
> </not>
>
> </condition>
>
> <fail if="is-release" message="You can only release snapshot versions of
> this project."/>
>
> </configuration>
>                                                                  <goals>
>
> <goal>run</goal>
>                                                                  </goals>
>                                                          </execution>
>                                                  </executions>
>                                          </plugin>
>
> Thanks, - Dave
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Trouble-getting-antrun-plugin-to-run-tp4783208p4783208.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org