<?xml version="1.0" encoding="UTF-8"?>
<project name="cvs package" basedir="." default="packing_cvs_package.init">
<property name="hello" value="false"/>
<property name="ant-contrib.jar" location="./lib/ant-contrib-1.0b3.jar" />
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${ant-contrib.jar}" />
<target name="packing_cvs_package.init">
<if>
<equals arg1="${hello}" arg2="true"/>
<then>
<echo >${hello} value is true</echo>
</then>
<elseif>
<equals arg1="${hello}" arg2="false"/>
<then>
<echo >${hello} value is false</echo>
</then>
</elseif>
<else>
<echo >${hello} value is unknowe</echo>
</else>
</if>
</target>
</project>
Ant常见属性解析--if-else
最新推荐文章于 2020-07-01 14:13:56 发布