maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Connolly" <stephen.alan.conno...@gmail.com>
Subject Re: How to emulate the concept of an Ant target?
Date Tue, 01 Jul 2008 07:38:23 GMT
Option 1.

a shell script/batch file that just does

    mvn plugin1:goalA plugin2:goalB plugin3:gaolC

This is especially handy if some of the goals should only be run on
the local directory while others need to run throughout the tree, the
script can invoke maven multiple times with and without the -N flag

Option 2.

a custom profile that binds everything you need to the validate
phase... thus you just go

     mvn -Pmytask validate

Downside: this is obviously a hack

Option 3.

write your own plugin that binds all the other plugins to phases as
needed then you can do

     mvn myplugin:do-it-all

This is what most people consider the "right way"

On Tue, Jul 1, 2008 at 8:00 AM, Andrei Ivanov <andrei.ivanov@gmail.com> wrote:
> Hello,
> I'm a Maven newbie and I'm having some difficulties understanding some
> concepts, so I hope you can help me...
> In an Ant build.xml, I could create a target in which I could call tasks:
> <target name="targetA">
>   <task1 />
>   <task2 />
> </target>
>
> I've read about the lifecycle concepts of Maven, and I know that a
> plugin has one or more goals and that I can create an execution and
> specify which goal(s) to be attached to a certain phase.
>
> My problem is that I don't want to use any of the existing lifcycles/phases.
> I just want to call a sequence of goals of some plugins, grouped in a
> target/goal(I saw that in Maven 1 custom goals could be defined in
> maven.xml). These goals that I want to execute don't have anything to
> do with packaging...
>
> How can I do that?
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message