diff --git a/maven-release-plugin/src/it/projects/branch/MRELEASE-458/verify.groovy b/maven-release-plugin/src/it/projects/branch/MRELEASE-458/verify.groovy index 010e552f..9eb79ca0 100644 --- a/maven-release-plugin/src/it/projects/branch/MRELEASE-458/verify.groovy +++ b/maven-release-plugin/src/it/projects/branch/MRELEASE-458/verify.groovy @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -17,12 +17,15 @@ * under the License. */ +File buildLog = new File( basedir, 'build.log' ) +assert buildLog.exists() + +assert buildLog.getText().contains("[INFO] Full run would be commit 1 files with message: '[maven-release-plugin] prepare branch test-1.0.x'") + try -{ - File buildLog = new File( basedir, "build.log" ); - +{ System.out.println( "Checking logs..." ); - + StringBuffer data = new StringBuffer( 1024 ); BufferedReader reader = new BufferedReader( new FileReader( buildLog ) ); char[] buf = new char[1024]; @@ -37,13 +40,13 @@ try String contents = data.toString(); String one_expected = "Checking in modified POMs"; - + int pos = contents.indexOf( one_expected ); - + if( contents.indexOf( one_expected, pos ) == -1 ) { return true; - } + } } catch( Throwable t ) { diff --git a/maven-release-plugin/src/it/projects/branch/MRELEASE-694/verify.groovy b/maven-release-plugin/src/it/projects/branch/MRELEASE-694/verify.groovy index 663166f1..3514168c 100644 --- a/maven-release-plugin/src/it/projects/branch/MRELEASE-694/verify.groovy +++ b/maven-release-plugin/src/it/projects/branch/MRELEASE-694/verify.groovy @@ -20,10 +20,15 @@ import groovy.xml.XmlSlurper +File buildLog = new File( basedir, 'build.log' ) +assert buildLog.exists() + +assert buildLog.getText().contains("[INFO] Full run would be commit 1 files with message: '[maven-release-plugin] prepare branch RELEASE-2.6.0'") + def projectBranch = new XmlSlurper().parse( new File( basedir, "pom.xml.branch" ) ) assert projectBranch.version.text() == "2.6.0-BRANCH-SNAPSHOT" def projectNext = new XmlSlurper().parse( new File( basedir, "pom.xml.next" ) ) assert projectNext.version.text() == "2.6.1-DEV-SNAPSHOT" -return true \ No newline at end of file +return true diff --git a/maven-release-plugin/src/it/projects/branch/MRELEASE-976/verify.groovy b/maven-release-plugin/src/it/projects/branch/MRELEASE-976/verify.groovy index b7de67c3..93aaa822 100644 --- a/maven-release-plugin/src/it/projects/branch/MRELEASE-976/verify.groovy +++ b/maven-release-plugin/src/it/projects/branch/MRELEASE-976/verify.groovy @@ -27,4 +27,9 @@ assert project.version.text() == "1.0-SNAPSHOT" def projectNext = new XmlSlurper().parse( new File( basedir, "pom.xml.next" ) ) assert projectNext.version.text() == "1.0-SNAPSHOT" +File buildLog = new File( basedir, 'build.log' ) +assert buildLog.exists() + +assert buildLog.getText().contains("[INFO] Full run would be commit 1 files with message: '[maven-release-plugin] prepare branch branch-mrelease-976'") + return true diff --git a/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/BranchReleaseMojo.java b/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/BranchReleaseMojo.java index db314c4b..f0eb8cc4 100644 --- a/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/BranchReleaseMojo.java +++ b/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/BranchReleaseMojo.java @@ -218,7 +218,7 @@ public class BranchReleaseMojo extends AbstractScmReleaseMojo { /** * The SCM commit comment when branching. - * Defaults to "@{prefix} prepare branch @{releaseLabel}". + * Defaults to "@{prefix} prepare branch @{branchName}". *
* Property interpolation is performed on the value, but in order to ensure that the interpolation occurs
* during release, you must use @{...}
to reference the properties rather than ${...}
.
@@ -227,13 +227,13 @@ public class BranchReleaseMojo extends AbstractScmReleaseMojo {
*
prefix
- The comment prefix.
* groupId
- The groupId of the root project.
* artifactId
- The artifactId of the root project.
- * releaseLabel
- The release version of the root project.
+ * branchName
- The branch name of the root project.
*
*
* @since 3.0.0-M1
*/
- @Parameter(defaultValue = "@{prefix} prepare branch @{releaseLabel}", property = "scmBranchCommitComment")
- private String scmBranchCommitComment = "@{prefix} prepare branch @{releaseLabel}";
+ @Parameter(defaultValue = "@{prefix} prepare branch @{branchName}", property = "scmBranchCommitComment")
+ private String scmBranchCommitComment = "@{prefix} prepare branch @{branchName}";
/**
* Currently only implemented with svn scm. Enable the {@code --pin-externals} option in