Mathias Legrand created MRELEASE-1157:
-----------------------------------------

             Summary: release plugin ignores scmRollbackCommitComment
                 Key: MRELEASE-1157
                 URL: https://issues.apache.org/jira/browse/MRELEASE-1157
             Project: Maven Release Plugin
          Issue Type: Bug
          Components: prepare, rollback
    Affects Versions: 3.1.1
            Reporter: Mathias Legrand


Hello

I configured the release plugin as follows:
{code:xml}
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
<configuration>
    <tagNameFormat>v@{project.version}</tagNameFormat>
    <scmReleaseCommitComment>custom release commit 
comment</scmReleaseCommitComment>
    <scmDevelopmentCommitComment>custom dev commit 
comment</scmDevelopmentCommitComment>
    <scmRollbackCommitComment>custom rollback commit 
comment</scmRollbackCommitComment>
</configuration>
{code}
and after running {{mvn release:prepare}}, the release and development commit 
comments are correct:
{noformat}
> git log --oneline
f262713 (HEAD -> master) custom dev commit comment
2bbbad3 (tag: v1.73) custom release commit comment
{noformat}
but after running {{mvn release:rollback}}, the commit comment is 
{{[maven-release-plugin] rollback the release of v1.73}} instead of {{custom 
rollback commit comment}} as specified in the pom.

I had a quick look at the source code and I understand if I am not mistaken 
that the configuration of the rollback mojo is overwritten by the properties in 
the release.properties file generated by the prepare mojo. Since {{prepare}} 
writes default value for {{scm.rollbackCommitComment}} in 
{{release.properties}} (i.e. scm.rollbackCommitComment=@\{prefix} rollback the 
release of @\{releaseLabel}), mojo parameter "scmRollbackCommitComment" is 
overwritten by the property's value.

I guess the issue is the same for {{scmBranchCommitComment}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to