[
https://issues.apache.org/jira/browse/MNG-8603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17932073#comment-17932073
]
Tamas Cservenak commented on MNG-8603:
--------------------------------------
Which version of Maven is _affected by this_? Def not 3.9.10 as there is no
such thing.
> Print the version of the supposed wrong parent pom
> --------------------------------------------------
>
> Key: MNG-8603
> URL: https://issues.apache.org/jira/browse/MNG-8603
> Project: Maven
> Issue Type: Improvement
> Components: Core
> Affects Versions: 3.9.10, 3.9.x-candidate
> Environment: starksm@Scotts-Mac-Studio test-jakartaee-api % mvn
> --version
> Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
> Maven home: /Users/starksm/bin/apache-maven-3.9.9
> Java version: 17.0.4.1, vendor: Eclipse Adoptium, runtime:
> /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "15.3", arch: "aarch64", family: "mac"
> Reporter: Scott M Stark
> Priority: Major
>
> If I am using the Maven CI friendly version approach and have a parent pom
> like:
> {code:xml}
> <project xmlns="...">
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <groupId>org.eclipse.ee4j</groupId>
> <artifactId>project</artifactId>
> <version>1.0.9</version>
> </parent>
> <groupId>jakarta.platform</groupId>
> <artifactId>jakartaee-api-parent</artifactId>
> <version>${revision}${changelist}</version>
> <packaging>pom</packaging>
>
> <modules>
> <module>jakartaee-bom</module>
> </modules>
> <properties>
> <revision>11.0.0</revision>
> <changelist>-SNAPSHOT</changelist>
> ...
> {code}
> and a child pom like:
> {code:xml}
> <project xmlns="...">
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <groupId>jakarta.platform</groupId>
> <artifactId>jakartaee-api-parent</artifactId>
> <version>${revision}</version>
> </parent>
> ...
> {code}
> 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:
> {noformat}
> 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
> ...
> {noformat}
> 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)