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.
- 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.
# Install globally
npm install -g pomanalyzer
# To uninstall
npm uninstall -g pomanalyzer
To install pomanalyzer
, clone the repository and install the dependencies:
git clone https://github.com/zackria/pomanalyzer.git
cd pomanalyzer
npm install
Run the pomanalyzer
CLI tool with the following commands:
Analyze a POM file and display the dependencies in the console:
pomanalyzer <pom.xmlfilepath>
Generate an HTML report of the dependencies:
pomanalyzer --html <pom.xmlfilepath>
Generate a Markdown report of the dependencies:
pomanalyzer --markdown <pom.xmlfilepath>
Generate both HTML and Markdown reports:
pomanalyzer --markdown --html <pom.xmlfilepath>
Generate reports and save them to a specific output folder:
pomanalyzer --markdown --html --output-folder output <pom.xmlfilepath>
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 |
Reports are saved in the specified output folder with filenames like:
Maven_Dependencies_report.html
Maven_Dependencies_report.md
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Feel free to open issues or submit pull requests to improve the tool.
For issues or feature requests, please visit the GitHub Issues page.
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
This package is thoroughly tested with over 90% code coverage to ensure reliability.
Developed and tested with:
- npm v11.1.0
- Node.js v22.13.0