[
https://issues.apache.org/jira/browse/MNG-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15128910#comment-15128910
]
Christian Schulte commented on MNG-5914:
----------------------------------------
Can you please provide a self-contained example project.
{code}
[FATAL] Non-resolvable parent POM for
com.company.project.submodule:submodule:1.0.0-SNAPSHOT: Could not find artifact
com.company.project:apps:pom:x.y.0-SNAPSHOT and 'parent.relativePath' points at
wrong local POM @ line 6, column 13
{code}
> ${project.parent.version} is being resolved to ${project.version} when used
> inside dependencyManagement section
> ---------------------------------------------------------------------------------------------------------------
>
> Key: MNG-5914
> URL: https://issues.apache.org/jira/browse/MNG-5914
> Project: Maven
> Issue Type: Bug
> Affects Versions: 3.3.3
> Environment: Windows 7, java 1.8.0_60-b27
> Reporter: Piotr Dusik
> Priority: Minor
>
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <groupId>com.company.project</groupId>
> <artifactId>apps</artifactId>
> <version>x.y.0-SNAPSHOT</version>
> </parent>
> <properties>
> <subm.version>${project.parent.version}</subm.version>
> </properties>
> <artifactId>submodule</artifactId>
> <groupId>com.company.project.submodule</groupId>
> <version>1.0.0-SNAPSHOT</version>
> <packaging>pom</packaging>
> <name>Submodule :: POM</name>
> <dependencyManagement>
> <dependencies>
> <dependency>
> <groupId>com.company.project</groupId>
> <artifactId>dependency-bom</artifactId>
> <version>${subm.version}</version>
> <type>pom</type>
> <scope>import</scope>
> </dependency>
> </dependencies>
> </dependencyManagement>
> </project>
> {code}
> Above configuration produces following log
> {noformat}
> Non-resolvable import POM: Failure to find
> com.company.project:dependency-bom:pom:1.0.0-SNAPSHOT in
> http://maven.company.com/content/repositories/all_repos was cached in the
> local repository, resolution will not be reattempted until the update
> interval of company.all_repos has elapsed or updates are forced
> {noformat}
> When I change {{subm.version}} property, to ie. 9.9.9 literal, then I get
> {noformat}
> Non-resolvable import POM: Could not find artifact
> com.company.sp:dependency-bom:pom:9.9.9 in company.all_repos
> (http://maven.company.com/content/repositories/all_repos)
> {noformat}
> However, if I change {{subm.version}} property to parent module version
> literal, which is "x.y.0-SNAPSHOT", then everything works fine.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)