How can I exclude a list of files (held in a file) from an Ant fileset?

…衆ロ難τιáo~ 提交于 2019-12-23 15:43:58

问题


Is there a way to have an Ant Fileset->IncludesFile attribute take a property file OR any other file that contains a list of Java class files to exclude?

Eg:

File A.properties OR A.java contains listing

abc.class 
mno.class 
xyz.class 

Is there a way to say to point excludesFile to file A.properties.

<fileset dir="...">
    <excludesFile file="A.properties" />
</fileset>

The behavior that I want is when Java runs, it excludes the Java files listed in this file (A.properties)


回答1:


Hmm...not sure if it's case sensitive. The documentation at http://ant.apache.org/manual/Types/fileset.html shows "excludesfile", all lowercase, as with other ant directives.

I'm not sure exactly what you are asking. If you have a fileset which is including files you would like to exclude, and you want to specify that list of files to exclude in an external file, "excludesfile" is the correct way to do it.



来源:https://stackoverflow.com/questions/808413/how-can-i-exclude-a-list-of-files-held-in-a-file-from-an-ant-fileset

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!