You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Paul Benedict <pb...@apache.org> on 2009/12/01 00:22:13 UTC

Re: Plugins: Goals without a phase

Stephen,

Without a @phase binding, what about when the plugin's goal is
explicitly executed at the command line? Do any of Maven's phases get
executed first? I suspect validate at least does.

Paul

On Mon, Nov 30, 2009 at 4:25 PM, Stephen Connolly
<st...@gmail.com> wrote:
> if the mojo is annotated with @phase then the specified phase is the
> phase it will bind to if no phase is specified in the <execution>
>
> otherwise it will not be bound to any phase (i.e. it will not execute
> as part of any lifecycle)
>
> HTH
>
> -Stephen
>
> 2009/11/30 Paul Benedict <pb...@apache.org>:
>> What phase is bound to a plugin's goal when no corresponding <phase>
>> element is present in their plugin.xml?
>>
>> (If it is none, I didn't know this was possible. I would assume at
>> least "validate" is run)
>>
>> Paul
>>
>> ---------------------------------------------------------------------
>> 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: Plugins: Goals without a phase

Posted by mfs <fa...@gmail.com>.
Got the answer...

YES, the goal (even if bound to phase, by default) would execute independent
of any build-life-cycles if executed/invoked directly from the command-line.

Farhan.


mfs wrote:
> 
> If there IS a default phase associated with the plugin's goal/mojo, even
> then the plugin would execute OUTSIDE of the any of the build life-cycles
> IF (plugin:goal) executed from the command line ?
> 
> I understand that above is true (as per your last statement) when the
> mojo/goal has NO default-phase.
> 
> Thanks,
> Farhan.
> 
> 
> Anders Hammar wrote:
>> 
>> No, if you specify a plugin:goal that's what is going to be executed.
>> Maven's lifecycle is not being used.
>> Try "mvn clean:clean -X" for instance and you'll see.
>> 
>> /Anders
>> 
>> On Tue, Dec 1, 2009 at 00:22, Paul Benedict <pb...@apache.org> wrote:
>> 
>>> Stephen,
>>>
>>> Without a @phase binding, what about when the plugin's goal is
>>> explicitly executed at the command line? Do any of Maven's phases get
>>> executed first? I suspect validate at least does.
>>>
>>> Paul
>>>
>>> On Mon, Nov 30, 2009 at 4:25 PM, Stephen Connolly
>>> <st...@gmail.com> wrote:
>>> > if the mojo is annotated with @phase then the specified phase is the
>>> > phase it will bind to if no phase is specified in the <execution>
>>> >
>>> > otherwise it will not be bound to any phase (i.e. it will not execute
>>> > as part of any lifecycle)
>>> >
>>> > HTH
>>> >
>>> > -Stephen
>>> >
>>> > 2009/11/30 Paul Benedict <pb...@apache.org>:
>>> >> What phase is bound to a plugin's goal when no corresponding <phase>
>>> >> element is present in their plugin.xml?
>>> >>
>>> >> (If it is none, I didn't know this was possible. I would assume at
>>> >> least "validate" is run)
>>> >>
>>> >> Paul
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> 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
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Plugins%3A-Goals-without-a-phase-tp26581937p27026757.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: Plugins: Goals without a phase

Posted by Stephen Connolly <st...@gmail.com>.
if you execute a mojo directly, eg plugin:goal then the lifecycle is  
_never_ invoked irrespective of there being a default phase or not

Sent from my [rhymes with tryPod] ;-)

On 6 Jan 2010, at 00:40, mfs <fa...@gmail.com> wrote:

>
> If there IS a default phase associated with the plugin's goal/mojo,  
> even then
> the plugin would execute OUTSIDE of the any of the build life-cycles  
> IF
> (plugin:goal) executed from the command line ?
>
> I understand that above is true (as per your last statement) when the
> mojo/goal has NO default-phase.
>
> Thanks,
> Farhan.
>
>
> Anders Hammar wrote:
>>
>> No, if you specify a plugin:goal that's what is going to be executed.
>> Maven's lifecycle is not being used.
>> Try "mvn clean:clean -X" for instance and you'll see.
>>
>> /Anders
>>
>> On Tue, Dec 1, 2009 at 00:22, Paul Benedict <pb...@apache.org>  
>> wrote:
>>
>>> Stephen,
>>>
>>> Without a @phase binding, what about when the plugin's goal is
>>> explicitly executed at the command line? Do any of Maven's phases  
>>> get
>>> executed first? I suspect validate at least does.
>>>
>>> Paul
>>>
>>> On Mon, Nov 30, 2009 at 4:25 PM, Stephen Connolly
>>> <st...@gmail.com> wrote:
>>>> if the mojo is annotated with @phase then the specified phase is  
>>>> the
>>>> phase it will bind to if no phase is specified in the <execution>
>>>>
>>>> otherwise it will not be bound to any phase (i.e. it will not  
>>>> execute
>>>> as part of any lifecycle)
>>>>
>>>> HTH
>>>>
>>>> -Stephen
>>>>
>>>> 2009/11/30 Paul Benedict <pb...@apache.org>:
>>>>> What phase is bound to a plugin's goal when no corresponding  
>>>>> <phase>
>>>>> element is present in their plugin.xml?
>>>>>
>>>>> (If it is none, I didn't know this was possible. I would assume at
>>>>> least "validate" is run)
>>>>>
>>>>> Paul
>>>>>
>>>>> --- 
>>>>> ------------------------------------------------------------------
>>>>> 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
>>>
>>>
>>
>>
>
> -- 
> View this message in context: http://old.nabble.com/Plugins%3A-Goals-without-a-phase-tp26581937p27026747.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


Re: Plugins: Goals without a phase

Posted by mfs <fa...@gmail.com>.
If there IS a default phase associated with the plugin's goal/mojo, even then
the plugin would execute OUTSIDE of the any of the build life-cycles IF
(plugin:goal) executed from the command line ?

I understand that above is true (as per your last statement) when the
mojo/goal has NO default-phase.

Thanks,
Farhan.


Anders Hammar wrote:
> 
> No, if you specify a plugin:goal that's what is going to be executed.
> Maven's lifecycle is not being used.
> Try "mvn clean:clean -X" for instance and you'll see.
> 
> /Anders
> 
> On Tue, Dec 1, 2009 at 00:22, Paul Benedict <pb...@apache.org> wrote:
> 
>> Stephen,
>>
>> Without a @phase binding, what about when the plugin's goal is
>> explicitly executed at the command line? Do any of Maven's phases get
>> executed first? I suspect validate at least does.
>>
>> Paul
>>
>> On Mon, Nov 30, 2009 at 4:25 PM, Stephen Connolly
>> <st...@gmail.com> wrote:
>> > if the mojo is annotated with @phase then the specified phase is the
>> > phase it will bind to if no phase is specified in the <execution>
>> >
>> > otherwise it will not be bound to any phase (i.e. it will not execute
>> > as part of any lifecycle)
>> >
>> > HTH
>> >
>> > -Stephen
>> >
>> > 2009/11/30 Paul Benedict <pb...@apache.org>:
>> >> What phase is bound to a plugin's goal when no corresponding <phase>
>> >> element is present in their plugin.xml?
>> >>
>> >> (If it is none, I didn't know this was possible. I would assume at
>> >> least "validate" is run)
>> >>
>> >> Paul
>> >>
>> >> ---------------------------------------------------------------------
>> >> 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
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/Plugins%3A-Goals-without-a-phase-tp26581937p27026747.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: Plugins: Goals without a phase

Posted by Anders Hammar <an...@hammar.net>.
No, if you specify a plugin:goal that's what is going to be executed.
Maven's lifecycle is not being used.
Try "mvn clean:clean -X" for instance and you'll see.

/Anders

On Tue, Dec 1, 2009 at 00:22, Paul Benedict <pb...@apache.org> wrote:

> Stephen,
>
> Without a @phase binding, what about when the plugin's goal is
> explicitly executed at the command line? Do any of Maven's phases get
> executed first? I suspect validate at least does.
>
> Paul
>
> On Mon, Nov 30, 2009 at 4:25 PM, Stephen Connolly
> <st...@gmail.com> wrote:
> > if the mojo is annotated with @phase then the specified phase is the
> > phase it will bind to if no phase is specified in the <execution>
> >
> > otherwise it will not be bound to any phase (i.e. it will not execute
> > as part of any lifecycle)
> >
> > HTH
> >
> > -Stephen
> >
> > 2009/11/30 Paul Benedict <pb...@apache.org>:
> >> What phase is bound to a plugin's goal when no corresponding <phase>
> >> element is present in their plugin.xml?
> >>
> >> (If it is none, I didn't know this was possible. I would assume at
> >> least "validate" is run)
> >>
> >> Paul
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>