[
https://issues.apache.org/jira/browse/MRELEASE-959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17519428#comment-17519428
]
Lucian Burja commented on MRELEASE-959:
---------------------------------------
I believe this issue has to be reopened and addressed. I've run into the same
problem described here.
Specifying {{-DupdateVersionsToSnapshot=false}} has no effect, although it
should work according to the documentation.
The issue even has a patch, so I don't understand why it has been closed with
"works as expected" when the property {{updateVersionsToSnapshot}} obviously
_doesn't_ work as expected.
> release:branch does not consider release versions
> -------------------------------------------------
>
> Key: MRELEASE-959
> URL: https://issues.apache.org/jira/browse/MRELEASE-959
> Project: Maven Release Plugin
> Issue Type: Bug
> Components: branch
> Affects Versions: 2.5.3
> Reporter: Ramona Koch
> Assignee: Robert Scholte
> Priority: Minor
> Labels: patch
> Attachments: release-branch-considers-releaseVersion.patch
>
>
> What I try to achieve, is to create a release branch from my development
> branch. The development branch has a snapshot version (e.g. 1.0.0-SNAPSHOT).
> As a result of the command I expect, to get a new branch containing version
> 1.0.0 and a changed development branch with version 1.0.1-SNAPSHOT. My
> project is a multi-module project.
> Related to the specification I assume, that this is the command I need to use:
> {code}
> mvn release:branch -DupdateBranchVersions=true -DupdateWorkCopyVersions=true
> -DupdateVersionsToSnapshot=false -DreleaseVersion=1.0.0
> -DdevelopmentVersion=1.0.1-SNAPSHOT -DbranchName=release-1.0.0
> -DautoVersionSubmodules=true
> {code}
> But this will result in asking me for a branch version, which only accepts
> snapshot versions. If I use {{batch-mode}} it will just use 1.0.1-SNAPSHOT.
> I also tried to give the versions per module by using {{-Dproject.dev...}}
> and {{-Dproject.rel...}}. It results in the same behaviour.
> At the end I had a look into the code and it seems, that it simply ignores
> the updateVersionsToSnapshot, which defines whether to update versions to
> SNAPSHOT in the branch or not. Since the default is true, it will always put
> a snapshot version in the branch.
> I will attach a patch file containing my proposed fix (including tests).
--
This message was sent by Atlassian Jira
(v8.20.1#820001)