You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/11/29 20:21:00 UTC
[jira] [Commented] (MRELEASE-1109) update-versions removes the CI-friendly ${revisions}
[ https://issues.apache.org/jira/browse/MRELEASE-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17791299#comment-17791299 ]
ASF GitHub Bot commented on MRELEASE-1109:
------------------------------------------
mkolesnikov commented on code in PR #198:
URL: https://github.com/apache/maven-release/pull/198#discussion_r1409822004
##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/transform/jdom2/JDomModel.java:
##########
@@ -189,7 +192,17 @@ public void setVersion(String version) {
project.addContent(index + 2, versionElement);
}
} else {
- JDomUtils.rewriteValue(versionElement, version);
+ if (AbstractRewritePomsPhase.isCiFriendlyVersion(versionElement.getTextNormalize())) {
+ // try to rewrite property if CI friendly expression is used
+ String ciFriendlyPropertyName =
+ AbstractRewritePomsPhase.extractPropertyFromExpression(versionElement.getTextNormalize());
+ Properties properties = getProperties();
+ if (properties != null) {
+ properties.computeIfPresent(ciFriendlyPropertyName, (k, v) -> version);
Review Comment:
Unimplemented (stub) method call, it does nothing.
> update-versions removes the CI-friendly ${revisions}
> ----------------------------------------------------
>
> Key: MRELEASE-1109
> URL: https://issues.apache.org/jira/browse/MRELEASE-1109
> Project: Maven Release Plugin
> Issue Type: Bug
> Components: prepare, update-versions
> Affects Versions: 2.5.3, 3.0.0-M7
> Reporter: Marcel Stör
> Assignee: Konrad Windszus
> Priority: Major
> Fix For: next-release
>
>
> Given: a project using CI-friendly versions as per [https://maven.apache.org/maven-ci-friendly.html]
> {code:xml}
> <version>${revision}</version>
> ...
> <properties>
> <revision>1.0.0-SNAPSHOT</revision>
> </properties>
> {code}
> If I run {{mvn release:update-versions}} (with or without {{{}-DautoVersionSubmodules=true{}}}) I expect the release plugin to change the {{$revision}} property. Instead it blindly replaces {{<version>${revision}</version>}} with the hard-coded version set on the CLI.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)