[MNG-8603] Print the version of the supposed wrong parent pom
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 42m
- Merged PRs (30d)
- 297
Description
**[Scott M Stark](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=starksm64)** opened **[MNG-8603](https://issues.apache.org/jira/browse/MNG-8603?redirect=false)** and commented
If I am using the Maven CI friendly version approach and have a parent pom like:
```xml
4.0.0
org.eclipse.ee4j
project
1.0.9
jakarta.platform
jakartaee-api-parent
${revision}${changelist}
pom
jakartaee-bom
11.0.0
-SNAPSHOT
...
```
and a child pom like:
```xml
4.0.0
jakarta.platform
jakartaee-api-parent
${revision}
...
```
running a command like `mvn --errors -U -Drevision=11.0.0 -Dchangelist= package` fails even though logically the child reference to the parent should work. The reported error is:
```
starksm@Scotts-Mac-Studio test-jakartaee-api % mvn --errors -U -Drevision=11.0.0 -Dchangelist= package
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/jakarta/platform/jakartaee-api-parent/$%7Brevision%7D/jakartaee-api-parent-$%7Brevision%7D.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for jakarta.platform:jakarta.jakartaee-bom:${revision}: The following artifacts could not be resolved: jakarta.platform:jakartaee-api-parent:pom:${revision} (absent): Could not find artifact jakarta.platform:jakartaee-api-parent:pom:${revision} in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 22, column 13
...
```
After debugging what the cause was I saw that there is no property resolution being done in this phase of the model build process. The parent resolution was looking for a file that had the literal version of "${revision}${changelist}". If the error message about the "'parent.relativePath' points at wrong local POM" included the GAV of the located parent pom.xml it would make it more obvious that the problem was the literal version string value being used by the child pom.
---
No further details from [MNG-8603](https://issues.apache.org/jira/browse/MNG-8603?redirect=false)
Contributor guide
Assessment
This issue has not been assessed yet.