pomanalyzer

1.0.0 • Public • Published

pomanalyzer

pomanalyzer is a utility to analyze Apache Maven POM XML files offline. It extracts and formats dependency information, detects duplicate dependencies, and generates reports in various formats.

NPM Package

Features

  • Analyze Maven POM XML files to extract dependency information.
  • Detect duplicate dependencies and summarize them.
  • Generate reports in:
    • HTML format.
    • Markdown format.
  • Customizable output folder for generated reports.

Installation using NPM

# Install globally
npm install -g pomanalyzer

# To uninstall
npm uninstall -g pomanalyzer

Installation in local

To install pomanalyzer, clone the repository and install the dependencies:

git clone https://github.com/zackria/pomanalyzer.git
cd pomanalyzer
npm install

Usage

Run the pomanalyzer CLI tool with the following commands:

Basic Analysis

Analyze a POM file and display the dependencies in the console:

pomanalyzer <pom.xmlfilepath>

Generate HTML Report

Generate an HTML report of the dependencies:

pomanalyzer --html <pom.xmlfilepath>

Generate Markdown Report

Generate a Markdown report of the dependencies:

pomanalyzer --markdown <pom.xmlfilepath>

Generate Both HTML and Markdown Reports

Generate both HTML and Markdown reports:

pomanalyzer --markdown --html <pom.xmlfilepath>

Specify Output Folder

Generate reports and save them to a specific output folder:

pomanalyzer --markdown --html --output-folder output <pom.xmlfilepath>

Example Output

Console Output

Analyzing POM file: <pom.xmlfilepath>
Maven Dependencies:
| Group ID       | Artifact ID    | Version  |
|----------------|----------------|----------|
| org.example    | example-lib    | 1.0.0    |
| org.example    | another-lib    | 2.1.0    |

Duplicate Dependencies:
| Dependency         | Versions       |
|--------------------|----------------|
| org.example:lib    | 1.0.0, 1.1.0   |

HTML and Markdown Reports

Reports are saved in the specified output folder with filenames like:

  • Maven_Dependencies_report.html
  • Maven_Dependencies_report.md

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to improve the tool.

Support

For issues or feature requests, please visit the GitHub Issues page.

Example Commands

pomanalyzer ./test/Test1.xml
pomanalyzer --html ./test/Test1.xml
pomanalyzer --markdown ./test/Test1.xml
pomanalyzer --markdown --html ./test/Test1.xml
pomanalyzer --markdown --html --output-folder output ./test/Test1.xml

Report Examples

Terminal View

Terminal Report

HTML View

HTML Report

Markdown View

Markdown Report

Quality Assurance

This package is thoroughly tested with over 90% code coverage to ensure reliability.

Test Coverage

Compatibility

Developed and tested with:

  • npm v11.1.0
  • Node.js v22.13.0

Package Sidebar

Install

npm i pomanalyzer

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

265 kB

Total Files

32

Last publish

Collaborators

  • zackria