Re: AntFileSetCompareTask

From: Erik Hatcher (eri..hatchersolutions.com)
Date: Thu May 12 2005 - 20:17:08 EDT

  • Next message: Mike Kienenberger: "cgen class/package attributes"

    On May 12, 2005, at 8:00 PM, Mike Kienenberger wrote:
    >> Let's just say I've never seen a usage of filesets like you have
    >> created :)
    >>
    >
    > Well, that's what happens when you let the untrained near the power
    > tools :)
    >
    > What would be the standard way to do this?

    I've not tried this myself, but I'd bet you could do this with the
    <checksum> task, coupled with the <condition> with a nested checksum
    verification. For details, see this: http://ant.apache.org/manual/
    CoreTasks/checksum.html

    If <checksum> doesn't quite cut it, my recommendation for supporting
    diffing of two filesets is to eliminate the dir1 and dir2 attributes
    and have a single compareToDir (or just 'dir' perhaps?) attribute,
    support only *one* fileset rather than any number of them like yours
    supports now (don't add the fileset to a list, and throw a
    BuildException if a 2nd fileset is added). Then walk the fileset,
    and compare the file in there against the files with the same
    relative path into the compareToDir.

    You don't really need support for more than a fileset and a base
    directory to compare to, right?

         Erik



    This archive was generated by hypermail 2.0.0 : Thu May 12 2005 - 20:17:24 EDT