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:[EMAIL PROTECTED]]
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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


**************************************************************************
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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to