ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale Anson <dan...@germane-software.com>
Subject Re: Antcall or depends
Date Wed, 20 Aug 2003 16:52:44 GMT
If you're using the try/catch/finally from antelope, look at the "call" 
task in the same distribution. It is similar to antcall, but addresses 
exactly the situation you've described.

Dale


Roman Rytov wrote:

>In a try I tag a CVS branch and in a catch if a following build didn't
>succeed I untag the branch. In finally I cleanup the disc. Shortly
>speaking I have to catch one's failure and see no other way but with
>help of try-catch-finally. 
>
>RR
>
>  
>
>>-----Original Message-----
>>From: Matt Benson [mailto:gudnabrsam@yahoo.com] 
>>Sent: Wednesday, August 20, 2003 00:49 AM
>>To: Ant Users List
>>Subject: RE: Antcall or depends
>>
>>I believe it is intentional that the properties are one-way.  
>>Let's back up.  What precisely are you trying to catch in 
>>your try-catch block?
>>
>>-Matt
>>
>>--- Roman Rytov <rrytov@entopia.com> wrote:
>>    
>>
>>>It's exactly what I do but what's the point? It's done 
>>>      
>>>
>>intentionally 
>>    
>>
>>>or a matter of implementation and if so any change is coming in 1.6?
>>>
>>>      
>>>
>>>>-----Original Message-----
>>>>From: Matt Benson [mailto:gudnabrsam@yahoo.com]
>>>>Sent: Tuesday, August 19, 2003 23:52 PM
>>>>To: Ant Users List
>>>>Subject: RE: Antcall or depends
>>>>
>>>>One quick hack might be to write the "answer" to a
>>>>        
>>>>
>>>file and
>>>      
>>>
>>>>load it back using <loadfile ...> or <properties
>>>>        
>>>>
>>>file="x" />
>>>      
>>>
>>>>if you need multiple data. 
>>>>You could even send the filename as an <antcall>
>>>>        
>>>>
>>>property.
>>>      
>>>
>>>>-Matt
>>>>
>>>>--- Roman Rytov <rrytov@entopia.com> wrote:
>>>>        
>>>>
>>>>>You're right. I set a property from a called
>>>>>          
>>>>>
>>>task. I call the task
>>>      
>>>
>>>>>from a try-catch block and hence I have no
>>>>>          
>>>>>
>>>option to move to a
>>>      
>>>
>>>>>dependency model. But I checked that even if I
>>>>>          
>>>>>
>>>use antcall w\o
>>>      
>>>
>>>>>trycatch it doesn't help. The propery I set from
>>>>>          
>>>>>
>>>a called
>>>      
>>>
>>>>task serves
>>>>        
>>>>
>>>>>as a flag and depending on it I take decision on
>>>>>          
>>>>>
>>>next tasks.
>>>      
>>>
>>>>>Roman
>>>>> 
>>>>>
>>>>>          
>>>>>
>>>>>>-----Original Message-----
>>>>>>From: Matt Benson
>>>>>>            
>>>>>>
>>>[mailto:gudnabrsam@yahoo.com]
>>>      
>>>
>>>>>>Sent: Tuesday, August 19, 2003 22:40 PM
>>>>>>To: Ant Users List
>>>>>>Subject: Re: Antcall or depends
>>>>>>
>>>>>>What I see here is that properties set by an
>>>>>>            
>>>>>>
>>>>><antcall> do not
>>>>>          
>>>>>
>>>>>>return to the calling project.  It may be more
>>>>>>            
>>>>>>
>>>>>profitable for
>>>>>          
>>>>>
>>>>>>you to tell us exactly what you need.
>>>>>>
>>>>>>-Matt
>>>>>>
>>>>>>--- Roman Rytov <rrytov@entopia.com> wrote:
>>>>>>            
>>>>>>
>>>>>>>Here is a snippet of ant script:
>>>>>>>
>>>>>>><target name="a">
>>>>>>><property name="X" value="x/>
>>>>>>></target>
>>>>>>>
>>>>>>>
>>>>>>><target name="ok" depends="a"> <echo>${X}</echo>
</target>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>><target name="bad">
>>>>>>><antcall target="a"/>
>>>>>>><echo>${X}</echo>
>>>>>>></target>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>In case of "bad" target property X is not
>>>>>>>              
>>>>>>>
>>>>>definded.
>>>>>          
>>>>>
>>>>>>>Why is it such and
>>>>>>>is there a way to work it around? I can't
>>>>>>>              
>>>>>>>
>>>change
>>>      
>>>
>>>>>some logic to the
>>>>>          
>>>>>
>>>>>>>first case and really need to use antcall.
>>>>>>>
>>>>>>>
>>>>>>>Roman
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>---------------------------------------------------------------------
>>    
>>
>>>>>>>To unsubscribe, e-mail:
>>>>>>>user-unsubscribe@ant.apache.org For additional commands, 
>>>>>>>e-mail:
>>>>>>>user-help@ant.apache.org
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>__________________________________
>>>>>>Do you Yahoo!?
>>>>>>Yahoo! SiteBuilder - Free, easy-to-use web
>>>>>>            
>>>>>>
>>>site
>>>      
>>>
>>>>>design
>>>>>          
>>>>>
>>>>>>software http://sitebuilder.yahoo.com
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>---------------------------------------------------------------------
>>    
>>
>>>>>>To unsubscribe, e-mail:
>>>>>>            
>>>>>>
>>>>>user-unsubscribe@ant.apache.org For
>>>>>          
>>>>>
>>>>>>additional commands, e-mail:
>>>>>>            
>>>>>>
>>>>>user-help@ant.apache.org
>>>>>          
>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>          
>>>>>
>>---------------------------------------------------------------------
>>    
>>
>>>>>To unsubscribe, e-mail:
>>>>>user-unsubscribe@ant.apache.org
>>>>>For additional commands, e-mail:
>>>>>user-help@ant.apache.org
>>>>>
>>>>>          
>>>>>
>>>>__________________________________
>>>>Do you Yahoo!?
>>>>Yahoo! SiteBuilder - Free, easy-to-use web site
>>>>        
>>>>
>>>design
>>>      
>>>
>>>>software http://sitebuilder.yahoo.com
>>>>
>>>>
>>>>        
>>>>
>>---------------------------------------------------------------------
>>    
>>
>>>>To unsubscribe, e-mail:
>>>>        
>>>>
>>>user-unsubscribe@ant.apache.org For
>>>      
>>>
>>>>additional commands, e-mail:
>>>>        
>>>>
>>>user-help@ant.apache.org
>>>      
>>>
>>>>
>>>>        
>>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>    
>>
>>>To unsubscribe, e-mail:
>>>user-unsubscribe@ant.apache.org
>>>For additional commands, e-mail:
>>>user-help@ant.apache.org
>>>
>>>      
>>>
>>__________________________________
>>Do you Yahoo!?
>>Yahoo! SiteBuilder - Free, easy-to-use web site design 
>>software http://sitebuilder.yahoo.com
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
>>additional commands, e-mail: user-help@ant.apache.org
>>
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message