You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dorian Vallant (JIRA)" <ji...@apache.org> on 2018/04/13 08:56:00 UTC

[jira] [Created] (MNG-6394) ${revision} and parent.releativePath

Dorian Vallant created MNG-6394:
-----------------------------------

             Summary: ${revision} and parent.releativePath
                 Key: MNG-6394
                 URL: https://issues.apache.org/jira/browse/MNG-6394
             Project: Maven
          Issue Type: Bug
    Affects Versions: 3.5.3
         Environment: Ubuntu 17.10; Maven 3.5.3; Java 1.8.0_161
            Reporter: Dorian Vallant


If the CI friendly ${revision} property is used it seems maven does not simple replace the property with the given value.

Consider the following example:

parent-project/
     pom.xml
 child-project/
     pom.xml

parent-project/pom.xml:
    ...
    <groupId>my.group</groupId>
    <artifactId>parentArtifact</artifactId>
    <version>${revision}</version>
    <packaging>pom</packaging>
    ...

child-project/pom.xml:
  <parent>
    <groupId>my.group</groupId>
    <artifactId>parentArtifact</artifactId>
    <version>${revision}</version>
    <relativePath>../parent-project</relativePath>
  </parent>

If you build the child-project with 'mvn -Drevision=1.0.0-SNAPSHOT -f child-project/pom.xml clean install' all works fine as long as the parent project is present in the file system. But if you move the parent project to another place, build & install it to your local repository and then try to build the child project, maven tries to download the pom.xml of the parent project but does not replace ${revision}. So maven complains about a missing dependency.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)