I tried to generate the checksum for directory using ant.
I have tried the below command, but it generates recursively inside each folder for each file.
<target name="default" depends="">
<echo message="Generating Checksum for each environment" />
<checksum todir="${target.output.dir}" format="MD5SUM" >
<fileset dir="${target.output.dir}" />
</checksum>
</target>
I just want to generate one checksum
for particular directory using Ant
command.
How do I do that?
You want to use the
totalproperty
attribute. As per the documentation this propertywill hold a checksum of all the checksums and file paths
.e.g.
Some other general notes.
todir
attribute to point elsewheredepends
attribute if there's no dependency.