Executing a task only if a local property has a file
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Hayden_Marchant
Posted On:   Sunday, October 20, 2002 08:43 AM

With my test target, I need to execute a task only if a property that is set in a previous task in this target has been set. Here is a snippet of my code: I have seen the task from ant-contrib and this will probably work, but I would rather something from the core/optional ant tasks that come with the distribution if possible. I can't write the "global.mark.as.failed" target with an if flag, since these properties are local. I need to check the value of the property there and then. I suppose I could write the value of the property to a file and then read it and test the value using but that seems a really annoyi   More>>

With my test target, I need to execute a task only if a property that is set in a previous task in this target has been set. Here is a snippet of my code:




















I have seen the task from ant-contrib and this will probably work, but I would rather something from the core/optional ant tasks that come with the distribution if possible. I can't write the "global.mark.as.failed" target with an if flag, since these properties are local. I need to check the value of the property there and then. I suppose I could write the value of the property to a file and then read it and test the value using but that seems a really annoying way to do a very simple thing.


Please let me know of any short-cuts.

   <<Less

Re: Executing a task only if a local property has a file

Posted By:   Eugene_Kuleshov  
Posted On:   Sunday, October 27, 2002 07:23 PM

You can rewrite that to something like:








Re: Executing a task only if a local property has a file

Posted By:   Erik_Hatcher  
Posted On:   Monday, October 21, 2002 01:27 AM

Use if/unless at the level in the example you've provided.

Re: Executing a task only if a local property has a file

Posted By:   Hayden_Marchant  
Posted On:   Sunday, October 20, 2002 08:44 AM

Sorry, I meant the subject to be :

Executing a task only if a local property has a value
About | Sitemap | Contact