java - ant property conditional on another property -
i next in ant
if javac.version >= 1.7 <property name="myproperty" value="somevalue"/> else <property name="myproperty" value="someothervalue"/> endif
looks simple plenty not familiar plenty ant this
any assistance appreciated
you can utilize the status task check if contents of java version scheme property contains version need. here example:
<project name="test" default="target"> <target name="target"> <condition property="property" value="value1" else="value2"> <contains string="${java.version}" substring="1.7"/> </condition> <echo>java version: ${java.version}. result: ${property}</echo> </target> </project>
output:
java version: 1.7.0_60. result: value1
java ant properties version
No comments:
Post a Comment