apache / apache/maven-release

[MRELEASE-1157] release plugin ignores scmRollbackCommitComment

Open
#1,330 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
128
Forks
145
Avg merge
7h 7m
Merged PRs (30d)
3

Description

**[Mathias Legrand](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER307182)** opened **[MRELEASE-1157](https://issues.apache.org/jira/browse/MRELEASE-1157?redirect=false)** and commented

Hello

I configured the release plugin as follows:

```xml
org.apache.maven.plugins
maven-release-plugin
3.1.1

    v@{project.version}
    custom release commit comment
    custom dev commit comment
    custom rollback commit comment

```

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the behavior with `mvn release:prepare` and `mvn release:rollback` using the shown plugin configuration, then inspect the prepare and rollback mojos and the generated `release.properties`. Done means rollback uses the configured `scmRollbackCommitComment`, with the reported branch-comment behavior considered as well.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, release
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.