ant排除一些文件
我正在尝试使用ant将文件从ant排除一些文件,ant,build,Ant,Build,我正在尝试使用ant将文件从sourceDir复制到destDir,我也不想复制某些文件,我将要排除的文件名保留在file:excludelist.txt中。我如何实现这是一个ant目标 使用嵌套exludesfile与嵌套一起使用。 从ant手动文件集: excludesfile=>文件名;此文件的每一行都被带到 必须是排除模式 代码片段: <target name="foo"> <copy todir="path/to/destDir"> <fileset
sourceDir
复制到destDir
,我也不想复制某些文件,我将要排除的文件名保留在file:excludelist.txt中。我如何实现这是一个ant目标 使用嵌套exludesfile与嵌套一起使用。从ant手动文件集:
excludesfile=>文件名;此文件的每一行都被带到 必须是排除模式 代码片段:
<target name="foo">
<copy todir="path/to/destDir">
<fileset dir="path/to/sourceDir">
<excludesfile name="excludelist.txt"/>
</fileset>
</copy>
</target>
谢谢。我可以把excludelist.txt放在不同的目录而不是sourceDir吗?似乎excludelist.txt与build.xml处于同一级别。再次感谢。实际上excludesfile的name属性name的术语“name”有点误导。事实上,它需要一个文件路径,因此您可以使用。