mvn-tree-visualizer 1.5.0__tar.gz → 1.5.1__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.
Files changed (55) hide show
  1. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/.github/SECURITY.md +4 -2
  2. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/PKG-INFO +8 -8
  3. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/README.md +7 -7
  4. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/docs/INTEGRATION.md +9 -9
  5. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/examples/README.md +12 -12
  6. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/examples/watch-test/README.md +1 -1
  7. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/pyproject.toml +1 -1
  8. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/src/mvn_tree_visualizer/cli.py +2 -4
  9. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/src/mvn_tree_visualizer/validation.py +0 -9
  10. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/uv.lock +1 -1
  11. mvn_tree_visualizer-1.5.0/.github/instructions/copilot-instructions.md +0 -92
  12. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/.github/FUNDING.yml +0 -0
  13. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  14. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  15. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/.github/ISSUE_TEMPLATE/question.md +0 -0
  16. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  17. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/.github/copilot-instructions.md +0 -0
  18. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/.github/dependabot.yml +0 -0
  19. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/.github/workflows/ci.yml +0 -0
  20. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/.github/workflows/release.yml +0 -0
  21. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/.gitignore +0 -0
  22. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/.python-version +0 -0
  23. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/CHANGELOG.md +0 -0
  24. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/CODE_OF_CONDUCT.md +0 -0
  25. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/CONTRIBUTING.md +0 -0
  26. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/LICENSE +0 -0
  27. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/RELEASE.md +0 -0
  28. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/ROADMAP.md +0 -0
  29. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/docs/README.md +0 -0
  30. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/docs/THEMES.md +0 -0
  31. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/examples/complex-project/diagram-dark.html +0 -0
  32. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/examples/complex-project/diagram-minimal.html +0 -0
  33. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/examples/complex-project/maven_dependency_file +0 -0
  34. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/examples/simple-project/dependencies.json +0 -0
  35. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/examples/simple-project/diagram-dark.html +0 -0
  36. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/examples/simple-project/diagram-minimal.html +0 -0
  37. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/examples/simple-project/maven_dependency_file +0 -0
  38. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/examples/watch-test/test_maven_file +0 -0
  39. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/issues.md +0 -0
  40. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/ruff.toml +0 -0
  41. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/src/mvn_tree_visualizer/__init__.py +0 -0
  42. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/src/mvn_tree_visualizer/__main__.py +0 -0
  43. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/src/mvn_tree_visualizer/diagram.py +0 -0
  44. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/src/mvn_tree_visualizer/enhanced_template.py +0 -0
  45. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/src/mvn_tree_visualizer/exceptions.py +0 -0
  46. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/src/mvn_tree_visualizer/file_watcher.py +0 -0
  47. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/src/mvn_tree_visualizer/get_dependencies_in_one_file.py +0 -0
  48. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/src/mvn_tree_visualizer/outputs/html_output.py +0 -0
  49. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/src/mvn_tree_visualizer/outputs/json_output.py +0 -0
  50. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/src/mvn_tree_visualizer/themes.py +0 -0
  51. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/tests/test_github_issue_7.py +0 -0
  52. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/tests/test_html_output.py +0 -0
  53. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/tests/test_json_output.py +0 -0
  54. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/tests/test_large_diagram_support.py +0 -0
  55. {mvn_tree_visualizer-1.5.0 → mvn_tree_visualizer-1.5.1}/tests/test_watch_mode.py +0 -0
@@ -6,8 +6,10 @@ We actively support the following versions of mvn-tree-visualizer:
6
6
 
7
7
  | Version | Supported |
8
8
  | ------- | ------------------ |
9
- | 1.3.x | :white_check_mark: |
10
- | 1.2.x | :white_check_mark: |
9
+ | 1.5.x | :white_check_mark: |
10
+ | 1.4.x | :white_check_mark: |
11
+ | 1.3.x | :x: |
12
+ | 1.2.x | :x: |
11
13
  | 1.1.x | :x: |
12
14
  | 1.0.x | :x: |
13
15
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mvn-tree-visualizer
3
- Version: 1.5.0
3
+ Version: 1.5.1
4
4
  Summary: A simple command line tool to visualize the dependency tree of a Maven project in a graphical format.
5
5
  Project-URL: source, https://github.com/dyka3773/mvn-tree-visualizer
6
6
  Author-email: Iraklis Konsoulas <dyka3773@gmail.com>
@@ -80,36 +80,36 @@ Use the `mvn-tree-visualizer` command to generate the diagram.
80
80
 
81
81
  #### HTML Output (Interactive Diagram)
82
82
  ```bash
83
- mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --format html
83
+ mvn-tree-visualizer --filename "maven_dependency_file" --output "diagram.html" --format html
84
84
  ```
85
85
 
86
86
  #### JSON Output (Structured Data)
87
87
  ```bash
88
- mvn_tree_visualizer --filename "maven_dependency_file" --output "dependencies.json" --format json
88
+ mvn-tree-visualizer --filename "maven_dependency_file" --output "dependencies.json" --format json
89
89
  ```
90
90
 
91
91
  #### With Version Information
92
92
  ```bash
93
- mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --show-versions
93
+ mvn-tree-visualizer --filename "maven_dependency_file" --output "diagram.html" --show-versions
94
94
  ```
95
95
 
96
96
  #### With Custom Themes
97
97
  ```bash
98
98
  # Dark theme for low-light environments
99
- mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --theme dark
99
+ mvn-tree-visualizer --filename "maven_dependency_file" --output "diagram.html" --theme dark
100
100
 
101
101
  # Default minimal theme (clean monospace design)
102
- mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html"
102
+ mvn-tree-visualizer --filename "maven_dependency_file" --output "diagram.html"
103
103
  ```
104
104
 
105
105
  #### JSON Output with Versions
106
106
  ```bash
107
- mvn_tree_visualizer --filename "maven_dependency_file" --output "dependencies.json" --format json --show-versions
107
+ mvn-tree-visualizer --filename "maven_dependency_file" --output "dependencies.json" --format json --show-versions
108
108
  ```
109
109
 
110
110
  #### Watch Mode (Auto-regeneration)
111
111
  ```bash
112
- mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --watch
112
+ mvn-tree-visualizer --filename "maven_dependency_file" --output "diagram.html" --watch
113
113
  ```
114
114
 
115
115
  > **💡 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.
@@ -60,36 +60,36 @@ Use the `mvn-tree-visualizer` command to generate the diagram.
60
60
 
61
61
  #### HTML Output (Interactive Diagram)
62
62
  ```bash
63
- mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --format html
63
+ mvn-tree-visualizer --filename "maven_dependency_file" --output "diagram.html" --format html
64
64
  ```
65
65
 
66
66
  #### JSON Output (Structured Data)
67
67
  ```bash
68
- mvn_tree_visualizer --filename "maven_dependency_file" --output "dependencies.json" --format json
68
+ mvn-tree-visualizer --filename "maven_dependency_file" --output "dependencies.json" --format json
69
69
  ```
70
70
 
71
71
  #### With Version Information
72
72
  ```bash
73
- mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --show-versions
73
+ mvn-tree-visualizer --filename "maven_dependency_file" --output "diagram.html" --show-versions
74
74
  ```
75
75
 
76
76
  #### With Custom Themes
77
77
  ```bash
78
78
  # Dark theme for low-light environments
79
- mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --theme dark
79
+ mvn-tree-visualizer --filename "maven_dependency_file" --output "diagram.html" --theme dark
80
80
 
81
81
  # Default minimal theme (clean monospace design)
82
- mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html"
82
+ mvn-tree-visualizer --filename "maven_dependency_file" --output "diagram.html"
83
83
  ```
84
84
 
85
85
  #### JSON Output with Versions
86
86
  ```bash
87
- mvn_tree_visualizer --filename "maven_dependency_file" --output "dependencies.json" --format json --show-versions
87
+ mvn-tree-visualizer --filename "maven_dependency_file" --output "dependencies.json" --format json --show-versions
88
88
  ```
89
89
 
90
90
  #### Watch Mode (Auto-regeneration)
91
91
  ```bash
92
- mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --watch
92
+ mvn-tree-visualizer --filename "maven_dependency_file" --output "diagram.html" --watch
93
93
  ```
94
94
 
95
95
  > **💡 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.
@@ -35,8 +35,8 @@ jobs:
35
35
 
36
36
  - name: Create dependency visualization
37
37
  run: |
38
- mvn_tree_visualizer --filename maven_dependency_file --output dependencies.json --format json
39
- mvn_tree_visualizer --filename maven_dependency_file --output dependencies.html
38
+ mvn-tree-visualizer --filename maven_dependency_file --output dependencies.json --format json
39
+ mvn-tree-visualizer --filename maven_dependency_file --output dependencies.html
40
40
 
41
41
  - name: Upload artifacts
42
42
  uses: actions/upload-artifact@v3
@@ -58,7 +58,7 @@ pipeline {
58
58
  steps {
59
59
  sh 'mvn dependency:tree -DoutputFile=maven_dependency_file'
60
60
  sh 'pip install mvn-tree-visualizer'
61
- sh 'mvn_tree_visualizer --filename maven_dependency_file --output dependencies.json --format json'
61
+ sh 'mvn-tree-visualizer --filename maven_dependency_file --output dependencies.json --format json'
62
62
  }
63
63
  }
64
64
 
@@ -91,7 +91,7 @@ def analyze_dependencies(project_path):
91
91
 
92
92
  # Generate JSON output
93
93
  subprocess.run([
94
- 'mvn_tree_visualizer',
94
+ 'mvn-tree-visualizer',
95
95
  '--filename', 'maven_dependency_file',
96
96
  '--output', 'dependencies.json',
97
97
  '--format', 'json'
@@ -127,9 +127,9 @@ cd "$PROJECT_DIR"
127
127
  mvn dependency:tree -DoutputFile=maven_dependency_file
128
128
 
129
129
  # Generate visualizations
130
- mvn_tree_visualizer --filename maven_dependency_file --output "$OUTPUT_DIR/dependencies.html"
131
- mvn_tree_visualizer --filename maven_dependency_file --output "$OUTPUT_DIR/dependencies.json" --format json
132
- mvn_tree_visualizer --filename maven_dependency_file --output "$OUTPUT_DIR/dependencies-with-versions.json" --format json --show-versions
130
+ mvn-tree-visualizer --filename maven_dependency_file --output "$OUTPUT_DIR/dependencies.html"
131
+ mvn-tree-visualizer --filename maven_dependency_file --output "$OUTPUT_DIR/dependencies.json" --format json
132
+ mvn-tree-visualizer --filename maven_dependency_file --output "$OUTPUT_DIR/dependencies-with-versions.json" --format json --show-versions
133
133
 
134
134
  echo "Analysis complete! Check $OUTPUT_DIR for results."
135
135
  ```
@@ -220,7 +220,7 @@ RUN mvn dependency:tree -DoutputFile=maven_dependency_file
220
220
  FROM python:3.13-slim AS visualizer
221
221
  RUN pip install mvn-tree-visualizer
222
222
  COPY --from=maven-deps /app/maven_dependency_file .
223
- RUN mvn_tree_visualizer --filename maven_dependency_file --output dependencies.json --format json
223
+ RUN mvn-tree-visualizer --filename maven_dependency_file --output dependencies.json --format json
224
224
 
225
225
  FROM nginx:alpine
226
226
  COPY --from=visualizer /dependencies.json /usr/share/nginx/html/
@@ -253,7 +253,7 @@ find . -name "pom.xml" -exec dirname {} \; | while read project; do
253
253
  echo "Processing $project"
254
254
  cd "$project"
255
255
  mvn dependency:tree -DoutputFile=maven_dependency_file
256
- mvn_tree_visualizer --filename maven_dependency_file --output "../analysis/$(basename $project).json" --format json
256
+ mvn-tree-visualizer --filename maven_dependency_file --output "../analysis/$(basename $project).json" --format json
257
257
  cd - > /dev/null
258
258
  done
259
259
  ```
@@ -19,11 +19,11 @@ The `simple-project/` directory contains a modern Spring Boot 3.2 web applicatio
19
19
  cd examples/simple-project
20
20
 
21
21
  # Generate with different themes
22
- mvn_tree_visualizer --filename maven_dependency_file --output diagram-minimal.html
23
- mvn_tree_visualizer --filename maven_dependency_file --output diagram-dark.html --theme dark
22
+ mvn-tree-visualizer --filename maven_dependency_file --output diagram-minimal.html
23
+ mvn-tree-visualizer --filename maven_dependency_file --output diagram-dark.html --theme dark
24
24
 
25
25
  # Generate JSON output for automation
26
- mvn_tree_visualizer --filename maven_dependency_file --output dependencies.json --format json
26
+ mvn-tree-visualizer --filename maven_dependency_file --output dependencies.json --format json
27
27
  ```
28
28
 
29
29
  ## Complex Project Example
@@ -46,8 +46,8 @@ The `complex-project/` directory demonstrates a **real-world enterprise microser
46
46
  cd examples/complex-project
47
47
 
48
48
  # Generate with version numbers (recommended for enterprise projects)
49
- mvn_tree_visualizer --filename maven_dependency_file --output diagram-minimal.html --show-versions
50
- mvn_tree_visualizer --filename maven_dependency_file --output diagram-dark.html --theme dark --show-versions
49
+ mvn-tree-visualizer --filename maven_dependency_file --output diagram-minimal.html --show-versions
50
+ mvn-tree-visualizer --filename maven_dependency_file --output diagram-dark.html --theme dark --show-versions
51
51
  ```
52
52
 
53
53
  ## 🎨 Theme Comparison
@@ -122,13 +122,13 @@ maxZoom: 50 // 50x zoom in for detailed inspection
122
122
  2. **Create visualizations**:
123
123
  ```bash
124
124
  # Basic diagram
125
- mvn_tree_visualizer --filename maven_dependency_file --output diagram.html
125
+ mvn-tree-visualizer --filename maven_dependency_file --output diagram.html
126
126
 
127
127
  # With versions for detailed analysis
128
- mvn_tree_visualizer --filename maven_dependency_file --output diagram.html --show-versions
128
+ mvn-tree-visualizer --filename maven_dependency_file --output diagram.html --show-versions
129
129
 
130
130
  # Dark theme for coding sessions
131
- mvn_tree_visualizer --filename maven_dependency_file --output diagram.html --theme dark
131
+ mvn-tree-visualizer --filename maven_dependency_file --output diagram.html --theme dark
132
132
  ```
133
133
 
134
134
  3. **Open in browser** and explore with enhanced zoom and navigation controls!
@@ -137,28 +137,28 @@ maxZoom: 50 // 50x zoom in for detailed inspection
137
137
 
138
138
  ### 1. Quick Dependency Overview
139
139
  ```bash
140
- mvn_tree_visualizer --filename maven_dependency_file --output overview.html
140
+ mvn-tree-visualizer --filename maven_dependency_file --output overview.html
141
141
  ```
142
142
  - Clean view without version numbers
143
143
  - Easy to identify dependency relationships
144
144
 
145
145
  ### 2. Detailed Analysis with Versions
146
146
  ```bash
147
- mvn_tree_visualizer --filename maven_dependency_file --output detailed.html --show-versions
147
+ mvn-tree-visualizer --filename maven_dependency_file --output detailed.html --show-versions
148
148
  ```
149
149
  - Shows all version information
150
150
  - Useful for debugging version conflicts
151
151
 
152
152
  ### 3. Scripting and Automation
153
153
  ```bash
154
- mvn_tree_visualizer --filename maven_dependency_file --output deps.json --format json
154
+ mvn-tree-visualizer --filename maven_dependency_file --output deps.json --format json
155
155
  ```
156
156
  - Machine-readable JSON format
157
157
  - Perfect for CI/CD pipelines and automated analysis
158
158
 
159
159
  ### 4. Multi-module Projects
160
160
  ```bash
161
- mvn_tree_visualizer --directory ./my-project --output multi-module.html
161
+ mvn-tree-visualizer --directory ./my-project --output multi-module.html
162
162
  ```
163
163
  - Automatically finds and merges dependency files from subdirectories
164
164
  - Comprehensive view of entire project structure
@@ -6,7 +6,7 @@ This directory contains a simple test to demonstrate the watch mode functionalit
6
6
 
7
7
  1. **Start watch mode:**
8
8
  ```bash
9
- mvn_tree_visualizer --filename test_maven_file --output watch-test.html --watch
9
+ mvn-tree-visualizer --filename test_maven_file --output watch-test.html --watch
10
10
  ```
11
11
 
12
12
  2. **Modify the test file** while the watch is running to see automatic regeneration.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mvn-tree-visualizer"
3
- version = "1.5.0"
3
+ version = "1.5.1"
4
4
  authors = [
5
5
  { name = "Iraklis Konsoulas", email = "dyka3773@gmail.com" },
6
6
  ]
@@ -4,12 +4,12 @@ from pathlib import Path
4
4
  from typing import NoReturn
5
5
 
6
6
  from .diagram import create_diagram
7
- from .exceptions import DependencyFileNotFoundError, DependencyParsingError, MvnTreeVisualizerError, OutputGenerationError
7
+ from .exceptions import DependencyParsingError, MvnTreeVisualizerError, OutputGenerationError
8
8
  from .file_watcher import FileWatcher
9
9
  from .get_dependencies_in_one_file import merge_files
10
10
  from .outputs.html_output import create_html_diagram
11
11
  from .outputs.json_output import create_json_output
12
- from .validation import find_dependency_files, print_maven_help, validate_dependency_files, validate_output_directory
12
+ from .validation import find_dependency_files, validate_dependency_files, validate_output_directory
13
13
 
14
14
 
15
15
  def generate_diagram(
@@ -108,8 +108,6 @@ def generate_diagram(
108
108
  except MvnTreeVisualizerError as e:
109
109
  # Our custom errors already have helpful messages
110
110
  print(f"[{timestamp}] ❌ Error: {e}")
111
- if isinstance(e, DependencyFileNotFoundError):
112
- print_maven_help()
113
111
  except KeyboardInterrupt:
114
112
  print(f"\n[{timestamp}] ⏹️ Operation cancelled by user")
115
113
  except Exception as e:
@@ -15,15 +15,6 @@ def find_dependency_files(directory: str, filename: str) -> list[str]:
15
15
  return found_files
16
16
 
17
17
 
18
- def print_maven_help() -> None:
19
- """Print helpful Maven commands for generating dependency files."""
20
- print("\n💡 To generate a Maven dependency file, try one of these commands:")
21
- print(" mvn dependency:tree -DoutputFile=maven_dependency_file")
22
- print(" mvn dependency:tree > maven_dependency_file")
23
- print(" mvn dependency:tree -DoutputFile=maven_dependency_file -DoutputType=text")
24
- print("\n📍 Make sure you're in a directory with a pom.xml file.")
25
-
26
-
27
18
  def validate_directory(directory: str) -> None:
28
19
  """Validate that the directory exists and is accessible."""
29
20
  if not os.path.exists(directory):
@@ -360,7 +360,7 @@ wheels = [
360
360
 
361
361
  [[package]]
362
362
  name = "mvn-tree-visualizer"
363
- version = "1.4.0"
363
+ version = "1.5.0"
364
364
  source = { editable = "." }
365
365
  dependencies = [
366
366
  { name = "jinja2" },
@@ -1,92 +0,0 @@
1
- # GitHub Copilot Instructions for mvn-tree-visualizer
2
-
3
- ## Project Overview
4
- This is a Python CLI tool that parses Maven dependency trees (`mvn dependency:tree` output) and generates interactive HTML diagrams (using Mermaid.js) or JSON outputs. The tool supports watch mode for real-time regeneration and has a modular architecture focused on error handling and user experience.
5
-
6
- ## Architecture & Key Components
7
-
8
- ### Core Flow
9
- 1. **Input Validation** (`validation.py`) - Find and validate Maven dependency files
10
- 2. **File Merging** (`get_dependencies_in_one_file.py`) - Combine multiple dependency files
11
- 3. **Parsing** (`diagram.py`) - Read merged dependency tree
12
- 4. **Output Generation** (`outputs/`) - Generate HTML (Mermaid.js) or JSON
13
- 5. **Watch Mode** (`file_watcher.py`) - Monitor files for changes using watchdog
14
-
15
- ### Module Structure
16
- ```
17
- src/mvn_tree_visualizer/
18
- ├── cli.py # Entry point with comprehensive error handling
19
- ├── exceptions.py # Custom exception hierarchy
20
- ├── validation.py # File discovery and validation logic
21
- ├── diagram.py # Core dependency tree processing
22
- ├── file_watcher.py # Real-time file monitoring
23
- ├── get_dependencies... # Multi-file merging logic
24
- ├── TEMPLATE.py # Jinja2 HTML template for Mermaid.js
25
- └── outputs/
26
- ├── html_output.py # Mermaid diagram generation
27
- └── json_output.py # Structured JSON output
28
- ```
29
-
30
- ## Development Conventions
31
-
32
- ### Error Handling Pattern
33
- - Use custom exceptions from `exceptions.py`: `DependencyFileNotFoundError`, `DependencyParsingError`, `OutputGenerationError`
34
- - Provide actionable error messages with Maven commands and file paths
35
- - Follow the pattern in `cli.py:generate_diagram()` for comprehensive error handling
36
-
37
- ### Testing Approach
38
- - Use pytest with descriptive test names like `test_convert_to_mermaid_deeper_tree()`
39
- - Test both positive cases and error conditions
40
- - Include realistic Maven dependency tree samples in test data
41
- - Run tests with: `uv run pytest tests/ -v`
42
-
43
- ### Package Management
44
- - Uses `uv` as package manager - always use `uv run` for commands
45
- - Core dependencies: `jinja2` (templating), `watchdog` (file monitoring)
46
- - Entry point: `mvn-tree-visualizer` command maps to `cli:cli`
47
-
48
- ### Code Quality
49
- - Lint with: `uv run ruff check .`
50
- - Type hints required throughout (project uses Python 3.13+)
51
- - Follow existing patterns for file validation and path handling
52
-
53
- ## Critical Implementation Details
54
-
55
- ### Maven Dependency Parsing
56
- - Input format: `[INFO] groupId:artifactId:type:version:scope` with tree structure using `+`, `|`, `\`
57
- - Handle both 4-part and 5-part dependency strings (see `html_output.py:_convert_to_mermaid`)
58
- - Depth calculation based on whitespace: `depth = len(parts[0].split(" ")) - 1`
59
-
60
- ### File Discovery Pattern
61
- - Multi-file support: searches directory tree for `maven_dependency_file` (configurable)
62
- - Merges files from different Maven modules into single intermediate file
63
- - Validates file existence, permissions, and content before processing
64
-
65
- ### Output Generation
66
- - HTML uses Mermaid.js with `graph LR` format
67
- - Version display controlled by `--show-versions` flag
68
- - JSON output maintains tree structure with parent-child relationships
69
-
70
- ### Watch Mode Implementation
71
- - Uses watchdog library for cross-platform file monitoring
72
- - Monitors specific filename pattern across directory tree
73
- - Debounces changes and provides timestamped feedback
74
-
75
- ## Common Development Tasks
76
-
77
- ### Adding New Output Formats
78
- 1. Create new module in `outputs/` directory
79
- 2. Follow pattern from `html_output.py` and `json_output.py`
80
- 3. Add format option to CLI and update `generate_diagram()` in `cli.py`
81
-
82
- ### Error Message Improvements
83
- - All user-facing errors should include specific file paths and suggested Maven commands
84
- - Use `print_maven_help()` pattern for guiding users to generate dependency files
85
- - Test error scenarios in addition to happy path
86
-
87
- ### Testing New Features
88
- - Include realistic Maven dependency trees in test data
89
- - Test both single-module and multi-module project scenarios
90
- - Verify error handling with invalid/missing files
91
-
92
- Remember: This tool processes Maven output files, not Maven projects directly. Users must run `mvn dependency:tree -DoutputFile=maven_dependency_file` first.