apache / apache/maven-release

[MRELEASE-1113] updateWorkingCopyVersions false still update the version

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

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

Having this in source pom.xml:

```java
${majorversion}.3.4-SNAPSHOT
```

meaning the major version is set via profile properties, but running the plugin with -DupdateWorkingCopyVersions=false still causes the version in pom.xml to be overridden with actual value (which is never "actual" as defined in profile property):

```java

java8

0.8

java11

0.9


```

The command I run:

```java
mvn -DdryRun=true -DcheckModificationExcludeList="pom.xml" -DupdateWorkingCopyVersions=false  release:prepare -P java11
```

the diff:

!image-2023-02-05-03-02-17-768.png!

can this plugin not touch the version if there are set flag "updateWorkingCopyVersions" to "false"?

---

**Affects:** 3.0.0-M7

**Attachments:**
- [image-2023-02-05-03-02-17-768.png](https://issues.apache.org/jira/secure/attachment/13055150/image-2023-02-05-03-02-17-768.png) (_118.62 kB_)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the `mvn ... release:prepare -P java11` command from the report, focusing on `-DupdateWorkingCopyVersions=false` and the profile-based `${majorversion}` value. Trace the `release:prepare` entry point to determine why `pom.xml` changes despite the flag; done means the working-copy version remains unchanged in this case and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.