ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale Anson <>
Subject Re: [VOTE] Ant/Antcall Returning properties and references [WAS] Re: ant 1.5.4 : Import
Date Tue, 02 Sep 2003 19:33:30 GMT
Dominique --

Dang, I didn't know there was a competition going on!

I wrote most of the Antelope tasks because I had a specific need. Feel 
free to grab what you want and put it in Ant-contrib. I like your 
"loophole" for your "antreturn" task, I didn't like the code reuse 
either, but the way the "ant" task was written didn't lend itself to 
extension, and I didn't see your loophole.

Really, the "call" task in Antelope does what many people seem to 
expect, and is a very minimal task with almost no overhead. Below is the 
complete source. Judging from the e-mail I get, most people are 
downloading the Antelope tasks for this "call" task, the 
"try/catch/finally" task, the "if/else" task, and the "post" task. 
Ant-contrib already has try/catch and if/else, but adding call and post 
(or equivalent) would be good.


Here's the "call" task source. It's very short, even with whitespace 
it's only 17 lines. "Call" is to replace "antcall", not "ant".


public class Call extends Task {
   private String target = null;
   public void setTarget(String target) { = target; 
   public void execute() {
      if (target == null)
         throw new BuildException("target is required");

Dominique Devienne wrote:

>>-----Original Message-----
>>From: Stefan Bodewig []
>>I'd like to explore the needs that is driving this specific feature
>>request - and see whether there is a different way to meet it.
>><import> or <include> will allow you to import a set of properties (or
>>property setting tasks) for example.
>I probably would not have needed <antReturn> if I had access to <import>...
>I feel it's a little hackish too, even though it serves my purpose just
>fine for now. The fact that ProjectComponent reference instances change
>Project when returned could have negative side effects for example???
>>>Three +1s are required for a code change, so, by the likes of it,
>>>the vote will have a negative result.
>>No, just no positive result.
>Sorry for dropping the ball on you ;-) I posted this code kinda showing off
>I guess, during the <import> discussion if you recall, and also because it
>might be useful to somebody else. I looked at the Antelope one, and really
>didn't like the code duplication I saw there. So I hacked my own thanks to a
>loop hope related to the Introspection rules of Ant to get a hold of the
>nested private project... Would be cleaner in <ant> proper, but still not
><import> is the way to go forward I think. I'm just missing it with my 1.5.3
>Ant used in production builds (augmented Ant, but not modified in any way).
>Thanks for proposing my code though. Cheers, --DD
>PS: Maybe Ant-Contrib would like to incorporate <antReturn>
>    to compete on features with Antelope??? ;-)
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message