A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Products
»
Other Open Source Projects
Author
Executing Tasks
Ronnie Phelps
Ranch Hand
Joined: Mar 12, 2001
Posts: 329
posted
Dec 08, 2002 19:13:00
0
Using
ant
, How can I conditionally execute a task?
Lewin Chan
Ranch Hand
Joined: Oct 10, 2001
Posts: 214
posted
Dec 09, 2002 03:57:00
0
<task name="mytask" depends="init" if="this.property.set"> <echo message="Executing mytask"/> </task> <task name="my.other.task" depends="init" unless="this.property.set"> <echo message="Executing my other task"/> </task>
Where previously in your "init" task you may have done something like
<task name="init"> <property name="this.property.set" value="true"/> </task>
which means that my task is executed but not my other task.
L
I have no java certifications. This makes me a bad programmer. Ignore my post.
Ronnie Phelps
Ranch Hand
Joined: Mar 12, 2001
Posts: 329
posted
Dec 09, 2002 08:00:00
0
Got it. Thanks again dude.
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: Executing Tasks
Similar Threads
Timer
How to iterate fileset?
schedule task
Using an executor
JavaDoc
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter