On Thu, 30 Jan 2003, Colin Sampaleanu wrote:
> I think that there is currently a serious problem in maven and a number
> of plugins, in that 'attainGoal' is being used in various places (goals,
> preGoals, and postGoals) with the expectation that the goal being named
> to be attained will be part of the dependency graph of the main build
> itself, and will be attained only once. However, due to the way the
> werkz 'attainGoal' tag is implemented, there is no integration into the
> main maven dependency session, and each invocation of attainGoal with a
> specific goal will call that goal again including all its dependencies,
> becoming more of a subroutine call. At best, I would say it's confusing
> as hell, since the name 'attainGoal' implies something; certainly there
> is some code which is using the tag with the expectation that it is
> integrating into the dependency graph, and there is other code which is
> using it like a subroutine call. I would also suggest there need to be
> clearly named, different mechanisms, to handle both usage semantics.
Yah, this is a well-understood problem (at least by me, having written
werkz).
Though, my non-scientific polling has resulted in me thinking that
most folks are now taking advantage of the fact that <attainGoal>
doesn't participate in the global session.
ie:
<attainGoal name="clean"/>
<attainGoal name="myproj:something"/>
<attainGoal name="clean"/>
<attainGoal name="myproj:something.else"/>
Where 'clean' wouldn't fire the 2nd time if we shared in the global
session.
We noodled around with keeping the current syntax and semantics the
same but adding a session="true" attribute for folks needing new
semantics.
Or, since so many other things have changed lately, retaining backwards
compatibility is less important, and we could certain make <attainGoal>
behave has expected, and rename the current functionality to <callGoal>
or <forceAttainGoal> or somesuch.
The biggest use-case we must accomodate is folks wanting to 'clean'
multple times and not have werkz think everything is still attained.
Though, that could maybe be rememdied with something like:
<goal name="clean">
<!-- normal clean stuff -->
<resetWerkzSession/>
</goal>
That'd allow us to invalidate the werkz session and allow for rebuilds
without confusing werkz.
IRC would probably be a glad place to hammer out the details.
-bob
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]