2014-07-16 35 views

回答

1

螞蟻核心提供了一個checksum task

Generates checksum for files. This task can also be used to perform checksum verifications. 

可與conditon用來做你的構建失敗,如果二進制文件是不相等的,F.E. :

<checksum file="path/to/foo.jar" property="fooMD5"/> 

<fail message="Binaries not equal !!"> 
<condition> 
    <not> 
    <checksum file="path/to/fooo.jar" property="${fooMD5}"/> 
    </not> 
</condition> 
</fail> 

也有filesmatchresourcesmatch條件文件比較,看ant manual conditions

+0

Thanksthat一定會有所幫助。 – Thiago