ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Ficker <>
Subject Re: checksum task: how can you use hash in a separate directory
Date Tue, 12 Feb 2008 22:01:53 GMT
You could backup the directory with the checksums and later use a
fileset with different selector  to select those
hash file that have changed.

<project name="test" default="test">
    <target name="hash">     
        <checksum todir="checksums">
            <fileset dir="src" includes ="**/*"/>
    <target name = "verify">
        <checksum  todir="newchecksums">
            <fileset dir="src" includes ="**/*"/>       
        <fileset id="result" dir="checksums">
            <different targetdir="newchecksums" ignoreFileTimes="true"/>
        <echo>Changed Files: ${toString:result}</echo>       

Best regards


Bill Milbratz schrieb:
> Hi,
> Can anyone comment on the best way to solve this problem with the checksum
> task:
> I'm looking for a means to do the following:
> a) take hash-snapshots of shipped files in a directory (e.g. src/jsp)
> b) later, check the files against the hashes
> c) ant indicates which files do not match the hash.
> I've looked at the checksum documentation and the source code, but don't see
> a way I can see which specific files have changed.
> Yet, I may be missing something.
> thanks,
> bill

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message