apache / apache/maven-release

[MRELEASE-799] update-versions fails when the project artifact is used with a version other than the current snapshot

Open
#1,004 7 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

**[Péter Miklós](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=pmiklos)** opened **[MRELEASE-799](https://issues.apache.org/jira/browse/MRELEASE-799?redirect=false)** and commented

If a maven project uses its own artifact eg. as a dependency of a plugin with a version other than the current snapshot then release:update-versions will fail with an error like this:

> The artifact (com.example:test) requires a different version (3.1.50) than what is found (3.1.49) for the expression (lastReleasedProjectVersion) in the project (com.example:test)

Basically, the latest release of the same artifact is used for some sort of regression testing and it seems that the update-versions, after moving to the next release version from snapshot, notices that there is a discrepancy between the new release version and the version used as a plugin dependency.

This error popped up when I started to use release plugin 2.2.2 and as a result of MRELEA[SE-412](https://issues.apache.org/jira/browse/SE-412) the properties used in the version tag are also updated.

I think the update-versions should remember which artifacts have been updated from snapshot to the new release version, and then check those only.

---

**Affects:** 2.3.2

**Attachments:**
- [MRELEASE-799.zip](https://issues.apache.org/jira/secure/attachment/12936446/MRELEASE-799.zip) (_16.53 kB_)

7 votes, 12 watchers

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting the attached MRELEASE-799.zip and reproducing the failure with release:update-versions in the described self-referencing Maven project. Trace where the lastReleasedProjectVersion expression is checked; done means the update completes without rejecting an artifact dependency that intentionally uses a different released version.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.