要调试文件集中包含哪些文件,可以使用此示例,该示例以可读格式打印文件集中的内容:
<?xml version="1.0" encoding="UTF-8"?>
<project name="de.foo.ant" basedir=".">
<!-- Print path manually -->
<target name="print-path-manually" description="" >
<path id="example.path">
<fileset dir="${ant.library.dir}"/>
</path>
<!-- Format path -->
<pathconvert pathsep="${line.separator}| |-- "
property="echo.path.compile"
refid="example.path">
</pathconvert>
<echo>${echo.path.compile}</echo>
</target>
</project>
其输出为:
Buildfile: D:\Workspaces\IvyTutorial\de.foo.ant\prettyPrintPath.xml
print-path-manually:
[echo] D:\Programme\eclipse-rcp-helios-SR1-win32\eclipse\plugins\org.apache.ant_1.7.1.v20100518-1145\lib\ant-antlr.jar
[echo] | |-- D:\Programme\eclipse-rcp-helios-SR1-win32\eclipse\plugins\org.apache.ant_1.7.1.v20100518-1145\lib\ant-apache-bcel.jar
[echo] | |-- D:\Programme\eclipse-rcp-helios-SR1-win32\eclipse\plugins\org.apache.ant_1.7.1.v20100518-1145\lib\ant-apache-bsf.jar
[echo] | |-- D:\Programme\eclipse-rcp-helios-SR1-win32\eclipse\plugins\org.apache.ant_1.7.1.v20100518-1145\lib\ant-apache-log4j.jar
[echo] | |-- D:\Programme\eclipse-rcp-helios-SR1-win32\eclipse\plugins\org.apache.ant_1.7.1.v20100518-1145\lib\ant-apache-oro.jar
[echo] | |-- D:\Programme\eclipse-rcp-helios-SR1-win32\eclipse\plugins\org.apache.ant_1.7.1.v20100518-1145\lib\ant-apache-regexp.jar
[echo] | |-- D:\Programme\eclipse-rcp-helios-SR1-win32\eclipse\plugins\org.apache.ant_1.7.1.v20100518-1145\lib\ant-apache-resolver.jar
....