You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Elek, Marton (JIRA)" <ji...@apache.org> on 2018/04/06 09:59:00 UTC

[jira] [Commented] (HADOOP-15369) Avoid usage of ${project.version} in parent poms

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

Elek, Marton commented on HADOOP-15369:
---------------------------------------

One trivial fix is using 3.2.0-SNAPSHOT (hard-coded version) everywhere. Unfortunatelly the versions:set maven plugin/goal can't replace the hard-coded version everywhere. It could handle the versions in the dependencyManagement section but not in the dependencies of maven plugins.

To make it easier to create the releases I propose to introduce a new maven property with the hard coded version. (3.2.0-SNAPSHOT currently). It will solve the problem as the value of this property is independent from the current ${project.version}. 

The only inconvenience is that the hadoop.version property should be changed after the mvn versions:set call for every release. I added a new enforcment plugin execution to be sure it's done.  

Patch will be uploaded soon.

> Avoid usage of ${project.version} in parent poms
> ------------------------------------------------
>
>                 Key: HADOOP-15369
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15369
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 3.2.0
>            Reporter: Elek, Marton
>            Assignee: Elek, Marton
>            Priority: Major
>
> hadoop-project/pom.xml and hadoop-project-dist/pom.xml use _${project.version}_ variable in dependencyManagement and plugin dependencies.
> Unfortunatelly it could not work if we use different version in a child project as ${project.version} variable is resolved *after* the inheritance.
> From [maven doc|https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Inheritance]:
> {quote}
> For example, to access the project.version variable, you would reference it like so:
>       <version>${project.version}</version>
> One factor to note is that these variables are processed after inheritance as outlined above. This means that if a parent project uses a variable, then its definition in the child, not the parent, will be the one eventually used.
> {quote}
> The community voted to keep ozone in-tree but use a different release cycle. To achieve this we need different version for selected subproject therefor we can't use ${project.version} any more. 
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org