ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Colton (ext. 799)" <>
Subject RE: diff utility
Date Thu, 05 Dec 2002 13:29:19 GMT

I've wrapped:

in an ant task and it works very well (I had to tweak the original source
above a bit). If there are differences in any file a .diff files is created
that looks as if you ran diff from a prompt. The great thing about this is
that if platform independent.

Basically I pass a fileset of (generated) files I want to compare and a
parameter that points to the directory containing the original files (in my
implementation I never have sub directories in either generated or source
but it should work). As well as sending output to the screen you can also
specify a log file for the process.

Upon completion of the test a pass / fail result property is set.

This is what it looks like in my build file:

		<compareFiles otherDirectory="${}.original"
			<fileset dir="${}.generated">
				<include name="${these.files}"/>
		<echo message="Test Result: ${test.result}${line.separator}"

I can share this if you want but I must warn you that this is designed
purely for what I need. It doesn't check that matching file exists in the
"otherDirectory" though this would be easy enough to do I don't need it. I
have no documentation etc.

It's would be a good starting point for you but I doubt I would have time to
ever round off the rough edges.


-----Original Message-----
From: Yaron Ruckenstein []
Sent: 05 December 2002 11:04
To: Ant-User
Subject: diff utility


Is there a diff task (Unix style) for Ant ?

Thanks, Yaron

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

The information contained in this e-mail is confidential,
may be privileged and is intended only for the use of the
recipient named above. If you are not the intended
recipient or a representative of the intended recipient,
you have received this e-mail in error and must not copy,
use or disclose the contents of this email to anybody
else. If you have received this e-mail in error, please
notify the sender immediately by return e-mail and
permanently delete the copy you received. This email has
been swept for computer viruses. However, you should
carry out your own virus checks.

Registered in Ireland, No. 205721.

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

View raw message