Prerequisites:
- Java JDK 8 or higher installed
- PkgDiff
- JD CMD CLI (If committed Jar no longer works)
General Usage:
- Open execute.sh in Text Editor
- Set Older/Newer WAR file path variables
- Open terminal/gitbash/cygwin to this script directory - just in case
- sh execute.sh
Whitelist Usage:
- Open execute.sh in Text Editor
- Add partial strings that match the desired jar files to variable
- Open terminal/gitbash/cygwin to this script directory - just in case
- sh execute.sh
Features:
- Whitelisting of Desired JAR String Matches
- Option to enable/disable whitelisting
- pkgdiff over parent WARs and all children JAR files
- Option to enable/disable decompiling
- Decompiles all detected/whitelisted (if enabled) jar files and attaches source back to jar file
- Used for delta analysis in html report that pkgdiff creates
- Timestamped Reports - Both Zipped and Regular Folders
- Each time script is ran clears current working report directory
- At end of script takes output and copies to timestamped directory
- At end of script zips the timestamped directory for portability
What it does:
- Runs pkgdiff on the initial two WAR files
- Unzips the WAR files
- Searches for any JAR files in each unzipped path and indexes them
- Attempts to find a JAR match across both of the unzipped WAR paths
- Strips version numbers from the jar filenames
- Checks the whitelist to see if the JAR matches ones you desire to be processed
- (Optional) Runs JD Decompiler and attaches the decompiled code back to the JAR
- Runs pkgdiff on the matched jar files
- Repeat steps 4-6 on all jars
- Takes output and copies all to timestamped directory
- Zips timestamped directory for portability
- Does not remove timestamped directory just zips it
Currently Committed Example:
- Sample WAR from Apache Tomcat Website:
- Jar added to tomcat-sample-new.war from Joda Time Github:
- Jar added to tomcat-sample-old.war from Joda Time Github:
- Setup Commands for WARs/JARs for example that are committed to this repo are in setup_example.sh