40 lines
2.3 KiB
Markdown
40 lines
2.3 KiB
Markdown
# Java Maven Parent POM Resolution with Property Interpolation
|
|
|
|
## Module
|
|
Scanner
|
|
|
|
## Status
|
|
VERIFIED
|
|
|
|
## Description
|
|
Resolves Maven parent POM inheritance chains and interpolates ${property} placeholders in version, groupId, and artifactId fields across the effective POM hierarchy.
|
|
|
|
## Implementation Details
|
|
- **Parent POM Resolution**:
|
|
- `src/Scanner/__Libraries/StellaOps.Scanner.Analyzers.Lang.Java/Internal/Maven/MavenParentResolver.cs` - `MavenParentResolver` resolves parent POM inheritance chains by following `<parent>` declarations
|
|
- `src/Scanner/__Libraries/StellaOps.Scanner.Analyzers.Lang.Java/Internal/Maven/MavenEffectivePomBuilder.cs` - `MavenEffectivePomBuilder` constructs the effective POM by merging parent and child POM properties, dependencies, and plugin configurations
|
|
- **Property Interpolation**:
|
|
- `src/Scanner/__Libraries/StellaOps.Scanner.Analyzers.Lang.Java/Internal/PropertyResolution/JavaPropertyResolver.cs` - `JavaPropertyResolver` resolves `${property}` placeholders in version, groupId, and artifactId fields across the POM hierarchy
|
|
- **POM Parsing**:
|
|
- `src/Scanner/__Libraries/StellaOps.Scanner.Analyzers.Lang.Java/Internal/Maven/MavenPomParser.cs` - `MavenPomParser` parses POM XML files extracting dependency declarations, properties, and parent references
|
|
- **Language Analyzer**: `src/Scanner/__Libraries/StellaOps.Scanner.Analyzers.Lang.Java/JavaLanguageAnalyzer.cs`
|
|
|
|
## E2E Test Plan
|
|
- [ ] Scan a Maven project with a parent POM hierarchy (child -> parent -> grandparent) and verify dependency versions inherited from parent are resolved
|
|
- [ ] Verify `${property}` placeholders in dependency versions are interpolated using properties from the effective POM hierarchy
|
|
- [ ] Verify `${project.version}` and `${project.groupId}` built-in properties are resolved correctly
|
|
- [ ] Verify `<dependencyManagement>` sections from parent POMs are applied to child dependency declarations without explicit versions
|
|
- [ ] Verify BOM imports (`<scope>import</scope>` in `<dependencyManagement>`) are resolved transitively
|
|
- [ ] Verify circular parent references are detected and handled gracefully
|
|
|
|
---
|
|
|
|
## Verification
|
|
|
|
| Check | Result |
|
|
|-------|--------|
|
|
| Tier 0 - Source files exist | PASS |
|
|
| Tier 1 - Build + code review | PASS |
|
|
| Tier 2 - Integration tests | PASS |
|
|
| Verified | 2026-02-13T18:10:00Z |
|