Need a tool to compare two .ear files recursively

zipdiff provides a very good open source solution.


My problem turned out to be more than just expanding the .ear file recursively (I wrote a Java class to do that - recursion made it simple.) Once the .ear files are expanded I have to diff the directories to check for any changes. If anything other than timestamps changed then I know that the build is producing a different binary.

The second problem is that our build process generates hundreds of .xml files and subsequent builds re-generate those .xml files with the elements in different order. I'm not sure why. When I expand two .ear files made by back-to-back builds with no changes to anything the diff of the resulting directories shows hundreds of .xml files with diffs, even though they are functionally equivalent.

In addition to expanding the .ear files recursively I need to do a diff and exclude the .xml files in certain directories. I thought that Cygwin diff would do this, but the --exclude switch doesn't recognize any path information:

Cygwin diff won't exclude files if a directory is included in the pattern

If I don't find a solution to this I'll write another Java class to step through the whole directory structure doing a single level diff in each directory and excluding the .xml files in the appropriate directories.

I have the feeling that I'm re-inventing the wheel, but I can't find a wheel right now.

Tags:

Diff

Compare

Ear