It really looks from your explanation that a maven goal is almost nothing else than an ant target (i.e. a simple action) that can, optionally, be decorated with pre- and post-actions. Can this be ?

I would have a expected the name of goal as a state (the state of being reached or not).

Paul


Le Mercredi, 29 janv 2003, � 23:35 Europe/Berlin, Colin Sampaleanu a �crit :
I've looked around in the jelly, werkz, and maven source. While it's very likely I still don't understand things very well, I think that the behaviour can be explained, and is arguably not desired.

The attainGoal tag in werkz walks up the parent tags (which must be jelly tags) and until it reaches an 'attain' tag, or gives up. In the case it finds an attain tag, it uses the session from that tag, in which case theoretically the specificed goal would only be called once. In maven however when a user passes in one or more goals on the command-line werkz is told programatically to attain them. The same session is used by maven to call attain on each goal, but since the attain tag is never used, and deeper down attainGoal tag usage will not share the werkz session used by Maven.

Personally, if this is the case, I think there is a problem. There should be a mechanism that you can call attainGoal (via that tag or another tag) and have it attained only once, in that build session, and there should be another mechanism similar to the current behaviour of attainGoal, where a goal or some piece of code can be called multiple times.


Colin Sampaleanu wrote:

Hmm, I always assumed that attainGoal would only call the referenced goal once, since it _is_ a goal, and once run, it should be considered 'attained'. But testing it out, you can invoke attainGoal multiple times with the same goal name and the goal contents will be run multiple times.

Now from this I guess I can conclude that for each invocation, Maven is throwing away the werkz goal session it used on the previous call. I think I am missing something here, but I would have thought maven would be using the same session throughout the entire invocation of the build. Can anybody clarify how this actually works? Is there a distinciton between goals called as a result of attainGoal, and goals called as a result of a dependency relationship?


Age Mooy wrote:

Isn't that what <attainGoal name="my:goal"/> is for ?

Age


-----Original Message-----
From: Colin Sampaleanu [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 29, 2003 20:51
To: Turbine Maven Users List
Subject: What is maven/jelly equivalent of ant's antcall?


Ant's antcall task is sometimes used to do 'subroutine' style calls into other targets from one or more locations within an ant build file. To some extent this is not too clean since it mixes up usage of targets as run due to dependencies vs. targets run as subroutines, but it does work. I am trying to figure out the best way to do something similar in Maven/Jelly.

One way I can think that should work is to use Jelly's define:tag tag to define a new tag for the funtionality I need, and then just use that tag appropriately... Another way would be to use jeez:target to wrap a goal, and then use antcall to call it.

Anybody have any suggestions on the best way to do this?




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to