You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Teimatini Marín <te...@gmail.com> on 2010/02/20 00:17:52 UTC
Execute an ant task, but in any phase... just the task
How can I execute the following ant task? I don't want to attach it to
any phase... I only want to execute it from maven whenever I want...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>ftp</id>
<configuration>
<tasks>
<echo message="ANT" />
<ant antfile="build.xml" target="deploy" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>...</dependencies>
</plugin>
</plugins>
THANKS in advance.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Execute an ant task, but in any phase... just the task
Posted by Anders Hammar <an...@hammar.net>.
You can do that partly by configuring the plugin in the pluginManagement
section with the magic "default-cli" id:
http://maven.apache.org/guides/mini/guide-default-execution-ids.html
Passing on which target to execute is still to solve though
/Anders
2010/2/20 Teimatini Marín <te...@gmail.com>
> If I execute the ant task from maven I don't need to download, install
> and configure Ant manually... Maven do it for me. That's the only
> reason.
>
> I would be great if could do something similar to this:
> mvn antrun:run -Dtarget="mytarget"
>
> Thanks
>
> 2010/2/19 Wayne Fay <wa...@gmail.com>:
> >> How can I execute the following ant task? I don't want to attach it to
> >> any phase... I only want to execute it from maven whenever I want...
> >
> > Why bother using Maven in that case? Just call ant directly from the
> > command line...
> >
> > Wayne
> >
> > ---------------------------------------------------------------------
> > 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
>
>
Re: Execute an ant task, but in any phase... just the task
Posted by Teimatini Marín <te...@gmail.com>.
If I execute the ant task from maven I don't need to download, install
and configure Ant manually... Maven do it for me. That's the only
reason.
I would be great if could do something similar to this:
mvn antrun:run -Dtarget="mytarget"
Thanks
2010/2/19 Wayne Fay <wa...@gmail.com>:
>> How can I execute the following ant task? I don't want to attach it to
>> any phase... I only want to execute it from maven whenever I want...
>
> Why bother using Maven in that case? Just call ant directly from the
> command line...
>
> Wayne
>
> ---------------------------------------------------------------------
> 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
Re: Execute an ant task, but in any phase... just the task
Posted by Wayne Fay <wa...@gmail.com>.
> How can I execute the following ant task? I don't want to attach it to
> any phase... I only want to execute it from maven whenever I want...
Why bother using Maven in that case? Just call ant directly from the
command line...
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org