You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Roshan A. Punnoose" <rp...@proteus-technologies.com> on 2007/11/01 13:19:31 UTC

Maven alias phases/goals

Is it possible in maven to alias a certain phase or goal? For example, I
have a goal called sayhi:hello, and all I want a user to enter is mvn
sayHello to get it to run. Is that possible?

Roshan

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


Re: Maven alias phases/goals

Posted by Wayne Fay <wa...@gmail.com>.
Who said anything about Ant doing things wrong? I simply submit that
Maven's approach is rather unlike Ant's approach, and you need to
understand how Maven does things which will require some reading on
your part. (You may not remember it now, but at some point you had to
do some reading about Ant, too.)

If you bothered to read the documentation I suggested, you would know
how Maven goals and build phases work, the relationship between them,
and how to attach plugins to your build. This would remove the need to
type the plugin goals on the command line.

ps As a new subscriber to this list, I find it odd that you feel so
strongly about what is appropriate (and not) when it comes to
responses. Remember that no one here is getting paid for their
participation, and that the help you get on the Internet is sometimes
worth exactly what you paid for it (and many times worth a lot more).
If you're consistently unhappy with the responses you receive on this
list, you are welcome to pay one of the several Maven consulting firms
for their assistance with your build.

Wayne

On 11/1/07, Roshan A. Punnoose <rp...@proteus-technologies.com> wrote:
> Just because Maven provides another way at looking at builds doesn't mean that some of the things that Ant did are wrong.
>
> I've been doing some reading online and it seems like you are allowed to create "aggregrator" plugins? Is there any good documentation on this?
>
> p.s. Maven provides phases that mojos are supposed to attach to, but one of Ant's greatest strengths is doing sequential building. As a developer I can easily write out the full command list for 10 goals in the right order, but I don't want to subject every other developer to that, it doesn't make much sense. Also, it is not right that such an answer should be allowed on a mailing list. I asked a simple question, if you didn't know, or if you don't agree with the approach I'm taking just tell me, don't tell me to go read 2 books. I thought this mailing list is designed to answer questions not act in this manner.
>
> Roshan
>
>
> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com]
> Sent: Thu 11/1/2007 3:13 PM
> To: Maven Users List
> Subject: Re: Maven alias phases/goals
>
> You've got some reading to do. The Sonatype book and Better Builds
> with Maven book (free PDF books you can download online) are a good
> place to start your reading.
>
> Wayne
>
> On 11/1/07, Roshan A. Punnoose <rp...@proteus-technologies.com> wrote:
> > Is it possible to combine goals and phases under one goal? Like in Ant,
> > you can say that a certain target depends on a sequential list of
> > multiple targets. Can you do the same thing in maven?
> >
> > Roshan
> >
> > -----Original Message-----
> > From: Wayne Fay [mailto:waynefay@gmail.com]
> > Sent: Thursday, November 01, 2007 11:05 AM
> > To: Maven Users List
> > Subject: Re: Maven alias phases/goals
> >
> > You can alter the mvn.bat file to enable this functionality. But then
> > everyone needs to be using your mvn.bat file, which is not the
> > standard use case.
> >
> > Wayne
> >
> > On 11/1/07, Roshan A. Punnoose <rp...@proteus-technologies.com>
> > wrote:
> > > Is it possible in maven to alias a certain phase or goal? For example,
> > I
> > > have a goal called sayhi:hello, and all I want a user to enter is mvn
> > > sayHello to get it to run. Is that possible?
> > >
> > > Roshan
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
>
>
> ---------------------------------------------------------------------
> 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: Maven alias phases/goals

Posted by "Roshan A. Punnoose" <rp...@proteus-technologies.com>.
Just because Maven provides another way at looking at builds doesn't mean that some of the things that Ant did are wrong. 

I've been doing some reading online and it seems like you are allowed to create "aggregrator" plugins? Is there any good documentation on this?

p.s. Maven provides phases that mojos are supposed to attach to, but one of Ant's greatest strengths is doing sequential building. As a developer I can easily write out the full command list for 10 goals in the right order, but I don't want to subject every other developer to that, it doesn't make much sense. Also, it is not right that such an answer should be allowed on a mailing list. I asked a simple question, if you didn't know, or if you don't agree with the approach I'm taking just tell me, don't tell me to go read 2 books. I thought this mailing list is designed to answer questions not act in this manner.

Roshan


-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com]
Sent: Thu 11/1/2007 3:13 PM
To: Maven Users List
Subject: Re: Maven alias phases/goals
 
You've got some reading to do. The Sonatype book and Better Builds
with Maven book (free PDF books you can download online) are a good
place to start your reading.

Wayne

On 11/1/07, Roshan A. Punnoose <rp...@proteus-technologies.com> wrote:
> Is it possible to combine goals and phases under one goal? Like in Ant,
> you can say that a certain target depends on a sequential list of
> multiple targets. Can you do the same thing in maven?
>
> Roshan
>
> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com]
> Sent: Thursday, November 01, 2007 11:05 AM
> To: Maven Users List
> Subject: Re: Maven alias phases/goals
>
> You can alter the mvn.bat file to enable this functionality. But then
> everyone needs to be using your mvn.bat file, which is not the
> standard use case.
>
> Wayne
>
> On 11/1/07, Roshan A. Punnoose <rp...@proteus-technologies.com>
> wrote:
> > Is it possible in maven to alias a certain phase or goal? For example,
> I
> > have a goal called sayhi:hello, and all I want a user to enter is mvn
> > sayHello to get it to run. Is that possible?
> >
> > Roshan
> >
> > ---------------------------------------------------------------------
> > 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
>
>
> ---------------------------------------------------------------------
> 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: Maven alias phases/goals

Posted by Wayne Fay <wa...@gmail.com>.
You've got some reading to do. The Sonatype book and Better Builds
with Maven book (free PDF books you can download online) are a good
place to start your reading.

Wayne

On 11/1/07, Roshan A. Punnoose <rp...@proteus-technologies.com> wrote:
> Is it possible to combine goals and phases under one goal? Like in Ant,
> you can say that a certain target depends on a sequential list of
> multiple targets. Can you do the same thing in maven?
>
> Roshan
>
> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com]
> Sent: Thursday, November 01, 2007 11:05 AM
> To: Maven Users List
> Subject: Re: Maven alias phases/goals
>
> You can alter the mvn.bat file to enable this functionality. But then
> everyone needs to be using your mvn.bat file, which is not the
> standard use case.
>
> Wayne
>
> On 11/1/07, Roshan A. Punnoose <rp...@proteus-technologies.com>
> wrote:
> > Is it possible in maven to alias a certain phase or goal? For example,
> I
> > have a goal called sayhi:hello, and all I want a user to enter is mvn
> > sayHello to get it to run. Is that possible?
> >
> > Roshan
> >
> > ---------------------------------------------------------------------
> > 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
>
>
> ---------------------------------------------------------------------
> 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: Maven alias phases/goals

Posted by "Roshan A. Punnoose" <rp...@proteus-technologies.com>.
Is it possible to combine goals and phases under one goal? Like in Ant,
you can say that a certain target depends on a sequential list of
multiple targets. Can you do the same thing in maven?

Roshan

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Thursday, November 01, 2007 11:05 AM
To: Maven Users List
Subject: Re: Maven alias phases/goals

You can alter the mvn.bat file to enable this functionality. But then
everyone needs to be using your mvn.bat file, which is not the
standard use case.

Wayne

On 11/1/07, Roshan A. Punnoose <rp...@proteus-technologies.com>
wrote:
> Is it possible in maven to alias a certain phase or goal? For example,
I
> have a goal called sayhi:hello, and all I want a user to enter is mvn
> sayHello to get it to run. Is that possible?
>
> Roshan
>
> ---------------------------------------------------------------------
> 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


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


Re: Maven alias phases/goals

Posted by Wayne Fay <wa...@gmail.com>.
You can alter the mvn.bat file to enable this functionality. But then
everyone needs to be using your mvn.bat file, which is not the
standard use case.

Wayne

On 11/1/07, Roshan A. Punnoose <rp...@proteus-technologies.com> wrote:
> Is it possible in maven to alias a certain phase or goal? For example, I
> have a goal called sayhi:hello, and all I want a user to enter is mvn
> sayHello to get it to run. Is that possible?
>
> Roshan
>
> ---------------------------------------------------------------------
> 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