ant-user mailing list archives

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

I've wrapped:

http://www.bmsi.com/java/#diff

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="${this.directory}.original"
			file="${project.dir}\build.log"
			append="true">
			<fileset dir="${this.directory}.generated">
				<include name="${these.files}"/>
			</fileset>
		</compareFiles>
		
		<echo message="Test Result: ${test.result}${line.separator}"
			file="${project.dir}\build.log"
			append="true"/>

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.

Dave.
 

-----Original Message-----
From: Yaron Ruckenstein [mailto:yaron.ruckenstein@mobilitec.com]
Sent: 05 December 2002 11:04
To: Ant-User
Subject: diff utility


Hi,

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

Thanks, Yaron

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


**************************************************************************
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. http://www.FINEOS.com
**************************************************************************


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message