mvn-tree-visualizer 1.2.0__tar.gz → 1.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mvn-tree-visualizer might be problematic. Click here for more details.
- mvn_tree_visualizer-1.3.0/.github/FUNDING.yml +13 -0
- mvn_tree_visualizer-1.3.0/.github/ISSUE_TEMPLATE/bug_report.md +36 -0
- mvn_tree_visualizer-1.3.0/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
- mvn_tree_visualizer-1.3.0/.github/ISSUE_TEMPLATE/question.md +21 -0
- mvn_tree_visualizer-1.3.0/.github/PULL_REQUEST_TEMPLATE.md +30 -0
- mvn_tree_visualizer-1.3.0/.github/SECURITY.md +51 -0
- mvn_tree_visualizer-1.3.0/.github/dependabot.yml +26 -0
- mvn_tree_visualizer-1.3.0/.github/workflows/ci.yml +38 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/.gitignore +9 -1
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/CHANGELOG.md +30 -0
- mvn_tree_visualizer-1.3.0/PKG-INFO +190 -0
- mvn_tree_visualizer-1.3.0/README.md +170 -0
- mvn_tree_visualizer-1.3.0/ROADMAP.md +100 -0
- mvn_tree_visualizer-1.3.0/docs/INTEGRATION.md +261 -0
- mvn_tree_visualizer-1.3.0/docs/README.md +42 -0
- mvn_tree_visualizer-1.3.0/examples/README.md +62 -0
- mvn_tree_visualizer-1.3.0/examples/complex-project/diagram.html +145 -0
- mvn_tree_visualizer-1.3.0/examples/complex-project/maven_dependency_file +84 -0
- mvn_tree_visualizer-1.3.0/examples/simple-project/dependencies.json +40 -0
- mvn_tree_visualizer-1.3.0/examples/simple-project/diagram.html +70 -0
- mvn_tree_visualizer-1.3.0/examples/simple-project/maven_dependency_file +9 -0
- mvn_tree_visualizer-1.3.0/examples/watch-test/README.md +22 -0
- mvn_tree_visualizer-1.3.0/examples/watch-test/test_maven_file +2 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/issues.md +4 -15
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/pyproject.toml +2 -1
- mvn_tree_visualizer-1.3.0/src/mvn_tree_visualizer/cli.py +215 -0
- mvn_tree_visualizer-1.3.0/src/mvn_tree_visualizer/diagram.py +26 -0
- mvn_tree_visualizer-1.3.0/src/mvn_tree_visualizer/exceptions.py +25 -0
- mvn_tree_visualizer-1.3.0/src/mvn_tree_visualizer/file_watcher.py +71 -0
- mvn_tree_visualizer-1.3.0/src/mvn_tree_visualizer/get_dependencies_in_one_file.py +40 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/src/mvn_tree_visualizer/outputs/json_output.py +2 -2
- mvn_tree_visualizer-1.3.0/src/mvn_tree_visualizer/validation.py +86 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/tests/test_json_output.py +7 -7
- mvn_tree_visualizer-1.3.0/tests/test_watch_mode.py +168 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/uv.lock +27 -2
- mvn_tree_visualizer-1.2.0/PKG-INFO +0 -94
- mvn_tree_visualizer-1.2.0/README.md +0 -75
- mvn_tree_visualizer-1.2.0/ROADMAP.md +0 -34
- mvn_tree_visualizer-1.2.0/src/mvn_tree_visualizer/cli.py +0 -94
- mvn_tree_visualizer-1.2.0/src/mvn_tree_visualizer/diagram.py +0 -14
- mvn_tree_visualizer-1.2.0/src/mvn_tree_visualizer/get_dependencies_in_one_file.py +0 -13
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/.github/workflows/publish.yml +0 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/.python-version +0 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/CODE_OF_CONDUCT.md +0 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/CONTRIBUTING.md +0 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/LICENSE +0 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/ruff.toml +0 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/src/mvn_tree_visualizer/TEMPLATE.py +0 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/src/mvn_tree_visualizer/__init__.py +0 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/src/mvn_tree_visualizer/__main__.py +0 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/src/mvn_tree_visualizer/outputs/html_output.py +0 -0
- {mvn_tree_visualizer-1.2.0 → mvn_tree_visualizer-1.3.0}/tests/test_html_output.py +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: # Replace with a single GitHub username or organization
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: irakliskonsoulas
|
|
7
|
+
tidelift: # Replace with a single Tidelift package-name e.g., npm/babel
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
13
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: '[BUG] '
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Describe the bug**
|
|
10
|
+
A clear and concise description of what the bug is.
|
|
11
|
+
|
|
12
|
+
**To Reproduce**
|
|
13
|
+
Steps to reproduce the behavior:
|
|
14
|
+
1. Run command '...'
|
|
15
|
+
2. See error
|
|
16
|
+
|
|
17
|
+
**Expected behavior**
|
|
18
|
+
A clear and concise description of what you expected to happen.
|
|
19
|
+
|
|
20
|
+
**Maven dependency tree sample**
|
|
21
|
+
Please provide a sample of your Maven dependency tree output:
|
|
22
|
+
```
|
|
23
|
+
[paste your maven dependency tree here]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Screenshots**
|
|
27
|
+
If applicable, add screenshots to help explain your problem.
|
|
28
|
+
|
|
29
|
+
**Environment:**
|
|
30
|
+
- OS: [e.g. Windows 10, macOS, Ubuntu 20.04]
|
|
31
|
+
- Python version: [e.g. 3.13]
|
|
32
|
+
- Package version: [e.g. 1.2.0]
|
|
33
|
+
- Maven version: [e.g. 3.8.1]
|
|
34
|
+
|
|
35
|
+
**Additional context**
|
|
36
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: '[FEATURE] '
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Is your feature request related to a problem? Please describe.**
|
|
10
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
11
|
+
|
|
12
|
+
**Describe the solution you'd like**
|
|
13
|
+
A clear and concise description of what you want to happen.
|
|
14
|
+
|
|
15
|
+
**Describe alternatives you've considered**
|
|
16
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
17
|
+
|
|
18
|
+
**Use case**
|
|
19
|
+
Describe how this feature would be used and who would benefit from it.
|
|
20
|
+
|
|
21
|
+
**Additional context**
|
|
22
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Question
|
|
3
|
+
about: Ask a question about usage or functionality
|
|
4
|
+
title: '[QUESTION] '
|
|
5
|
+
labels: question
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Question**
|
|
10
|
+
What would you like to know?
|
|
11
|
+
|
|
12
|
+
**Context**
|
|
13
|
+
Provide any relevant context about your use case or what you're trying to achieve.
|
|
14
|
+
|
|
15
|
+
**What you've tried**
|
|
16
|
+
If applicable, describe what you've already tried.
|
|
17
|
+
|
|
18
|
+
**Environment (if relevant):**
|
|
19
|
+
- OS: [e.g. Windows 10, macOS, Ubuntu 20.04]
|
|
20
|
+
- Python version: [e.g. 3.13]
|
|
21
|
+
- Package version: [e.g. 1.2.0]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
Brief description of the changes made in this PR.
|
|
3
|
+
|
|
4
|
+
## Type of Change
|
|
5
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
6
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
7
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
8
|
+
- [ ] Documentation update
|
|
9
|
+
- [ ] Code refactoring
|
|
10
|
+
- [ ] Performance improvement
|
|
11
|
+
- [ ] Other (please describe):
|
|
12
|
+
|
|
13
|
+
## Testing
|
|
14
|
+
- [ ] I have added tests that prove my fix is effective or that my feature works
|
|
15
|
+
- [ ] New and existing unit tests pass locally with my changes
|
|
16
|
+
- [ ] I have tested the CLI functionality manually
|
|
17
|
+
|
|
18
|
+
## Checklist
|
|
19
|
+
- [ ] My code follows the project's style guidelines
|
|
20
|
+
- [ ] I have performed a self-review of my code
|
|
21
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
22
|
+
- [ ] I have made corresponding changes to the documentation
|
|
23
|
+
- [ ] My changes generate no new warnings
|
|
24
|
+
- [ ] I have updated the CHANGELOG.md file (if applicable)
|
|
25
|
+
|
|
26
|
+
## Screenshots (if applicable)
|
|
27
|
+
Add screenshots to help explain your changes.
|
|
28
|
+
|
|
29
|
+
## Additional Notes
|
|
30
|
+
Any additional information that would be helpful for reviewers.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
We actively support the following versions of mvn-tree-visualizer:
|
|
6
|
+
|
|
7
|
+
| Version | Supported |
|
|
8
|
+
| ------- | ------------------ |
|
|
9
|
+
| 1.2.x | :white_check_mark: |
|
|
10
|
+
| 1.1.x | :white_check_mark: |
|
|
11
|
+
| 1.0.x | :x: |
|
|
12
|
+
|
|
13
|
+
## Reporting a Vulnerability
|
|
14
|
+
|
|
15
|
+
If you discover a security vulnerability in mvn-tree-visualizer, please report it to us responsibly.
|
|
16
|
+
|
|
17
|
+
### How to Report
|
|
18
|
+
|
|
19
|
+
1. **Do not create a public GitHub issue** for security vulnerabilities
|
|
20
|
+
2. **Email us directly** at: dyka3773@gmail.com
|
|
21
|
+
3. **Include the following information:**
|
|
22
|
+
- Description of the vulnerability
|
|
23
|
+
- Steps to reproduce
|
|
24
|
+
- Affected versions
|
|
25
|
+
- Potential impact
|
|
26
|
+
- Suggested fix (if available)
|
|
27
|
+
|
|
28
|
+
### Response Timeline
|
|
29
|
+
|
|
30
|
+
- **Acknowledgment**: We will acknowledge receipt of your report as soon as possible (usually within 48 hours)
|
|
31
|
+
- **Assessment**: We will assess the vulnerability within 7 days
|
|
32
|
+
- **Fix**: We will work on a fix and release it as soon as possible
|
|
33
|
+
- **Credit**: We will credit you in the security advisory (unless you prefer to remain anonymous)
|
|
34
|
+
|
|
35
|
+
### Security Best Practices
|
|
36
|
+
|
|
37
|
+
When using mvn-tree-visualizer:
|
|
38
|
+
|
|
39
|
+
1. **Keep updated**: Always use the latest version
|
|
40
|
+
2. **Validate inputs**: Be cautious with dependency files from untrusted sources
|
|
41
|
+
3. **File permissions**: Ensure proper file permissions on generated outputs
|
|
42
|
+
4. **CI/CD**: Use in secure CI/CD environments
|
|
43
|
+
|
|
44
|
+
### Scope
|
|
45
|
+
|
|
46
|
+
This security policy applies to:
|
|
47
|
+
- The mvn-tree-visualizer Python package
|
|
48
|
+
- Official GitHub repository
|
|
49
|
+
- Documentation and examples
|
|
50
|
+
|
|
51
|
+
Thank you for helping keep mvn-tree-visualizer secure!
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# Enable version updates for Python dependencies
|
|
4
|
+
- package-ecosystem: "pip"
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "weekly"
|
|
8
|
+
open-pull-requests-limit: 10
|
|
9
|
+
commit-message:
|
|
10
|
+
prefix: "deps"
|
|
11
|
+
prefix-development: "deps-dev"
|
|
12
|
+
labels:
|
|
13
|
+
- "dependencies"
|
|
14
|
+
- "python"
|
|
15
|
+
|
|
16
|
+
# Enable version updates for GitHub Actions
|
|
17
|
+
- package-ecosystem: "github-actions"
|
|
18
|
+
directory: "/"
|
|
19
|
+
schedule:
|
|
20
|
+
interval: "weekly"
|
|
21
|
+
open-pull-requests-limit: 5
|
|
22
|
+
commit-message:
|
|
23
|
+
prefix: "ci"
|
|
24
|
+
labels:
|
|
25
|
+
- "dependencies"
|
|
26
|
+
- "github-actions"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ master, develop ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ master, develop ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.13"]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
pip install -e .
|
|
28
|
+
pip install pytest ruff
|
|
29
|
+
|
|
30
|
+
- name: Run linter
|
|
31
|
+
run: ruff check src/ tests/
|
|
32
|
+
|
|
33
|
+
- name: Run tests
|
|
34
|
+
run: pytest -v
|
|
35
|
+
|
|
36
|
+
- name: Test CLI
|
|
37
|
+
run: |
|
|
38
|
+
python -m mvn_tree_visualizer --help
|
|
@@ -18,6 +18,14 @@ lib/
|
|
|
18
18
|
lib64/
|
|
19
19
|
parts/
|
|
20
20
|
sdist/
|
|
21
|
+
|
|
22
|
+
# Project specific - only ignore in root directory
|
|
23
|
+
/dependency_tree.txt
|
|
24
|
+
/maven_dependency_file
|
|
25
|
+
/diagram.html
|
|
26
|
+
/dependencies.json
|
|
27
|
+
/*.svg
|
|
28
|
+
|
|
21
29
|
var/
|
|
22
30
|
wheels/
|
|
23
31
|
share/python-wheels/
|
|
@@ -179,7 +187,7 @@ cython_debug/
|
|
|
179
187
|
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
180
188
|
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
181
189
|
# you could uncomment the following to ignore the entire vscode folder
|
|
182
|
-
|
|
190
|
+
.vscode/
|
|
183
191
|
|
|
184
192
|
# Ruff stuff:
|
|
185
193
|
.ruff_cache/
|
|
@@ -7,6 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
- Placeholder for future features
|
|
12
|
+
|
|
13
|
+
## [1.3.0] - 2025-07-09
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- Watch mode functionality with `--watch` flag for automatic diagram regeneration
|
|
17
|
+
- File system monitoring using watchdog library for real-time updates
|
|
18
|
+
- New file_watcher module for decoupled file monitoring logic
|
|
19
|
+
- Enhanced error handling system with comprehensive user guidance
|
|
20
|
+
- Clear error messages for missing dependency files with helpful Maven commands
|
|
21
|
+
- Specific validation for directories, file permissions, and content
|
|
22
|
+
- Detailed diagnostics for parsing errors and empty files
|
|
23
|
+
- User-friendly error messages with emojis and actionable suggestions
|
|
24
|
+
- Custom exception classes for better error categorization
|
|
25
|
+
- Comprehensive test coverage for error scenarios
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- **BREAKING**: JSON output now uses simplified package names (artifact-id only) to match HTML output behavior
|
|
29
|
+
- Root packages now show as "my-app" instead of "com.example:my-app"
|
|
30
|
+
- Ensures consistency between HTML and JSON output formats
|
|
31
|
+
- Refactored CLI module to separate concerns and improve maintainability
|
|
32
|
+
- Improved error handling with timestamped console output and graceful failure modes
|
|
33
|
+
- Enhanced file processing with better encoding handling (UTF-8) and validation
|
|
34
|
+
- Updated dependency file merging logic with better error detection
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
- Removed unused imports and improved code organization
|
|
38
|
+
- Fixed intermediate file path handling in diagram generation
|
|
39
|
+
|
|
10
40
|
## [1.2.0] - 2025-07-09
|
|
11
41
|
|
|
12
42
|
### Added
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mvn-tree-visualizer
|
|
3
|
+
Version: 1.3.0
|
|
4
|
+
Summary: A simple command line tool to visualize the dependency tree of a Maven project in a graphical format.
|
|
5
|
+
Project-URL: source, https://github.com/dyka3773/mvn-tree-visualizer
|
|
6
|
+
Author-email: Iraklis Konsoulas <dyka3773@gmail.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Keywords: cli,command-line,dependency,graph,maven,mermaid,tool,tree,visualization
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
15
|
+
Classifier: Typing :: Typed
|
|
16
|
+
Requires-Python: >=3.13
|
|
17
|
+
Requires-Dist: jinja2>=3.1.6
|
|
18
|
+
Requires-Dist: watchdog>=6.0.0
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# Maven Dependency Tree Visualizer
|
|
22
|
+
|
|
23
|
+
[](https://badge.fury.io/py/mvn-tree-visualizer)
|
|
24
|
+

|
|
25
|
+

|
|
26
|
+
[](https://pepy.tech/project/mvn-tree-visualizer)
|
|
27
|
+
[](https://github.com/dyka3773/mvn-tree-visualizer/actions)
|
|
28
|
+
[](https://github.com/astral-sh/ruff)
|
|
29
|
+
|
|
30
|
+
A simple command-line tool to visualize the dependency tree of a Maven project in a graphical and interactive format.
|
|
31
|
+
|
|
32
|
+
This tool was born out of the frustration of not being able to easily visualize the dependency tree of a Maven project. The `mvn dependency:tree` command is great, but the output can be hard to read, especially for large projects. This tool aims to solve that problem by providing a simple way to generate an interactive diagram or a structured JSON output of the dependency tree.
|
|
33
|
+
|
|
34
|
+
## Table of Contents
|
|
35
|
+
- [Features](#features)
|
|
36
|
+
- [Installation](#installation)
|
|
37
|
+
- [How to Use](#how-to-use)
|
|
38
|
+
- [Examples](#examples)
|
|
39
|
+
- [Options](#options)
|
|
40
|
+
- [Performance](#performance)
|
|
41
|
+
- [Troubleshooting](#troubleshooting)
|
|
42
|
+
- [Contributing](#contributing)
|
|
43
|
+
- [License](#license)
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
Install the package from PyPI:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install mvn-tree-visualizer
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Features
|
|
54
|
+
|
|
55
|
+
- **🌐 Multiple Output Formats:**
|
|
56
|
+
- **HTML:** Generates an interactive HTML diagram of your dependency tree using Mermaid.js.
|
|
57
|
+
- **JSON:** Creates a structured JSON representation of the dependency tree, perfect for scripting or integration with other tools.
|
|
58
|
+
- **🔄 Watch Mode:** Automatically regenerates diagrams when Maven dependency files change using the `--watch` flag.
|
|
59
|
+
- **📋 Version Display:** Show or hide dependency versions in both HTML and JSON outputs using the `--show-versions` flag.
|
|
60
|
+
- **⚡ Easy to Use:** A simple command-line interface that gets the job done with minimal configuration.
|
|
61
|
+
- **📂 File Merging:** Automatically finds and merges multiple `maven_dependency_file` files from different subdirectories.
|
|
62
|
+
- **🎨 Customizable Output:** Specify the output file name and location.
|
|
63
|
+
- **💾 SVG Export:** Download the generated diagram as an SVG file directly from the HTML page.
|
|
64
|
+
|
|
65
|
+
## How to Use
|
|
66
|
+
|
|
67
|
+
### Step 1: Generate the dependency file
|
|
68
|
+
|
|
69
|
+
Run the following command in your terminal at the root of your Maven project. This will generate a file named `maven_dependency_file` in each module's `target` directory.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
mvn dependency:tree -DoutputFile=maven_dependency_file -DappendOutput=true
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
> **💡 Tip:** You can add other options like `-Dincludes="org.example"` to filter the dependencies.
|
|
76
|
+
|
|
77
|
+
### Step 2: Visualize the dependency tree
|
|
78
|
+
|
|
79
|
+
Use the `mvn-tree-visualizer` command to generate the diagram.
|
|
80
|
+
|
|
81
|
+
#### HTML Output (Interactive Diagram)
|
|
82
|
+
```bash
|
|
83
|
+
mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --format html
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
#### JSON Output (Structured Data)
|
|
87
|
+
```bash
|
|
88
|
+
mvn_tree_visualizer --filename "maven_dependency_file" --output "dependencies.json" --format json
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
#### With Version Information
|
|
92
|
+
```bash
|
|
93
|
+
mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --show-versions
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
#### JSON Output with Versions
|
|
97
|
+
```bash
|
|
98
|
+
mvn_tree_visualizer --filename "maven_dependency_file" --output "dependencies.json" --format json --show-versions
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
#### Watch Mode (Auto-regeneration)
|
|
102
|
+
```bash
|
|
103
|
+
mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --watch
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
> **💡 Tip:** In watch mode, the tool will monitor for changes to your Maven dependency files and automatically regenerate the diagram. Perfect for development workflows! Press `Ctrl+C` to stop watching.
|
|
107
|
+
|
|
108
|
+
### Step 3: View the output
|
|
109
|
+
|
|
110
|
+
- **HTML:** Open the generated `diagram.html` file in your web browser to view the interactive dependency tree.
|
|
111
|
+
- **JSON:** Use the `dependencies.json` file in your scripts or other tools.
|
|
112
|
+
|
|
113
|
+
## Examples
|
|
114
|
+
|
|
115
|
+
Check out the [`examples/`](examples/) directory for sample Maven dependency files and their outputs:
|
|
116
|
+
|
|
117
|
+
- **Simple Project**: Basic Spring Boot application with common dependencies
|
|
118
|
+
- **Complex Project**: Realistic microservice with comprehensive dependencies
|
|
119
|
+
|
|
120
|
+
Each example includes:
|
|
121
|
+
- Sample Maven dependency tree file
|
|
122
|
+
- Generated HTML and JSON outputs
|
|
123
|
+
- Usage instructions
|
|
124
|
+
|
|
125
|
+
## Options
|
|
126
|
+
|
|
127
|
+
| Option | Description | Default |
|
|
128
|
+
|--------|-------------|---------|
|
|
129
|
+
| `--filename` | The name of the file containing the Maven dependency tree | `maven_dependency_file` |
|
|
130
|
+
| `--output` | The name of the output file | `diagram.html` |
|
|
131
|
+
| `--format` | The output format (`html` or `json`) | `html` |
|
|
132
|
+
| `--show-versions` | Show dependency versions in the diagram | `False` |
|
|
133
|
+
| `--watch` | Watch for file changes and auto-regenerate diagram | `False` |
|
|
134
|
+
| `--directory` | The directory to scan for the Maven dependency file(s) | current directory |
|
|
135
|
+
| `--keep-tree` | Keep the intermediate `dependency_tree.txt` file | `False` |
|
|
136
|
+
| `--help` | Show the help message and exit | - |
|
|
137
|
+
|
|
138
|
+
## Performance
|
|
139
|
+
|
|
140
|
+
**For Large Projects:**
|
|
141
|
+
- Consider filtering dependencies at the Maven level using `-Dincludes` or `-Dexcludes` parameters
|
|
142
|
+
- The tool can handle projects with hundreds of dependencies efficiently
|
|
143
|
+
|
|
144
|
+
**Memory Usage:**
|
|
145
|
+
- Memory usage scales with the number of dependencies
|
|
146
|
+
- Typical projects (50-200 dependencies) use minimal memory
|
|
147
|
+
- Very large projects (1000+ dependencies) may require more memory
|
|
148
|
+
|
|
149
|
+
## Troubleshooting
|
|
150
|
+
|
|
151
|
+
### Common Issues
|
|
152
|
+
|
|
153
|
+
**"No dependency files found"**
|
|
154
|
+
- The tool now provides detailed guidance including:
|
|
155
|
+
- Exact directory searched and filename expected
|
|
156
|
+
- Maven commands to generate dependency files
|
|
157
|
+
- Instructions to ensure you're in a directory with pom.xml
|
|
158
|
+
|
|
159
|
+
**"Empty or invalid output"**
|
|
160
|
+
- Enhanced error messages now include:
|
|
161
|
+
- Specific error details (encoding, permissions, empty files)
|
|
162
|
+
- Validation of file content and format
|
|
163
|
+
- Suggestions for fixing common parsing issues
|
|
164
|
+
|
|
165
|
+
**"Browser doesn't display the diagram"**
|
|
166
|
+
- Ensure you're opening the HTML file in a modern browser
|
|
167
|
+
- Check browser console for JavaScript errors
|
|
168
|
+
- Try a different browser (Chrome, Firefox, Safari)
|
|
169
|
+
|
|
170
|
+
**"Permission denied errors"**
|
|
171
|
+
- Improved diagnostics for:
|
|
172
|
+
- Directory read/write permissions
|
|
173
|
+
- File access issues
|
|
174
|
+
- Output directory creation problems
|
|
175
|
+
|
|
176
|
+
### Getting Help
|
|
177
|
+
|
|
178
|
+
- Check the [examples](examples/) directory for working samples
|
|
179
|
+
- Review the [issues](https://github.com/dyka3773/mvn-tree-visualizer/issues) page
|
|
180
|
+
- Create a new issue with your Maven dependency file sample
|
|
181
|
+
|
|
182
|
+
## Contributing
|
|
183
|
+
|
|
184
|
+
Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.
|
|
185
|
+
|
|
186
|
+
Please read our [CONTRIBUTING.md](CONTRIBUTING.md) file for more details.
|
|
187
|
+
|
|
188
|
+
## License
|
|
189
|
+
|
|
190
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Maven Dependency Tree Visualizer
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/py/mvn-tree-visualizer)
|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
[](https://pepy.tech/project/mvn-tree-visualizer)
|
|
7
|
+
[](https://github.com/dyka3773/mvn-tree-visualizer/actions)
|
|
8
|
+
[](https://github.com/astral-sh/ruff)
|
|
9
|
+
|
|
10
|
+
A simple command-line tool to visualize the dependency tree of a Maven project in a graphical and interactive format.
|
|
11
|
+
|
|
12
|
+
This tool was born out of the frustration of not being able to easily visualize the dependency tree of a Maven project. The `mvn dependency:tree` command is great, but the output can be hard to read, especially for large projects. This tool aims to solve that problem by providing a simple way to generate an interactive diagram or a structured JSON output of the dependency tree.
|
|
13
|
+
|
|
14
|
+
## Table of Contents
|
|
15
|
+
- [Features](#features)
|
|
16
|
+
- [Installation](#installation)
|
|
17
|
+
- [How to Use](#how-to-use)
|
|
18
|
+
- [Examples](#examples)
|
|
19
|
+
- [Options](#options)
|
|
20
|
+
- [Performance](#performance)
|
|
21
|
+
- [Troubleshooting](#troubleshooting)
|
|
22
|
+
- [Contributing](#contributing)
|
|
23
|
+
- [License](#license)
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
Install the package from PyPI:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install mvn-tree-visualizer
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Features
|
|
34
|
+
|
|
35
|
+
- **🌐 Multiple Output Formats:**
|
|
36
|
+
- **HTML:** Generates an interactive HTML diagram of your dependency tree using Mermaid.js.
|
|
37
|
+
- **JSON:** Creates a structured JSON representation of the dependency tree, perfect for scripting or integration with other tools.
|
|
38
|
+
- **🔄 Watch Mode:** Automatically regenerates diagrams when Maven dependency files change using the `--watch` flag.
|
|
39
|
+
- **📋 Version Display:** Show or hide dependency versions in both HTML and JSON outputs using the `--show-versions` flag.
|
|
40
|
+
- **⚡ Easy to Use:** A simple command-line interface that gets the job done with minimal configuration.
|
|
41
|
+
- **📂 File Merging:** Automatically finds and merges multiple `maven_dependency_file` files from different subdirectories.
|
|
42
|
+
- **🎨 Customizable Output:** Specify the output file name and location.
|
|
43
|
+
- **💾 SVG Export:** Download the generated diagram as an SVG file directly from the HTML page.
|
|
44
|
+
|
|
45
|
+
## How to Use
|
|
46
|
+
|
|
47
|
+
### Step 1: Generate the dependency file
|
|
48
|
+
|
|
49
|
+
Run the following command in your terminal at the root of your Maven project. This will generate a file named `maven_dependency_file` in each module's `target` directory.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
mvn dependency:tree -DoutputFile=maven_dependency_file -DappendOutput=true
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
> **💡 Tip:** You can add other options like `-Dincludes="org.example"` to filter the dependencies.
|
|
56
|
+
|
|
57
|
+
### Step 2: Visualize the dependency tree
|
|
58
|
+
|
|
59
|
+
Use the `mvn-tree-visualizer` command to generate the diagram.
|
|
60
|
+
|
|
61
|
+
#### HTML Output (Interactive Diagram)
|
|
62
|
+
```bash
|
|
63
|
+
mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --format html
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### JSON Output (Structured Data)
|
|
67
|
+
```bash
|
|
68
|
+
mvn_tree_visualizer --filename "maven_dependency_file" --output "dependencies.json" --format json
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### With Version Information
|
|
72
|
+
```bash
|
|
73
|
+
mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --show-versions
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
#### JSON Output with Versions
|
|
77
|
+
```bash
|
|
78
|
+
mvn_tree_visualizer --filename "maven_dependency_file" --output "dependencies.json" --format json --show-versions
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
#### Watch Mode (Auto-regeneration)
|
|
82
|
+
```bash
|
|
83
|
+
mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --watch
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
> **💡 Tip:** In watch mode, the tool will monitor for changes to your Maven dependency files and automatically regenerate the diagram. Perfect for development workflows! Press `Ctrl+C` to stop watching.
|
|
87
|
+
|
|
88
|
+
### Step 3: View the output
|
|
89
|
+
|
|
90
|
+
- **HTML:** Open the generated `diagram.html` file in your web browser to view the interactive dependency tree.
|
|
91
|
+
- **JSON:** Use the `dependencies.json` file in your scripts or other tools.
|
|
92
|
+
|
|
93
|
+
## Examples
|
|
94
|
+
|
|
95
|
+
Check out the [`examples/`](examples/) directory for sample Maven dependency files and their outputs:
|
|
96
|
+
|
|
97
|
+
- **Simple Project**: Basic Spring Boot application with common dependencies
|
|
98
|
+
- **Complex Project**: Realistic microservice with comprehensive dependencies
|
|
99
|
+
|
|
100
|
+
Each example includes:
|
|
101
|
+
- Sample Maven dependency tree file
|
|
102
|
+
- Generated HTML and JSON outputs
|
|
103
|
+
- Usage instructions
|
|
104
|
+
|
|
105
|
+
## Options
|
|
106
|
+
|
|
107
|
+
| Option | Description | Default |
|
|
108
|
+
|--------|-------------|---------|
|
|
109
|
+
| `--filename` | The name of the file containing the Maven dependency tree | `maven_dependency_file` |
|
|
110
|
+
| `--output` | The name of the output file | `diagram.html` |
|
|
111
|
+
| `--format` | The output format (`html` or `json`) | `html` |
|
|
112
|
+
| `--show-versions` | Show dependency versions in the diagram | `False` |
|
|
113
|
+
| `--watch` | Watch for file changes and auto-regenerate diagram | `False` |
|
|
114
|
+
| `--directory` | The directory to scan for the Maven dependency file(s) | current directory |
|
|
115
|
+
| `--keep-tree` | Keep the intermediate `dependency_tree.txt` file | `False` |
|
|
116
|
+
| `--help` | Show the help message and exit | - |
|
|
117
|
+
|
|
118
|
+
## Performance
|
|
119
|
+
|
|
120
|
+
**For Large Projects:**
|
|
121
|
+
- Consider filtering dependencies at the Maven level using `-Dincludes` or `-Dexcludes` parameters
|
|
122
|
+
- The tool can handle projects with hundreds of dependencies efficiently
|
|
123
|
+
|
|
124
|
+
**Memory Usage:**
|
|
125
|
+
- Memory usage scales with the number of dependencies
|
|
126
|
+
- Typical projects (50-200 dependencies) use minimal memory
|
|
127
|
+
- Very large projects (1000+ dependencies) may require more memory
|
|
128
|
+
|
|
129
|
+
## Troubleshooting
|
|
130
|
+
|
|
131
|
+
### Common Issues
|
|
132
|
+
|
|
133
|
+
**"No dependency files found"**
|
|
134
|
+
- The tool now provides detailed guidance including:
|
|
135
|
+
- Exact directory searched and filename expected
|
|
136
|
+
- Maven commands to generate dependency files
|
|
137
|
+
- Instructions to ensure you're in a directory with pom.xml
|
|
138
|
+
|
|
139
|
+
**"Empty or invalid output"**
|
|
140
|
+
- Enhanced error messages now include:
|
|
141
|
+
- Specific error details (encoding, permissions, empty files)
|
|
142
|
+
- Validation of file content and format
|
|
143
|
+
- Suggestions for fixing common parsing issues
|
|
144
|
+
|
|
145
|
+
**"Browser doesn't display the diagram"**
|
|
146
|
+
- Ensure you're opening the HTML file in a modern browser
|
|
147
|
+
- Check browser console for JavaScript errors
|
|
148
|
+
- Try a different browser (Chrome, Firefox, Safari)
|
|
149
|
+
|
|
150
|
+
**"Permission denied errors"**
|
|
151
|
+
- Improved diagnostics for:
|
|
152
|
+
- Directory read/write permissions
|
|
153
|
+
- File access issues
|
|
154
|
+
- Output directory creation problems
|
|
155
|
+
|
|
156
|
+
### Getting Help
|
|
157
|
+
|
|
158
|
+
- Check the [examples](examples/) directory for working samples
|
|
159
|
+
- Review the [issues](https://github.com/dyka3773/mvn-tree-visualizer/issues) page
|
|
160
|
+
- Create a new issue with your Maven dependency file sample
|
|
161
|
+
|
|
162
|
+
## Contributing
|
|
163
|
+
|
|
164
|
+
Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.
|
|
165
|
+
|
|
166
|
+
Please read our [CONTRIBUTING.md](CONTRIBUTING.md) file for more details.
|
|
167
|
+
|
|
168
|
+
## License
|
|
169
|
+
|
|
170
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|