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

Vincent Massol commented on MNG-5576:
-------------------------------------

The way it could be done:
* If you're in a multi module project and the parent can be found in the 
filesystem, then resolve project.version by traversing the parent hierarchy 
upward till you find a pom.xml containing a {{<version>}} element.
* If you're in a single module and/or the parent is not found on the filesystem 
(nor in {{.mvn/maven.config}}), and the current pom.xml doesn't define a 
{{<version>}} element then emit an error that project.version is undefined and 
maybe allow users to pass it on the command line (not even sure that it's 
needed).

Note that omimtting completely omit the {{<version>}} in the {{<parent>}} 
element would normally resolve it to the latest released version which may not 
be what we want.

Thanks for your answers. When i read the release notes for 3.2.1 I was happy 
initially to see the ability to support some variables for parent versions. 
After looking at it, I was disappointed that it was only working for some edge 
cases and I was wondering if there was a technical reason.

Keep the good of making Maven progress! (which I dropped years ago on my side 
to dedicate my time to xwiki).


> Allow continuous delivery friendly versions
> -------------------------------------------
>
>                 Key: MNG-5576
>                 URL: https://issues.apache.org/jira/browse/MNG-5576
>             Project: Maven
>          Issue Type: Improvement
>    Affects Versions: 3.1.1
>            Reporter: Jason van Zyl
>             Fix For: 3.2.1
>
>
> Currently warnings will be emitted when there are expressions in versions, a 
> few exceptions should be deemed valid to make continuous delivery easier. The 
> use case is to allow easy versioning of an entire multi-module build that can 
> take a version from an external source like SCM. These are the types of 
> exceptions that will be allowed:
> 1.0.0.$\{changelist}
> 1.0.0.$\{revision}
> 1.0.0.$\{sha1}
> When a whole build is versioned like this we can avoid churning the POMs in 
> the SCM which makes it a lot easier to see the actual changes in the project. 
> Not a complete solution for continuous delivery but is a step in the right 
> direction and doesn't interfere with currently behavior as it is currently 
> allowed, just warned against.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to