Can I make <tt>if/then/else</tt> construction in ant build file ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Dmitry_Zakharov
Posted On:   Tuesday, November 20, 2001 10:47 PM

For exmaple, I want to test ant.java.version property and if the version of JVM is lower 1.2 then fail.

Re: Can I make <tt>if/then/else</tt> construction in ant build file ?

Posted By:   Erik_Hatcher  
Posted On:   Thursday, November 22, 2001 07:49 PM

If you're using Ant 1.4.1 or greater, the task works great. Here's an example that ought to give you what you need:






















There is no "greater than" or "less than" logic, but there is certainly room to add that if you'd like to tackle a patch to Ant's code. With combinations of , , , and you should be able to achieve the precise control you need. Be sure to leave it open ended for JVM 1.4 and up (so you don't have to touch your build file when upgrading JVM's) - thats why I constructed my example with a and .
About | Sitemap | Contact