Skip to main content

Compare JAR libraries between two directories. Maven-aware, classifier-aware, resilient.

Project description

jardiff

jardiff is a command-line tool for comparing two directories of Java archive (JAR) files. It attempts to identify matching libraries by examining Maven metadata (pom.properties inside the JAR), manifest attributes, and heuristics based on the filename. Versions are parsed robustly, including common qualifiers such as SNAPSHOT or alpha, and classifier suffixes like sources or tests are accounted for when present.

The tool can output human-readable text summaries or structured JSON/XML reports. It optionally computes cryptographic hashes of the JAR files to detect content changes even when the version string remains the same.

Installation

The package is available on PyPI. The recommended way to install command-line utilities is with pipx:

pipx install jardiff

Alternatively, you can use pip directly:

pip install jardiff

Usage

To compare two directories of JAR files:

jardiff diff path/to/libA path/to/libB

Key options include:

Option Description
-r, --recurse Scan subdirectories recursively
--packages Compare Java package sets to detect API differences
--hash Compute file hashes (sha1, sha256, md5)
--format Output format: text (default), json, or xml
--output Write the output to the specified file instead of stdout

For example, to produce a JSON report of the differences:

jardiff diff --format json --output report.json /opt/app/lib_old /opt/app/lib_new

See the command-line help for more details:

jardiff diff --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jardiff-0.3.0.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jardiff-0.3.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file jardiff-0.3.0.tar.gz.

File metadata

  • Download URL: jardiff-0.3.0.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jardiff-0.3.0.tar.gz
Algorithm Hash digest
SHA256 0a3aab0c0a4e310a6fbe119854e0daa9b8bd1c8bd74a540bc367fab599314b6b
MD5 78f6b3886ccea0dcfdbe1ce99436ae15
BLAKE2b-256 5c9cf658faf7cb98cfa89457ae5f4f1a78af5d79946c84c3456d60cc4dac5e27

See more details on using hashes here.

File details

Details for the file jardiff-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: jardiff-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jardiff-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb35b98e902ff2318da1addcb48a3069a8a244864f31db08380e9343ee5e111c
MD5 65a855cc932a61943feec8541af57e94
BLAKE2b-256 50353982bc53fd42be2f448cff04621d60e1b6b963418eac8ff252f72e937def

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page