This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

variable in depends?  RSS feed

 
derek moose
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to use a variable in depends.
i.e.

this doesn't work - is there any other way i can achieve this effect?
(what i want to do is have the ant script parse eclipse's .classpath information and alter the dependencies automatically).
any help appreciated.
 
eammon bannon
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ant does give you conditional logic - see the <condition /> tag. You can set a property and check its value this way. It means that instead of your target depending on something else, it would always run, but conditionalliy based on this property. Something like:
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by eammon bannon:
Ant does give you conditional logic - see the <condition /> tag. You can set a property and check its value this way. It means that instead of your target depending on something else, it would always run, but conditionalliy based on this property. Something like:

Sorry, that's wrong - the condition task *sets* the property based on the conditions specified inside. It doesn't execute any "actions".
 
eammon bannon
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Woops! I'll remind myself of the documentation before posting in future. Cheers for the correction Ilja.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!