You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Quinton McCombs <qm...@nequalsone.com> on 2003/02/19 23:08:24 UTC

Difference between prereqs and attainGoal

What is the difference between declaring a prereq for the goal and using
attainGoal inside of the goal?  


Re: Difference between prereqs and attainGoal

Posted by Peter Lynch <pe...@mindspring.com>.
----- Original Message ----- 
From: "Colin Sampaleanu" <co...@exis.com>
To: "Turbine Maven Users List" <tu...@jakarta.apache.org>
Sent: Wednesday, February 19, 2003 2:25 PM
Subject: Re: Difference between prereqs and attainGoal


> Quinton McCombs wrote:
> 
> >What is the difference between declaring a prereq for the goal and using
> >attainGoal inside of the goal?  
> >
> >  
> >
> attainGoal will currently _always_ invoke the goal again (and all it's 
> prerequs), regardless of whether or not the current build has invoked 
> that goal, whereas any goals listed in the prerequs of goals specified 
> for the main build will only be attained once.
> 
> This behaviour, which is not very intuitive, or expected (as shown by 
> significant amount of code which on examination obviously expects it to 
> work exactly the same as prereq) happens because werkz's attainGoal tag 
> was originally meant to be used inside of werkz's attain tag, and share 
> a werkz session with sibling attainGoal tags.
> 
> There is no mechanism at this time for the attainGoal tag to get the 
> main maven werkz session, and take part in that. I have submitted code 
> to Bob W. and Jason which resolves this,, but they are sitting on it, I 
> guess due to time constraints or other things being more important. (On 
> the latter I would personally not agree; I think resolving goals 
> properly is fundamental to Maven, so breakage in this area is at this 
> point more important than just about anything else).

+1

...but you knew that.

-Peter


> 
> Colin
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-maven-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-maven-user-help@jakarta.apache.org
> 

Re: Difference between prereqs and attainGoal

Posted by Colin Sampaleanu <co...@exis.com>.
Quinton McCombs wrote:

>What is the difference between declaring a prereq for the goal and using
>attainGoal inside of the goal?  
>
>  
>
attainGoal will currently _always_ invoke the goal again (and all it's 
prerequs), regardless of whether or not the current build has invoked 
that goal, whereas any goals listed in the prerequs of goals specified 
for the main build will only be attained once.

This behaviour, which is not very intuitive, or expected (as shown by 
significant amount of code which on examination obviously expects it to 
work exactly the same as prereq) happens because werkz's attainGoal tag 
was originally meant to be used inside of werkz's attain tag, and share 
a werkz session with sibling attainGoal tags.

There is no mechanism at this time for the attainGoal tag to get the 
main maven werkz session, and take part in that. I have submitted code 
to Bob W. and Jason which resolves this,, but they are sitting on it, I 
guess due to time constraints or other things being more important. (On 
the latter I would personally not agree; I think resolving goals 
properly is fundamental to Maven, so breakage in this area is at this 
point more important than just about anything else).

Colin