Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Other Build Tools
Search Coderanch
Advance search
Google search
Register / Login
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
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Other Build Tools
How to use if attribute in build.xml
rahulJ james
Ranch Hand
Posts: 123
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have to pick different file based on a condition. How do I add a condition in build.xml file
Peter Johnson
author
Posts: 5856
7
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Use the condition tag. Here is one example that selects among files based on OS type, with the default being the Windows file.
<condition property="my.file" value="/some/file/name" > <os family="unix" /> </condition> <condition property="my.file" value="/some/other/file/name" > <os family="mac" /> </condition> <property name="my.file" value="c:/some/windows/file" />
The
Ant
docs describe the various conditions you can use.
JBoss In Action
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How to build all POJOs in one action
Using ANT utility for tomcat
how to compile
sample build.xml file for Struts 1.1
Developing EJB in J2EE1.4 (New in EJB)
More...