开发者

Exclude all files in a filelist

开发者 https://www.devze.com 2023-02-21 05:19 出处:网络
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 (propertie

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消