Skip to content

[MRELEASE-1157] release plugin ignores scmRollbackCommitComment #1330

@jira-importer

Description

@jira-importer

Mathias Legrand opened MRELEASE-1157 and commented

Hello

I configured the release plugin as follows:

<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>

and after running mvn release:prepare, the release and development commit comments are correct:

> git log --oneline
f262713 (HEAD -> master) custom dev commit comment
2bbbad3 (tag: v1.73) custom release commit comment

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.


Affects: 3.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:minorMinor loss of function, or other problem where easy workaround is present

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions