Orangevolt ANT Tasks » Tasks » compare | ||
Element contains | call |
This simple example tests if the java runtime version is 1.4 (or higher). Otherwise fails with an error message. The comparison is done numerical.
build.xml |
|
<?xml version="1.0"?>
|
<project basedir= "." name= "properties-test" default= "main" > |
<taskdef classpath= "orangevolt-ant-tasks-1.3.2.jar" resource= "com/orangevolt/tools/ant/taskdefs.properties" /> |
<target name= "main" > |
<compare arg1= "${ant.java.version}" arg2= "1.4" numeric= "true" > |
<lesser property= "lesserThanJava14" /> |
</compare> |
<fail if= "lessThanJava14" >
|
|
</fail> |
</target> |
</project> |