File tree 4 files changed +27
-14
lines changed
main/java/org/apache/maven/plugins/release
4 files changed +27
-14
lines changed Original file line number Diff line number Diff line change 6
6
* to you under the Apache License, Version 2.0 (the
7
7
* "License"); you may not use this file except in compliance
8
8
* with the License. You may obtain a copy of the License at
9
- *
9
+ *
10
10
* http://www.apache.org/licenses/LICENSE-2.0
11
- *
11
+ *
12
12
* Unless required by applicable law or agreed to in writing,
13
13
* software distributed under the License is distributed on an
14
14
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
17
* under the License.
18
18
*/
19
19
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
+
20
25
try
21
- {
22
- File buildLog = new File ( basedir, " build.log" );
23
-
26
+ {
24
27
System . out. println ( " Checking logs..." );
25
-
28
+
26
29
StringBuffer data = new StringBuffer ( 1024 );
27
30
BufferedReader reader = new BufferedReader ( new FileReader ( buildLog ) );
28
31
char [] buf = new char [1024 ];
37
40
String contents = data. toString();
38
41
39
42
String one_expected = " Checking in modified POMs" ;
40
-
43
+
41
44
int pos = contents. indexOf( one_expected );
42
-
45
+
43
46
if ( contents. indexOf( one_expected, pos ) == -1 )
44
47
{
45
48
return true ;
46
- }
49
+ }
47
50
}
48
51
catch ( Throwable t )
49
52
{
Original file line number Diff line number Diff line change 20
20
21
21
import groovy.xml.XmlSlurper
22
22
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
+
23
28
def projectBranch = new XmlSlurper (). parse( new File ( basedir, " pom.xml.branch" ) )
24
29
assert projectBranch. version. text() == " 2.6.0-BRANCH-SNAPSHOT"
25
30
26
31
def projectNext = new XmlSlurper (). parse( new File ( basedir, " pom.xml.next" ) )
27
32
assert projectNext. version. text() == " 2.6.1-DEV-SNAPSHOT"
28
33
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"
27
27
def projectNext = new XmlSlurper (). parse( new File ( basedir, " pom.xml.next" ) )
28
28
assert projectNext. version. text() == " 1.0-SNAPSHOT"
29
29
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
+
30
35
return true
Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ public class BranchReleaseMojo extends AbstractScmReleaseMojo {
218
218
219
219
/**
220
220
* The SCM commit comment when branching.
221
- * Defaults to "@{prefix} prepare branch @{releaseLabel }".
221
+ * Defaults to "@{prefix} prepare branch @{branchName }".
222
222
* <p>
223
223
* Property interpolation is performed on the value, but in order to ensure that the interpolation occurs
224
224
* during release, you must use <code>@{...}</code> to reference the properties rather than <code>${...}</code>.
@@ -227,13 +227,13 @@ public class BranchReleaseMojo extends AbstractScmReleaseMojo {
227
227
* <li><code>prefix</code> - The comment prefix.
228
228
* <li><code>groupId</code> - The groupId of the root project.
229
229
* <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.
231
231
* </ul>
232
232
*
233
233
* @since 3.0.0-M1
234
234
*/
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 }" ;
237
237
238
238
/**
239
239
* 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