@@ -150,48 +150,48 @@ built-in into your JDK.</p>
<h3>Examples</h3>
<h3>Examples</h3>
<p><b>Example 1</b></p>
<p><b>Example 1</b></p>
<pre><checksum file="foo.bar"/></pre>
<blockquote> <pre><checksum file="foo.bar"/></pre></blockquote>
Generates a MD5 checksum for foo.bar and stores the checksum in the destination file
Generates a MD5 checksum for foo.bar and stores the checksum in the destination file
foo.bar.MD5. foo.bar.MD5 is overwritten only if foo.bar is newer than itself.
foo.bar.MD5. foo.bar.MD5 is overwritten only if foo.bar is newer than itself.
<p><b>Example 2</b></p>
<p><b>Example 2</b></p>
<pre><checksum file="foo.bar" forceOverwrite="yes"/></pre>
<blockquote> <pre><checksum file="foo.bar" forceOverwrite="yes"/></pre></blockquote>
Generates a MD5 checksum for foo.bar and stores the checksum in foo.bar.MD5.
Generates a MD5 checksum for foo.bar and stores the checksum in foo.bar.MD5.
If foo.bar.MD5 already exists, it is overwritten.
If foo.bar.MD5 already exists, it is overwritten.
<p><b>Example 3</b></p>
<p><b>Example 3</b></p>
<pre><checksum file="foo.bar" property="foobarMD5"/></pre>
<blockquote> <pre><checksum file="foo.bar" property="foobarMD5"/></pre></blockquote>
Generates a MD5 checksum for foo.bar and stores it in the Project Property foobarMD5.
Generates a MD5 checksum for foo.bar and stores it in the Project Property foobarMD5.
<p><b>Example 4</b></p>
<p><b>Example 4</b></p>
<pre><checksum file="foo.bar" verifyProperty="isMD5ok"/></pre>
<blockquote> <pre><checksum file="foo.bar" verifyProperty="isMD5ok"/></pre></blockquote>
Generates a MD5 checksum for foo.bar, compares it against foo.bar.MD5 and sets
Generates a MD5 checksum for foo.bar, compares it against foo.bar.MD5 and sets
isMD5ok to either true or false, depending upon the result.
isMD5ok to either true or false, depending upon the result.
<p><b>Example 5</b></p>
<p><b>Example 5</b></p>
<pre><checksum file="foo.bar" algorithm="SHA" fileext="asc"/></pre>
<blockquote> <pre><checksum file="foo.bar" algorithm="SHA" fileext="asc"/></pre></blockquote>
Generates a SHA checksum for foo.bar and stores the checksum in the destination file
Generates a SHA checksum for foo.bar and stores the checksum in the destination file
foo.bar.asc. foo.bar.asc is overwritten only if foo.bar is newer than itself.
foo.bar.asc. foo.bar.asc is overwritten only if foo.bar is newer than itself.
<p><b>Example 6</b></p>
<p><b>Example 6</b></p>
<pre>
<blockquote> <pre>
<checksum file="foo.bar" property="${md5}" verifyProperty="isEqual"/>
<checksum file="foo.bar" property="${md5}" verifyProperty="isEqual"/>
</pre>
</pre></blockquote>
Generates a MD5 checksum for foo.bar, compares it against the value of the property
Generates a MD5 checksum for foo.bar, compares it against the value of the property
md5, and sets isEqual to either true or false, depending upon the result.
md5, and sets isEqual to either true or false, depending upon the result.
<p><b>Example 7</b></p>
<p><b>Example 7</b></p>
<pre>
<blockquote> <pre>
<checksum>
<checksum>
<fileset dir=".">
<fileset dir=".">
<include name="foo*"/>
<include name="foo*"/>
</fileset>
</fileset>
</checksum>
</checksum>
</pre>
</pre></blockquote>
Works just like Example 1, but generates a .MD5 file for every file that begins with the name foo.
Works just like Example 1, but generates a .MD5 file for every file that begins with the name foo.
<p><b>Example 8</b></p>
<p><b>Example 8</b></p>
<pre>
<blockquote> <pre>
<condition property="isChecksumEqual">
<condition property="isChecksumEqual">
<checksum>
<checksum>
<fileset dir=".">
<fileset dir=".">
@@ -199,7 +199,7 @@ Works just like Example 1, but generates a .MD5 file for every file that begins
</fileset>
</fileset>
</checksum>
</checksum>
</condition>
</condition>
</pre>
</pre></blockquote>
Works like Example 4, but only sets isChecksumEqual to true, if the
Works like Example 4, but only sets isChecksumEqual to true, if the
checksum matches - it will never be set to false. This example
checksum matches - it will never be set to false. This example
demonstrates use with the Condition task.
demonstrates use with the Condition task.