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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MNG-6394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16439016#comment-16439016 ]

Dorian Vallant commented on MNG-6394:
-------------------------------------

I think so. I have configured flatten-maven-plugin in my parent-project's pom. Do I have to configure it in child's pom too?

> ${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
>            Priority: Major
>
> 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)