[ 
https://jira.codehaus.org/browse/MRELEASE-849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=334090#comment-334090
 ] 

Tuomas Kiviaho commented on MRELEASE-849:
-----------------------------------------

That was my biggest fear initially but I gave it a try since it is not 
ambiguous in same manner as are disparate version ranges on a dependency and 
surprisingly it worked. I was almost certain that this thing will bite me back 
after a while - apparently it did - but still there's a bit sisu left in me 
because the fix was basically a one liner. More natural solution would have be 
just merging between two branches but then I'd be missing all the fun.
                
> Release plugin replaces parent version with pom version when 
> groupId/artifactId are identical
> ---------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-849
>                 URL: https://jira.codehaus.org/browse/MRELEASE-849
>             Project: Maven Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.4.1
>            Reporter: Tuomas Kiviaho
>            Priority: Blocker
>         Attachments: AbstractRewritePomsPhase.patch
>
>
> POM rewriting for release phase doesn't handle well the following use case. 
> Parent version will be replaced which is not the intention here. 
> {code:xml|title=pom.xml}
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>foo</groupId>
>     <artifactId>bar</artifactId>
>     <version>1</version>
>   </parent>
>   <groupId>foo</groupId>
>   <artifactId>bar</artifactId>
>   <version>2-SNAPSHOT</version>
>   <packaging>pom</packaging>
> </project>
> {code}
> I would assume this to be perfectly valid when introducing a new 
> non-backwards compatible feature to a parent pom. Probably I could replace 
> the inheritance with delegation by using 
> pluginManagement/dependencyManagement sections and import scope but I don't 
> think there's similar notation for profiles.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to