2015-05-30 50 views
0

我需要指定特定文件的列表exclud但是當我嘗試像excludesfile="file1, file2"我得到執行任務時說的錯誤:如何使用excludesfile/includesfile螞蟻拉鍊任務

C:\用戶..... \ Desktop \ testProject \ project.build.xml:49:Excludesfile C:\ Users ...... \ Desktop \ testProject \ file1,找不到file2。

這是我的代碼:

<target name="jar" depends="common.jar"> 
    <zip 
     destfile="${jar.build.dir}/some-jar.jar" 
     basedir="${base.dir}" 
     includes="src/**,gradle/**" 
     excludesfile="file1,file2"> 
    </zip> 
</target> 

回答

1

excludesfile用於指定包含文件的列表在zip處理(各單獨的行上),以排除一個文件。要將列表指定爲以逗號(或空格)分隔的文件,請使用參數excludes。例如:

excludes="file1,file2"