Open the first build
Open one of the two archives in Peek.
How-to · Peek Pro
Yesterday's build worked and today's does not. Before reading logs, it helps to know what is different inside the two artifacts: which files changed, and which libraries under WEB-INF/lib were added, removed or updated.
With Peek
Compare is part of Peek Pro, which you can try free for 14 days.
Open one of the two archives in Peek.
Choose Archive ▸ Compare With…, or Compare… on the archive's panel, and pick the second archive. A folder on disk works too.
Peek lists the entries that were added, removed and changed.
For a JAR, WAR or EAR, Peek lists the bundled libraries that were added, removed or updated, with the version each one states inside (pom.properties, then the manifest). A renamed JAR still shows its real version.
A text file opens as a line diff; configuration files also show which keys changed. A changed .class opens as a listing of its declarations and instructions, with a summary of the methods and fields that changed.
From the Terminal
Comparing the lists of names is quick. Comparing contents means unpacking both.
# Which entries exist in one and not the other
diff <(unzip -Z1 old.war | sort) <(unzip -Z1 new.war | sort)
# Which files differ in content
unzip -q old.war -d old && unzip -q new.war -d new
diff -rq old new
The file name of a library is not its version: commons-io.jar can hold any release. And diff only tells you that two .class files differ, not what changed in them.
Questions
From what the library states inside itself: Maven's pom.properties first, then the JAR manifest. That is why a renamed file still shows the right version.
Yes. Compare accepts an archive or a folder, which is useful for checking a build against an exploded deployment.
No. It shows declarations and bytecode instructions, not Java source. That is enough to see which methods and fields changed.
No. You can compare a ZIP with a 7z, or a WAR with a folder; Peek compares the entries.
More how-to guides
Free to download
Peek is a native Mac app from the Mac App Store. Nothing is charged when the trial ends; Peek Pro is a one-time purchase, with no subscription and no account.