`

Ant常见属性解析--foreach

    博客分类:
  • Ant
阅读更多
<?xml version="1.0"?>

<project default="install_package_deploy.start" basedir=".">

	<property name="ant-contrib.jar" location="${build.dir}/build/lib/ant-contrib-1.0b3.jar" />
	<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${ant-contrib.jar}" />
	
	<target name="loop">		
		<echo>${file.full.name}</echo>
	</target>
	
	<!-- 把input.deploy.property.paths中的properties文件循环作为参数传给loop -->
	
	<target name="install_package_deploy.start">
		<foreach list="" target="loop" param="file.full.name" delimiter=",">
			<fileset dir="${input.deploy.property.paths}">
				<include name="*.properties"/>
			</fileset>
		</foreach>
	</target>
	
	
	<!-- 把list中的数循环传给 screen_number-->
	<target name="foreach_test">
			<foreach list="1,2,3,4,5,6,7,8,9" target="screen_number" param="number" delimiter=",">
				
			</foreach>
	</target>
	
	<target name="screen_number">		
			<echo>${number}</echo>
   </target>
  
</project>

分享到:
评论
1 楼 myworkfirst 2012-09-11  

${input.deploy.property.paths}">  这个在哪里定义的呢?

相关推荐

Global site tag (gtag.js) - Google Analytics