• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

variable in depends?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Woops! I'll remind myself of the documentation before posting in future. Cheers for the correction Ilja.
 
Your buns are mine! But you can have this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic