apache / apache/maven-release

[MRELEASE-849] Release plugin replaces parent version with pom version when groupId/artifactId are identical

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

Description

**[Tuomas Kiviaho](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=tuomas_kiviaho)** opened **[MRELEASE-849](https://issues.apache.org/jira/browse/MRELEASE-849?redirect=false)** and commented

POM rewriting for release phase doesn't handle well the following use case. Parent version will be replaced which is not the intention here.

```xml

4.0.0

foo
bar
1

foo
bar
2-SNAPSHOT
pom

```

I would assume this to be perfectly valid when introducing a new non-backwards compatible feature to a parent pom. Probably I could replace the inheritance with delegation by using pluginManagement/dependencyManagement sections and import scope but I don't think there's similar notation for profiles.

---

**Affects:** 2.4.1

**Attachments:**
- [AbstractRewritePomsPhase.patch](https://issues.apache.org/jira/secure/attachment/12718289/AbstractRewritePomsPhase.patch) (_1.67 kB_)

Contributor guide

No contributing guide indexed for this repository

Research direction

Use the supplied XML as a reproduction for the release phase's POM rewriting behavior, and review AbstractRewritePomsPhase.patch for the intended change. The work is done when a project and its parent with identical groupId and artifactId retain distinct versions, with the parent version left unchanged during release processing.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.