[MRELEASE-1061] Not able to stop version increment in pom.xml with the release prepare
- Dominant language
- Java
- Stars
- 128
- Forks
- 145
- Avg merge
- 7h 7m
- Merged PRs (30d)
- 3
Description
**[Nikunj Ramani](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=n.ramani)** opened **[MRELEASE-1061](https://issues.apache.org/jira/browse/MRELEASE-1061?redirect=false)** and commented
Hello Team,
Here is my requirement:
I have two profiles (32 Bit and 64 Bit) in my pom.xml. And I want them to be executed one by one and expecting (tasks release prepare and release perform) them to push build artifacts in artifact repository.
* Expected points :
* For 32 Bit and 64 Bit separate .jar will be created with the same version (1.0) as per below expected directory structure.
-->ABC
--> 32 Bit
--> 1.0
ABC_32Bit-1.0.jar
--> 64 Bit
--> 1.0
ABC_64Bit-1.0.jar
* Problem facing :
* We have a Bamboo plan with two tasks.
* 1. for 32 Bit -->release:prepare release:perform -P "32Bit,!64Bit"
* 2. for 64 Bit -->release:prepare release:perform -P "!32Bit,64Bit"
* But, when task 1 for 32 Bit is getting executed it increment the version number (2.0) in pom.xml file. Pushes the builds in artifacts repository with the notation (ABC_32Bit-1.0.jar)
* 64 Bit task uses that newly updated pom.xml file with (2.0), it creates build on that version. And updates the version (3.0) in pom.xml file. Pushes the builds in artifacts repository with the notation (ABC_64Bit-2.0.jar)
* So, finally we get directory structure as below, which is not expected.
--> ABC
--> 32 Bit
--> 1.0
ABC_32Bit-1.0.jar
--> 64 Bit
--> 2.0
ABC_64Bit-2.0.jar
I have even tried to use release:rollback command in between above mentioned tasks. After executing 32 Bit task to make pom.xml file fresh (before executing 32 Bit profile) for executing 64 Bit profile to avoid version increment in pom.xml.
Again it is not working and giving error as "cannot restore from a missing backup POM"
* 1. for 32 Bit -->release:prepare release:perform -P "32Bit,!64Bit"
* 2. release:rollback
* 3. for 64 Bit -->release:prepare release:perform -P "!32Bit,64Bit"
Hope you guys got my problem. If not feel free to open discussion.
Thanks
---
**Affects:** 2.5.3
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the two Bamboo tasks with the 32Bit and 64Bit profiles, using release:prepare, release:perform, and release:rollback against the pom.xml. Trace how release:prepare changes the version and how rollback looks for its backup POM. Done means both profile artifacts can be produced at version 1.0 without the second task inheriting an incremented version or rollback failing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100