From 402b093374fdeee1a3daa8163aec96389581d861 Mon Sep 17 00:00:00 2001 From: rfscholte Date: Sun, 11 Apr 2021 18:42:21 +0200 Subject: [PATCH] [MRELEASE-1016] use explicit parameter in message, fix branch message --- .../shared/release/phase/ScmBranchPhase.java | 5 ++--- .../release/phase/ScmCommitPreparationPhase.java | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmBranchPhase.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmBranchPhase.java index 576f51112..a3243e46a 100644 --- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmBranchPhase.java +++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmBranchPhase.java @@ -67,12 +67,11 @@ public ReleaseResult execute( ReleaseDescriptor releaseDescriptor, ReleaseEnviro validateConfiguration( releaseDescriptor ); + logInfo( relResult, "Branching release with the label " + releaseDescriptor.getScmReleaseLabel() + "..." ); + ReleaseDescriptor basedirAlignedReleaseDescriptor = ReleaseUtil.createBasedirAlignedReleaseDescriptor( releaseDescriptor, reactorProjects ); - logInfo( relResult, "Branching release with the label " + basedirAlignedReleaseDescriptor.getScmReleaseLabel() - + "..." ); - ScmRepository repository; ScmProvider provider; try diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmCommitPreparationPhase.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmCommitPreparationPhase.java index b1f47e8b6..b4a5bbfe7 100644 --- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmCommitPreparationPhase.java +++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ScmCommitPreparationPhase.java @@ -46,15 +46,25 @@ protected void runLogic( ReleaseDescriptor releaseDescriptor, ReleaseEnvironment // no prepare-commit required if ( releaseDescriptor.isSuppressCommitBeforeTagOrBranch() ) { + String parameterName; + if ( releaseDescriptor.isBranchCreation() ) + { + parameterName = "suppressCommitBeforeBranch"; + } + else + { + parameterName = "suppressCommitBeforeTag"; + } + if ( simulating ) { - logInfo( result, "Full run would not commit changes, " - + "because suppressCommitBeforeTagOrBranch is set to true." ); + logInfo( result, + "Full run would not commit changes, " + "because " + parameterName + " is set to true." ); } else { logInfo( result, - "Modified POMs are not committed because suppressCommitBeforeTagOrBranch is set to true." ); + "Modified POMs are not committed because " + parameterName + " is set to true." ); } } // commit development versions required