File tree Expand file tree Collapse file tree 4 files changed +27
-14
lines changed
main/java/org/apache/maven/plugins/release Expand file tree Collapse file tree 4 files changed +27
-14
lines changed Original file line number Diff line number Diff line change 66 * to you under the Apache License, Version 2.0 (the
77 * "License"); you may not use this file except in compliance
88 * with the License. You may obtain a copy of the License at
9- *
9+ *
1010 * http://www.apache.org/licenses/LICENSE-2.0
11- *
11+ *
1212 * Unless required by applicable law or agreed to in writing,
1313 * software distributed under the License is distributed on an
1414 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1717 * under the License.
1818 */
1919
20+ File buildLog = new File ( basedir, ' build.log' )
21+ assert buildLog. exists()
22+
23+ assert buildLog. getText(). contains(" [INFO] Full run would be commit 1 files with message: '[maven-release-plugin] prepare branch test-1.0.x'" )
24+
2025try
21- {
22- File buildLog = new File ( basedir, " build.log" );
23-
26+ {
2427 System . out. println ( " Checking logs..." );
25-
28+
2629 StringBuffer data = new StringBuffer ( 1024 );
2730 BufferedReader reader = new BufferedReader ( new FileReader ( buildLog ) );
2831 char [] buf = new char [1024 ];
3740 String contents = data. toString();
3841
3942 String one_expected = " Checking in modified POMs" ;
40-
43+
4144 int pos = contents. indexOf( one_expected );
42-
45+
4346 if ( contents. indexOf( one_expected, pos ) == -1 )
4447 {
4548 return true ;
46- }
49+ }
4750}
4851catch ( Throwable t )
4952{
Original file line number Diff line number Diff line change 2020
2121import groovy.xml.XmlSlurper
2222
23+ File buildLog = new File ( basedir, ' build.log' )
24+ assert buildLog. exists()
25+
26+ assert buildLog. getText(). contains(" [INFO] Full run would be commit 1 files with message: '[maven-release-plugin] prepare branch RELEASE-2.6.0'" )
27+
2328def projectBranch = new XmlSlurper (). parse( new File ( basedir, " pom.xml.branch" ) )
2429assert projectBranch. version. text() == " 2.6.0-BRANCH-SNAPSHOT"
2530
2631def projectNext = new XmlSlurper (). parse( new File ( basedir, " pom.xml.next" ) )
2732assert projectNext. version. text() == " 2.6.1-DEV-SNAPSHOT"
2833
29- return true
34+ return true
Original file line number Diff line number Diff line change @@ -27,4 +27,9 @@ assert project.version.text() == "1.0-SNAPSHOT"
2727def projectNext = new XmlSlurper (). parse( new File ( basedir, " pom.xml.next" ) )
2828assert projectNext. version. text() == " 1.0-SNAPSHOT"
2929
30+ File buildLog = new File ( basedir, ' build.log' )
31+ assert buildLog. exists()
32+
33+ assert buildLog. getText(). contains(" [INFO] Full run would be commit 1 files with message: '[maven-release-plugin] prepare branch branch-mrelease-976'" )
34+
3035return true
Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ public class BranchReleaseMojo extends AbstractScmReleaseMojo {
218218
219219 /**
220220 * The SCM commit comment when branching.
221- * Defaults to "@{prefix} prepare branch @{releaseLabel }".
221+ * Defaults to "@{prefix} prepare branch @{branchName }".
222222 * <p>
223223 * Property interpolation is performed on the value, but in order to ensure that the interpolation occurs
224224 * during release, you must use <code>@{...}</code> to reference the properties rather than <code>${...}</code>.
@@ -227,13 +227,13 @@ public class BranchReleaseMojo extends AbstractScmReleaseMojo {
227227 * <li><code>prefix</code> - The comment prefix.
228228 * <li><code>groupId</code> - The groupId of the root project.
229229 * <li><code>artifactId</code> - The artifactId of the root project.
230- * <li><code>releaseLabel </code> - The release version of the root project.
230+ * <li><code>branchName </code> - The branch name of the root project.
231231 * </ul>
232232 *
233233 * @since 3.0.0-M1
234234 */
235- @ Parameter (defaultValue = "@{prefix} prepare branch @{releaseLabel }" , property = "scmBranchCommitComment" )
236- private String scmBranchCommitComment = "@{prefix} prepare branch @{releaseLabel }" ;
235+ @ Parameter (defaultValue = "@{prefix} prepare branch @{branchName }" , property = "scmBranchCommitComment" )
236+ private String scmBranchCommitComment = "@{prefix} prepare branch @{branchName }" ;
237237
238238 /**
239239 * Currently only implemented with svn scm. Enable the {@code --pin-externals} option in
You can’t perform that action at this time.
0 commit comments