https://github.com/yann39/maven-dependency-extractor
Simple Python program that parses Maven POM files to extract dependency versions
https://github.com/yann39/maven-dependency-extractor
bootstrap maven python
Last synced: about 2 months ago
JSON representation
Simple Python program that parses Maven POM files to extract dependency versions
- Host: GitHub
- URL: https://github.com/yann39/maven-dependency-extractor
- Owner: Yann39
- License: gpl-3.0
- Created: 2024-02-05T12:13:00.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-08T19:07:16.000Z (over 2 years ago)
- Last Synced: 2025-03-09T00:42:00.298Z (over 1 year ago)
- Topics: bootstrap, maven, python
- Language: Python
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Maven dependency extractor
Simple **Python** program that parses **Maven** POM files to build a table of dependency versions.




---
# Table of Contents
* [About the Project](#about-the-project)
* [Prerequisites](#prerequisites)
* [Usage](#usage)
* [Output](#output)
* [License](#license)
# About the Project
This project simply consists of a very basic **Python** program that parses multiple remote **Maven** projects (POM files)
to extract versions of some dependencies and build a summary table.
It is very basic and was just intended to help me visualize the main dependencies of my Maven projects in a single view,
of course it would need a lot of refactoring and improvements to be a real production tool.
# Prerequisites
POM files must be valid POM format and contains the namespace `http://maven.apache.org/POM/4.0.0`.
You must have `` and `` nodes under your `` node.
All dependencies versions should be inside a `` node.
Example :
```xml
my-project
2.1.1
2.2.2.RELEASE
9.0.0
3.9
...
...
```
# Usage
In the `read_pom.py` file :
1. Modify `repositories_list` variable to include your repositories
2. Modify `dependencies_versions_list` variable to include your artifact ids and versions (for each dependency you can set latest version and a minimum required version)
3. Modify `authentication_data` variable to include your credentials to connect to your repositories
Then simply run the `read_pom.py` file.
# Output
It generates an HTML file in the project directory named `versions.html`.
For each dependency, the version will be display as a badge with the right color :
- :green_circle: green if dependency is up-to-date (latest version)
- :orange_circle: orange if dependency is not up-to-date but meets the minimum required version
- :red_circle: red if dependency is out of date (does not even meet the minimum required version)
Here is an example output :

# License
[General Public License (GPL) v3](https://www.gnu.org/licenses/gpl-3.0.en.html)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not,
see .