You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Baz <ba...@gmail.com> on 2007/05/01 02:48:52 UTC

How to run ant tasks in maven 2?

All,

I read the page in
http://maven.apache.org/plugins/maven-antrun-plugin/usage.html but i still
cannot make a simple ant task work in maven 2. Please help.

Here is my code:

  <plugin>
    <artifactId>maven-antrun-plugin</artifactId>
      <executions>
        <execution>
        <phase>deploy</phase>
          <configuration>
            <tasks>
              <target name="aaa">
                <echo message="Testing"/>
              </target>
            </tasks>
          </configuration>
          <goals>
            <goal>run</goal>
          </goals>
        </execution>
      </executions>
  </plugin>

RE: How to run ant tasks in maven 2?

Posted by Doug Tanner <do...@benefitfocus.com>.
You do not need the <target> tags.  Just use:

<tasks>
	<echo message="testing"/>
</tasks>

Doug Tanner
 

> -----Original Message-----
> From: Baz [mailto:baztheman@gmail.com]
> Sent: Monday, April 30, 2007 8:49 PM
> To: Maven Users List
> Subject: SPAM:How to run ant tasks in maven 2?
> 
> All,
> 
> I read the page in
> http://maven.apache.org/plugins/maven-antrun-plugin/usage.html but i
still
> cannot make a simple ant task work in maven 2. Please help.
> 
> Here is my code:
> 
>   <plugin>
>     <artifactId>maven-antrun-plugin</artifactId>
>       <executions>
>         <execution>
>         <phase>deploy</phase>
>           <configuration>
>             <tasks>
>               <target name="aaa">
>                 <echo message="Testing"/>
>               </target>
>             </tasks>
>           </configuration>
>           <goals>
>             <goal>run</goal>
>           </goals>
>         </execution>
>       </executions>
>   </plugin>


****************************************************************************************
BENEFITFOCUS.COM CONFIDENTIALITY NOTICE: This electronic message is intended only for the individual or entity to which it is addressed and may contain information that is confidential and protected by law. Unauthorized review, use, disclosure, or dissemination of this communication or its contents in any way is prohibited and may be unlawful. If you are not the intended recipient or a person responsible for delivering this message to an intended recipient, please notify the original sender immediately by e-mail or telephone, return the original message to the original sender or to bfpostmaster@benefitfocus.com, and destroy all copies or derivations of the original message. Thank you.  (BFeComNote Rev. 08/01/2005)
***************************************************************************************

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


Re: How to run ant tasks in maven 2?

Posted by Nico Steppat <st...@gmail.com>.
Look at the maven book, there are lots of examples, for example:

http://www.sonatype.com/book/lifecycle.html

Regards,
Nico

On 4/30/07, Baz <ba...@gmail.com> wrote:
> All,
>
> I read the page in
> http://maven.apache.org/plugins/maven-antrun-plugin/usage.html but i still
> cannot make a simple ant task work in maven 2. Please help.
>
> Here is my code:
>
>   <plugin>
>     <artifactId>maven-antrun-plugin</artifactId>
>       <executions>
>         <execution>
>         <phase>deploy</phase>
>           <configuration>
>             <tasks>
>               <target name="aaa">
>                 <echo message="Testing"/>
>               </target>
>             </tasks>
>           </configuration>
>           <goals>
>             <goal>run</goal>
>           </goals>
>         </execution>
>       </executions>
>   </plugin>
>


-- 
Nico Steppat
--------------------------------------------------
nico.steppat@caelum.com.br
Caelum - Ensino e Soluções em Java
www.caelum.com.br

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


Re: How to run ant tasks in maven 2?

Posted by Baz <ba...@gmail.com>.
All,

I think I got it. I shouldnt put "target" line in the pom.xml. It works
without it.

Thank you.

A.


On 4/30/07, Jared Blitzstein <ma...@blitzstein.net> wrote:
>
> Are you running the deploy goal or something else that executes that
> phase? Also I'm not sure if you're supposed to define a target.
>
> On Apr 30, 2007, at 8:48 PM, Baz wrote:
>
> > All,
> >
> > I read the page in
> > http://maven.apache.org/plugins/maven-antrun-plugin/usage.html but
> > i still
> > cannot make a simple ant task work in maven 2. Please help.
> >
> > Here is my code:
> >
> >  <plugin>
> >    <artifactId>maven-antrun-plugin</artifactId>
> >      <executions>
> >        <execution>
> >        <phase>deploy</phase>
> >          <configuration>
> >            <tasks>
> >              <target name="aaa">
> >                <echo message="Testing"/>
> >              </target>
> >            </tasks>
> >          </configuration>
> >          <goals>
> >            <goal>run</goal>
> >          </goals>
> >        </execution>
> >      </executions>
> >  </plugin>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: How to run ant tasks in maven 2?

Posted by Jared Blitzstein <ma...@blitzstein.net>.
Are you running the deploy goal or something else that executes that  
phase? Also I'm not sure if you're supposed to define a target.

On Apr 30, 2007, at 8:48 PM, Baz wrote:

> All,
>
> I read the page in
> http://maven.apache.org/plugins/maven-antrun-plugin/usage.html but  
> i still
> cannot make a simple ant task work in maven 2. Please help.
>
> Here is my code:
>
>  <plugin>
>    <artifactId>maven-antrun-plugin</artifactId>
>      <executions>
>        <execution>
>        <phase>deploy</phase>
>          <configuration>
>            <tasks>
>              <target name="aaa">
>                <echo message="Testing"/>
>              </target>
>            </tasks>
>          </configuration>
>          <goals>
>            <goal>run</goal>
>          </goals>
>        </execution>
>      </executions>
>  </plugin>


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