Commit 7e4fc8d
committed
feat: Add scope, type, classifier, and optional properties to ArtifactDescriptor
Added new PomElement properties to ArtifactDescriptor for cleaner API:
- scope: dependency scope (compile, test, runtime, etc.)
- type: artifact type (jar, pom, etc.)
- classifier: artifact classifier (mule-plugin, sources, etc.)
- optional: whether dependency is optional (true/false)
All properties are PomElement for consistency with existing 'version' field:
- Tracks line numbers for violation reporting
- Handles property references like
- Provides null-safe access via ?. operator
Updated tests to use cleaner API:
- dependency.scope?.value instead of dependency.getAttribute('scope')?.value
All tests pass (including new PomManagementResolutionTest and full suite).1 parent 59a5b93 commit 7e4fc8d
2 files changed
Lines changed: 10 additions & 2 deletions
File tree
- mule-linter-core/src/test/groovy/com/avioconsulting/mule/linter/model
- mule-linter-spi/src/main/groovy/com/avioconsulting/mule/linter/model/pom
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
mule-linter-spi/src/main/groovy/com/avioconsulting/mule/linter/model/pom/ArtifactDescriptor.groovy
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
| |||
0 commit comments