I have a file list as given below which is used by an existing target. I want to write a new target which zips all files from the directory files except files which is given in the filelist (properties).
<filelist id="excludesFiles" 开发者_如何学Pythondir="${client.config.dir}" files="audit.properties,configuration.xml,portal.properties,services.xml,torque.properties,turbine.properties"/>
You should define your fileset as follows
<filelist id="zipfiles" dir="${client.config.dir}" excludes="audit.properties,configuration.xml,portal.properties,services.xml,torque.properties,turbine.properties"/>
<zip destfile="abc.zip"
<fileset refid="zipfiles"/>
</zip>
The fileset now includes all files in the config dir except the ones given in the excludes list.
精彩评论