Metadata-Version: 2.4
Name: jardiff
Version: 0.3.0
Summary: Compare JAR libraries between two directories. Maven-aware, classifier-aware, resilient.
Author: Mohamed Sadok Aounallah
License: MIT License
        
        Copyright (c) 2025 Sadok Aounallah
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: dependencies,diff,jar,java,maven
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# 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`](https://pypi.org/project/pipx/):

```bash
pipx install jardiff
```

Alternatively, you can use `pip` directly:

```bash
pip install jardiff
```

## Usage

To compare two directories of JAR files:

```bash
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:

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

See the command-line help for more details:

```bash
jardiff diff --help
```
