[ 
http://jira.codehaus.org/browse/MVERSIONS-114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stephen Connolly closed MVERSIONS-114.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3

r12417 added -DupdateMatchingVersions=false to allow controlling the behaviour

> Explict versions inside child poms are updated if they are the same than the 
> version in the parent pom
> ------------------------------------------------------------------------------------------------------
>
>                 Key: MVERSIONS-114
>                 URL: http://jira.codehaus.org/browse/MVERSIONS-114
>             Project: Maven 2.x Versions Plugin
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: mvn-3-beta-1
>            Reporter: Marcus Holl
>             Fix For: 1.3
>
>         Attachments: version_update_in_child.zip
>
>
> The project setup is:
> * parent pom with version 0.0.1-SNAPSHOT
> * child project with explicitly defined version 0.0.1-SNAPSHOT (no inherited 
> but explict set in the child pom)
> * parent and child belongs to the same aggregator.
> Important is: The versions inside parent and inside child are the same.
> When a version change is applied to the parent project with "mvn 
> org.codehaus.mojo:versions-maven-plugin:1.2:set -DnewVersion=<NEW_VERSION>" 
> the version is changed inside the parent pom and inside the child pom. Inside 
> the child pom we have two changes:
> * The version in the parent reference is changed. This is OK.
> * The version of the child project itself is changed, too. This is considered 
> to be a bug. The explict defined version inside the child project should 
> remain unchanged.
> If there is a explicit version denoted in the child project this version is 
> independent from the parent version. If the version should be always the same 
> (which might be a valid use case) the version must not be repeated inside the 
> child project. In this case the version is inherited from the parent. But if 
> the version is denoted explicitly in the child this version is not related to 
> the parent version - even if the value of that version is the same than the 
> version of the parent project.
> If there is an explicit version inside the child project that is not the same 
> than the version in the parent the version inside the child is not updated.
> There is one interesting case: Imagine we have parent version 0.0.1-SNAPSHOT 
> and child version 0.0.3-SNAPSHOT.
> * When the parent version is incremented from 0.0.1-SNAPSHOT to 
> 0.0.2-SNAPSHOT the child version remains unchanged.
> * When the parent version is incremented later on from 0.0.2-SNAPSHOT to 
> 0.0.3-SNAPSHOT the child version remains unchanged.
> * When the parent version is incremented later on from 0.0.3-SNAPSHOT to 
> 0.0.4-SNAPSHOT the child project is changed to 0.0.4-SNAPSHOT, too.
> There is a small example project that can be used in order to outline the 
> behaviour. When "mvn org.codehaus.mojo:versions-maven-plugin:1.2:set 
> -DnewVersion=2.0.0" is called inside the "parent" folder the version of 
> project "project" is modified.
> Best regards,
> Marcus

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to