Ant 条件判断语句 及 指定操作文件的条件

	<target name="help">
		<echo>zip and copy static content to web servers</echo>
		<condition property="isTestEnv">
			<istrue value="${deploy.isTestEnv}" />
		</condition>
		<antcall target="trueCondition">
		</antcall>
		<antcall target="falseCondition">
		</antcall>
	</target>

	<target name="trueCondition" if="isTestEnv">
		<echo>trueCondition</echo>
	</target>

	<target name="falseCondition" unless="isTestEnv">
		<echo>falseCondition</echo>
	</target>


			<fileset dir="./deploy">
				<include name="**/*" />
				<size value="100" when="ge" />
				<date datetime="${old.zip.timestamp}" pattern="${ts.pattern}" when="after" />
			</fileset>

你可能感兴趣的:(Web,ant)