You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christian Schulte (JIRA)" <ji...@apache.org> on 2016/02/17 12:59:18 UTC

[jira] [Closed] (MNG-5914) ${project.parent.version} is being resolved to ${project.version} when used inside dependencyManagement section

     [ https://issues.apache.org/jira/browse/MNG-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schulte closed MNG-5914.
----------------------------------
    Resolution: Cannot Reproduce

> ${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)