maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject [maven-release] 02/02: Cleanup tests
Date Fri, 23 Mar 2018 22:08:36 GMT
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch Paths
in repository https://gitbox.apache.org/repos/asf/maven-release.git

commit 45d832b475710d56acc34f2be951c62fffcf6f00
Author: rfscholte <rfscholte@apache.org>
AuthorDate: Fri Mar 23 23:08:21 2018 +0100

    Cleanup tests
---
 ...tractEditModeRewritingReleasePhaseTestCase.java |  17 ++--
 .../AbstractRewritingReleasePhaseTestCase.java     | 109 ++++++++++-----------
 .../release/phase/CheckoutProjectFromScmTest.java  |   4 +-
 .../phase/GenerateReleasePomsPhaseTest.java        |  16 +--
 .../phase/RewritePomsForBranchPhaseTest.java       |  45 +++------
 .../phase/RewritePomsForDevelopmentPhaseTest.java  |  32 +++---
 .../phase/RewritePomsForReleasePhaseTest.java      |  41 +++-----
 7 files changed, 113 insertions(+), 151 deletions(-)

diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractEditModeRewritingReleasePhaseTestCase.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractEditModeRewritingReleasePhaseTestCase.java
index 03141b2..4e13728 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractEditModeRewritingReleasePhaseTestCase.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractEditModeRewritingReleasePhaseTestCase.java
@@ -67,8 +67,7 @@ public abstract class AbstractEditModeRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "basic-pom" ).toString() );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom" );
         builder.setScmUseEditMode( true );
         mapNextVersion( builder, "groupId:artifactId" );
 
@@ -82,8 +81,7 @@ public abstract class AbstractEditModeRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "basic-pom" ).toString() );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, "basic-pom" );
         builder.setScmUseEditMode( true );
         mapNextVersion( builder, "groupId:artifactId" );
 
@@ -113,8 +111,7 @@ public abstract class AbstractEditModeRewritingReleasePhaseTestCase
     {
         // prepare
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "basic-pom" ).toString() );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, "basic-pom" );
         builder.setScmUseEditMode( true );
         mapNextVersion( builder, "groupId:artifactId" );
 
@@ -149,7 +146,7 @@ public abstract class AbstractEditModeRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-snapshot-plugin-deps" );
-        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects, "internal-snapshot-plugin-deps" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -161,7 +158,7 @@ public abstract class AbstractEditModeRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-snapshot-plugin-deps" );
-        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects, "internal-snapshot-plugin-deps" );
 
         try
         {
@@ -180,7 +177,7 @@ public abstract class AbstractEditModeRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-snapshot-profile" );
-        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects, "internal-snapshot-profile" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -192,7 +189,7 @@ public abstract class AbstractEditModeRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-snapshot-profile" );
-        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects, "internal-snapshot-profile" );
 
         try
         {
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractRewritingReleasePhaseTestCase.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractRewritingReleasePhaseTestCase.java
index 290550e..0f72873 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractRewritingReleasePhaseTestCase.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractRewritingReleasePhaseTestCase.java
@@ -97,8 +97,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "basic-pom" ).toString() );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom" );
         mapNextVersion( builder, "groupId:artifactId" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
@@ -111,7 +110,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom-entities" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom-entities" );
         mapNextVersion( builder, "groupId:artifactId" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
@@ -124,7 +123,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom-namespace" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom-namespace" );
         mapNextVersion( builder, "groupId:artifactId" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
@@ -137,8 +136,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom-with-encoding" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "basic-pom-with-encoding" ).toString() );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom-with-encoding" );
         mapNextVersion( builder, "groupId:artifactId" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
@@ -151,8 +149,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "pom-with-parent" );
-        ReleaseDescriptorBuilder builder = createConfigurationForPomWithParentAlternateNextVersion( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "pom-with-parent" ).toString() );
+        ReleaseDescriptorBuilder builder = createConfigurationForPomWithParentAlternateNextVersion( reactorProjects, "pom-with-parent" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -165,7 +162,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
     {
 
         List<MavenProject> reactorProjects = createReactorProjects( "pom-with-parent" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, "pom-with-parent" );
 
         // Process the child first
         reactorProjects = new ArrayList<>( reactorProjects );
@@ -191,7 +188,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
     {
 
         List<MavenProject> reactorProjects = createReactorProjects( "pom-with-released-parent" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, "pom-with-released-parent" );
 
         mapAlternateNextVersion( builder, "groupId:subproject1" );
         builder.addReleaseVersion( "groupId:artifactId", "1" );
@@ -209,7 +206,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "pom-with-inherited-version" );
-        ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion( reactorProjects );
+        ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion( reactorProjects, "pom-with-inherited-version" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -221,7 +218,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "pom-with-inherited-version" );
-        ReleaseDescriptorBuilder builder = createConfigurationForPomWithParentAlternateNextVersion( reactorProjects );
+        ReleaseDescriptorBuilder builder = createConfigurationForPomWithParentAlternateNextVersion( reactorProjects, "pom-with-inherited-version" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -229,7 +226,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         comparePomFiles( project, "-version-changed" );
     }
 
-    protected abstract ReleaseDescriptorBuilder createConfigurationForPomWithParentAlternateNextVersion( List<MavenProject> reactorProjects )
+    protected abstract ReleaseDescriptorBuilder createConfigurationForPomWithParentAlternateNextVersion( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception;
 
     @Test
@@ -237,7 +234,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-snapshot-dependencies" );
-        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects, "internal-snapshot-dependencies" );
         mapNextVersion( builder, "groupId:subsubproject" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
@@ -250,7 +247,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-snapshot-dependencies" );
-        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects, "internal-snapshot-dependencies" );
 
         try
         {
@@ -269,7 +266,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-differing-snapshot-dependencies" );
-        ReleaseDescriptorBuilder builder = createDifferingVersionConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDifferingVersionConfiguration( reactorProjects, "internal-differing-snapshot-dependencies" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -281,7 +278,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-managed-snapshot-dependency" );
-        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects, "internal-managed-snapshot-dependency" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -293,7 +290,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-managed-snapshot-dependency" );
-        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects, "internal-managed-snapshot-dependency" );
 
         try
         {
@@ -312,7 +309,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-snapshot-plugins" );
-        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects, "internal-snapshot-plugins" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -324,7 +321,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-snapshot-plugins" );
-        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects, "internal-snapshot-plugins" );
 
         try
         {
@@ -343,7 +340,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-differing-snapshot-plugins" );
-        ReleaseDescriptorBuilder builder = createDifferingVersionConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDifferingVersionConfiguration( reactorProjects, "internal-differing-snapshot-plugins" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -355,7 +352,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-managed-snapshot-plugin" );
-        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects, "internal-managed-snapshot-plugin" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -367,7 +364,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-managed-snapshot-plugin" );
-        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects, "internal-managed-snapshot-plugin" );
 
         try
         {
@@ -386,7 +383,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-snapshot-report-plugins" );
-        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects, "internal-snapshot-report-plugins" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -398,7 +395,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-snapshot-report-plugins" );
-        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects, "internal-snapshot-report-plugins" );
 
         try
         {
@@ -417,7 +414,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-differing-snapshot-report-plugins" );
-        ReleaseDescriptorBuilder builder = createDifferingVersionConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDifferingVersionConfiguration( reactorProjects, "internal-differing-snapshot-report-plugins" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -430,7 +427,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-snapshot-extension" );
-        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects, "internal-snapshot-extension" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -443,7 +440,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-snapshot-extension" );
-        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createUnmappedConfiguration( reactorProjects, "internal-snapshot-extension" );
 
         try
         {
@@ -463,7 +460,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "internal-differing-snapshot-extension" );
-        ReleaseDescriptorBuilder builder = createDifferingVersionConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDifferingVersionConfiguration( reactorProjects, "internal-differing-snapshot-extension" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -476,7 +473,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "pom-without-extension-version" );
-        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects, "pom-without-extension-version" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -494,8 +491,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         {
             String path = "basic-pom";
             List<MavenProject> reactorProjects = prepareReactorProjects( path );
-            ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
-            builder.setWorkingDirectory( getWorkingDirectory( "basic-pom" ).toString() );
+            ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom" );
             mapNextVersion( builder, "groupId:artifactId" );
             builder.setAddSchema( true );
 
@@ -515,7 +511,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
     {
         // prepare
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom" );
         builder.setScmUseEditMode( true );
         mapNextVersion( builder, "groupId:artifactId" );
 
@@ -539,7 +535,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom" );
 
         try
         {
@@ -559,7 +555,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
     {
         // prepare
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom" );
         builder.setScmUseEditMode( true );
         builder.setScmSourceUrl( "scm:svn:fail" );
         mapNextVersion( builder, "groupId:artifactId" );
@@ -588,7 +584,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
     {
         // prepare
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom" );
         builder.setScmUseEditMode( true );
         builder.setScmSourceUrl( "scm:fail:path" );
         mapNextVersion( builder, "groupId:artifactId" );
@@ -618,8 +614,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "whitespace-around-values" );
-        ReleaseDescriptorBuilder builder = createConfigurationForPomWithParentAlternateNextVersion( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "whitespace-around-values" ).toString() );
+        ReleaseDescriptorBuilder builder = createConfigurationForPomWithParentAlternateNextVersion( reactorProjects, "whitespace-around-values" );
         mapNextVersion( builder, "groupId:subproject2" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
@@ -632,8 +627,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "comments-around-values" );
-        ReleaseDescriptorBuilder builder = createConfigurationForPomWithParentAlternateNextVersion( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "comments-around-values" ).toString() );
+        ReleaseDescriptorBuilder builder = createConfigurationForPomWithParentAlternateNextVersion( reactorProjects, "comments-around-values" );
         mapNextVersion( builder, "groupId:subproject2" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
@@ -646,8 +640,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "cdata-around-values" );
-        ReleaseDescriptorBuilder builder = createConfigurationForPomWithParentAlternateNextVersion( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "cdata-around-values" ).toString() );
+        ReleaseDescriptorBuilder builder = createConfigurationForPomWithParentAlternateNextVersion( reactorProjects, "cdata-around-values" );
         mapNextVersion( builder, "groupId:subproject2" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
@@ -663,10 +656,10 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         ( (ResourceGenerator) phase ).clean( Collections.<MavenProject>emptyList() );
     }
 
-    protected ReleaseDescriptorBuilder createUnmappedConfiguration( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createUnmappedConfiguration( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception
     {
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, workingDirectory );
 
         unmapNextVersion( builder, "groupId:subproject1" );
         mapNextVersion( builder, "groupId:subproject2" );
@@ -681,44 +674,44 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         return prepareReactorProjects( path );
     }
 
-    protected ReleaseDescriptorBuilder createDefaultConfiguration( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createDefaultConfiguration( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception
     {
-        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects, workingDirectory );
 
         mapNextVersion( builder, "groupId:subproject4" );
         return builder;
     }
 
-    protected ReleaseDescriptorBuilder createMappedConfiguration( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createMappedConfiguration( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception
     {
-        ReleaseDescriptorBuilder builder = createDifferingVersionConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDifferingVersionConfiguration( reactorProjects, workingDirectory );
 
         mapNextVersion( builder, "groupId:subproject3" );
         return builder;
     }
 
-    private ReleaseDescriptorBuilder createDifferingVersionConfiguration( List<MavenProject> reactorProjects )
+    private ReleaseDescriptorBuilder createDifferingVersionConfiguration( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception
     {
-        ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion( reactorProjects );
+        ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion( reactorProjects, workingDirectory );
 
         mapNextVersion( builder, "groupId:subproject2" );
         return builder;
     }
 
-    protected abstract ReleaseDescriptorBuilder createConfigurationForWithParentNextVersion( List<MavenProject> reactorProjects )
+    protected abstract ReleaseDescriptorBuilder createConfigurationForWithParentNextVersion( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception;
 
     protected abstract void unmapNextVersion( ReleaseDescriptorBuilder config, String projectId );
 
     protected abstract void mapNextVersion( ReleaseDescriptorBuilder config, String projectId );
 
-    protected ReleaseDescriptorBuilder createDescriptorFromBasicPom( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createDescriptorFromBasicPom( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception
     {
-        return createDescriptorFromProjects( reactorProjects );
+        return createDescriptorFromProjects( reactorProjects, workingDirectory );
     }
 
     protected abstract String readTestProjectFile( String fileName )
@@ -729,7 +722,7 @@ public abstract class AbstractRewritingReleasePhaseTestCase
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "pom-with-namespace" );
-        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects, "pom-with-namespace" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -744,12 +737,14 @@ public abstract class AbstractRewritingReleasePhaseTestCase
     {
     }
 
-    protected ReleaseDescriptorBuilder createDescriptorFromProjects( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createDescriptorFromProjects( List<MavenProject> reactorProjects, String workingDirectory )
     {
-      return createDescriptorFromProjects( new ReleaseDescriptorBuilder(), reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( new ReleaseDescriptorBuilder(), reactorProjects );
+        builder.setWorkingDirectory( getWorkingDirectory( workingDirectory ).toString() );
+        return builder;
     }
     
-    protected ReleaseDescriptorBuilder createDescriptorFromProjects( ReleaseDescriptorBuilder builder, List<MavenProject> reactorProjects )
+    private ReleaseDescriptorBuilder createDescriptorFromProjects( ReleaseDescriptorBuilder builder, List<MavenProject> reactorProjects )
     {
         MavenProject rootProject = ReleaseUtil.getRootProject( reactorProjects );
         
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/CheckoutProjectFromScmTest.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/CheckoutProjectFromScmTest.java
index 82954e8..3ac4eb5 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/CheckoutProjectFromScmTest.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/CheckoutProjectFromScmTest.java
@@ -97,7 +97,7 @@ public class CheckoutProjectFromScmTest
 
         String dir = "scm-commit/single-pom";
         List<MavenProject> reactorProjects = createReactorProjects( dir, dir, null );
-        builder.setWorkingDirectory( getWorkingDirectory( dir ) .toString() );
+        builder.setWorkingDirectory( getWorkingDirectory( dir ).toString() );
 
         // execute
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
@@ -140,7 +140,7 @@ public class CheckoutProjectFromScmTest
 
         String dir = "scm-commit/multimodule-with-deep-subprojects";
         List<MavenProject> reactorProjects = createReactorProjects( dir, dir, null );
-        builder.setWorkingDirectory( getWorkingDirectory( dir ) .toString() );
+        builder.setWorkingDirectory( getWorkingDirectory( dir ).toString() );
 
         // execute
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhaseTest.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhaseTest.java
index 1dee628..570f9f4 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhaseTest.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhaseTest.java
@@ -101,7 +101,7 @@ public class GenerateReleasePomsPhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "external-range-dependency" );
-        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects, "external-range-dependency" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -151,7 +151,7 @@ public class GenerateReleasePomsPhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "pom-with-finalname" );
-        ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion( reactorProjects );
+        ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion( reactorProjects, "pom-with-finalname" );
         builder.setGenerateReleasePoms( true );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
@@ -165,9 +165,9 @@ public class GenerateReleasePomsPhaseTest
      * util.List)
      */
     @Override
-    protected ReleaseDescriptorBuilder createDescriptorFromProjects( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createDescriptorFromProjects( List<MavenProject> reactorProjects, String workingDirectory )
     {
-        ReleaseDescriptorBuilder builder = super.createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = super.createDescriptorFromProjects( reactorProjects, workingDirectory );
         builder.setScmReleaseLabel( "release-label" );
         builder.setGenerateReleasePoms( true );
         return builder;
@@ -262,10 +262,10 @@ public class GenerateReleasePomsPhaseTest
      * createConfigurationForPomWithParentAlternateNextVersion(java.util.List)
      */
     @Override
-    protected ReleaseDescriptorBuilder createConfigurationForPomWithParentAlternateNextVersion( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createConfigurationForPomWithParentAlternateNextVersion( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception
     {
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, workingDirectory );
 
         builder.addReleaseVersion( "groupId:artifactId", NEXT_VERSION );
         builder.addReleaseVersion( "groupId:subproject1", ALTERNATIVE_NEXT_VERSION );
@@ -278,10 +278,10 @@ public class GenerateReleasePomsPhaseTest
      * createConfigurationForWithParentNextVersion(java.util.List)
      */
     @Override
-    protected ReleaseDescriptorBuilder createConfigurationForWithParentNextVersion( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createConfigurationForWithParentNextVersion( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception
     {
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, workingDirectory );
 
         builder.addReleaseVersion( "groupId:artifactId", NEXT_VERSION );
         builder.addReleaseVersion( "groupId:subproject1", NEXT_VERSION );
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForBranchPhaseTest.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForBranchPhaseTest.java
index a560d68..49642af 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForBranchPhaseTest.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForBranchPhaseTest.java
@@ -85,8 +85,7 @@ public class RewritePomsForBranchPhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "basic-pom" ).toString() );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom" );
         builder.addReleaseVersion( "groupId:artifactId", NEXT_VERSION );
 
         String expected = readTestProjectFile( "basic-pom/pom.xml" );
@@ -106,8 +105,7 @@ public class RewritePomsForBranchPhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom-with-dashes-in-comment" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "basic-pom-with-dashes-in-comment" ).toString() );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom-with-dashes-in-comment" );
         builder.addReleaseVersion( "groupId:artifactId", NEXT_VERSION );
 
         String expected = readTestProjectFile( "basic-pom-with-dashes-in-comment/pom.xml" );
@@ -148,7 +146,7 @@ public class RewritePomsForBranchPhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom" );
         builder.addReleaseVersion( "groupId:artifactId", NEXT_VERSION );
 
         File testFile = getTestFile( "target/test-classes/projects/rewrite-for-branch/basic-pom/pom.xml.branch" );
@@ -166,8 +164,7 @@ public class RewritePomsForBranchPhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "pom-with-overridden-scm" );
-        ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "pom-with-overridden-scm" ).toString() );
+        ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion( reactorProjects, "pom-with-overridden-scm" );
         builder.addReleaseVersion( "groupId:subsubproject", NEXT_VERSION );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
@@ -188,10 +185,10 @@ public class RewritePomsForBranchPhaseTest
     }
 
     @Override
-    protected ReleaseDescriptorBuilder createConfigurationForPomWithParentAlternateNextVersion( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createConfigurationForPomWithParentAlternateNextVersion( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception
     {
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, workingDirectory );
 
         builder.addReleaseVersion( "groupId:artifactId", NEXT_VERSION );
         builder.addReleaseVersion( "groupId:subproject1", ALTERNATIVE_NEXT_VERSION );
@@ -199,10 +196,10 @@ public class RewritePomsForBranchPhaseTest
     }
 
     @Override
-    protected ReleaseDescriptorBuilder createConfigurationForWithParentNextVersion( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createConfigurationForWithParentNextVersion( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception
     {
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, workingDirectory );
 
         builder.addReleaseVersion( "groupId:artifactId", NEXT_VERSION );
         builder.addReleaseVersion( "groupId:subproject1", NEXT_VERSION );
@@ -303,7 +300,7 @@ public class RewritePomsForBranchPhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "interpolated-versions" );
-        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects, "interpolated-versions" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -339,8 +336,7 @@ public class RewritePomsForBranchPhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom-inherited-scm" );
-        ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "basic-pom-inherited-scm" ).toString() );
+        ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion( reactorProjects, "basic-pom-inherited-scm" );
         builder.addReleaseVersion( "groupId:subsubproject", NEXT_VERSION );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
@@ -419,8 +415,8 @@ public class RewritePomsForBranchPhaseTest
     {
         List<MavenProject> reactorProjects =
             createReactorProjects( "rewrite-for-branch/pom-with-parent-flat", "pom-with-parent-flat", "root-project" );
-        ReleaseDescriptorBuilder builder = createConfigurationForPomWithParentAlternateNextVersion( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "pom-with-parent-flat" ).toString() );
+        ReleaseDescriptorBuilder builder =
+            createConfigurationForPomWithParentAlternateNextVersion( reactorProjects, "pom-with-parent-flat" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -444,31 +440,20 @@ public class RewritePomsForBranchPhaseTest
         assertTrue( comparePomFiles( reactorProjects, false ) );
     }
 
-    @Override
-    @Deprecated
-    protected ReleaseDescriptorBuilder createDescriptorFromProjects( List<MavenProject> reactorProjects )
-    {
-        ReleaseDescriptorBuilder builder = super.createDescriptorFromProjects( reactorProjects );
-        builder.setScmReleaseLabel( "release-label" );
-        return builder;
-    }
-    
     protected ReleaseDescriptorBuilder createDescriptorFromProjects( List<MavenProject> reactorProjects, String workingDirectory )
     {
-        ReleaseDescriptorBuilder builder = super.createDescriptorFromProjects( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( workingDirectory ).toString() );
+        ReleaseDescriptorBuilder builder = super.createDescriptorFromProjects( reactorProjects, workingDirectory );
         builder.setScmReleaseLabel( "release-label" );
         return builder;
     }
 
-
     // MRELEASE-454
     @Test
     public void testRewritePomWithImportedDependencyManagementInReactor()
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "imported-dependency-management-in-reactor" );
-        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects, "imported-dependency-management-in-reactor" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -480,7 +465,7 @@ public class RewritePomsForBranchPhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "modules-with-different-versions" );
-        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects, "modules-with-different-versions" );
         builder.addReleaseVersion( "groupId:subproject2", ALTERNATIVE_NEXT_VERSION );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForDevelopmentPhaseTest.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForDevelopmentPhaseTest.java
index 3a8d32a..953694c 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForDevelopmentPhaseTest.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForDevelopmentPhaseTest.java
@@ -76,7 +76,7 @@ public class RewritePomsForDevelopmentPhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjectsWhenSimulated( "basic-pom" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom" );
         builder.addReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         builder.addDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
 
@@ -105,7 +105,7 @@ public class RewritePomsForDevelopmentPhaseTest
         List<MavenProject> reactorProjects =
             new LinkedList<>( createReactorProjects( "basic-pom-ejb-client-dep/project" ) );
         reactorProjects.addAll( createReactorProjects( "basic-pom-ejb-client-dep/ejb" ) );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom-ejb-client-dep" );
         builder.addReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         builder.addDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
         builder.addDevelopmentVersion( ArtifactUtils.versionlessKey( "groupId", "artifactId1" ), NEXT_VERSION );
@@ -128,7 +128,7 @@ public class RewritePomsForDevelopmentPhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjectsWhenSimulated( "basic-pom" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom" );
         builder.addReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         builder.addDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
 
@@ -182,10 +182,10 @@ public class RewritePomsForDevelopmentPhaseTest
     }
 
     @Override
-    protected ReleaseDescriptorBuilder createDescriptorFromBasicPom( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createDescriptorFromBasicPom( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception
     {
-        ReleaseDescriptorBuilder builder = super.createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = super.createDescriptorFromProjects( reactorProjects, workingDirectory );
 
         mapScm( builder );
 
@@ -222,10 +222,10 @@ public class RewritePomsForDevelopmentPhaseTest
     }
 
     @Override
-    protected ReleaseDescriptorBuilder createConfigurationForPomWithParentAlternateNextVersion( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createConfigurationForPomWithParentAlternateNextVersion( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception
     {
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, workingDirectory );
 
         builder.addReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         builder.addDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
@@ -237,10 +237,10 @@ public class RewritePomsForDevelopmentPhaseTest
     }
 
     @Override
-    protected ReleaseDescriptorBuilder createConfigurationForWithParentNextVersion( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createConfigurationForWithParentNextVersion( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception
     {
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, workingDirectory );
 
         builder.addReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         builder.addDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
@@ -257,7 +257,7 @@ public class RewritePomsForDevelopmentPhaseTest
     {
 
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom-with-cvs" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, "basic-pom-with-cvs" );
         mapNextVersion( builder, "groupId:artifactId" );
 
         Scm scm = new Scm();
@@ -277,7 +277,7 @@ public class RewritePomsForDevelopmentPhaseTest
     {
 
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom-with-cvs-from-tag" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, "basic-pom-with-cvs-from-tag" );
         mapNextVersion( builder, "groupId:artifactId" );
 
         Scm scm = new Scm();
@@ -298,7 +298,7 @@ public class RewritePomsForDevelopmentPhaseTest
     {
 
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom-inherited-scm" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, "basic-pom-inherited-scm" );
 
         builder.addReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         builder.addDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
@@ -347,7 +347,7 @@ public class RewritePomsForDevelopmentPhaseTest
     {
         List<MavenProject> reactorProjects = createReactorProjects( path );
 
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, path );
         builder.addReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         builder.addDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
         builder.addReleaseVersion( "groupId:subproject1", ALTERNATIVE_RELEASE_VERSION );
@@ -369,7 +369,7 @@ public class RewritePomsForDevelopmentPhaseTest
         // use the original ones since simulation didn't modify them
         List<MavenProject> reactorProjects = createReactorProjects( "pom-with-parent-and-properties-sim" );
 
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, "pom-with-parent-and-properties-sim" );
         builder.addReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         builder.addDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
         builder.addReleaseVersion( "groupId:subproject1", ALTERNATIVE_RELEASE_VERSION );
@@ -398,7 +398,7 @@ public class RewritePomsForDevelopmentPhaseTest
     {
         List<MavenProject> reactorProjects = createReactorProjects( "pom-with-property-dependency-coordinate" );
 
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, "pom-with-property-dependency-coordinate" );
         builder.addReleaseVersion( "groupId:artifactId", RELEASE_VERSION );
         builder.addDevelopmentVersion( "groupId:artifactId", NEXT_VERSION );
         builder.addReleaseVersion( "groupId:subproject1-3.4", ALTERNATIVE_RELEASE_VERSION );
@@ -419,7 +419,7 @@ public class RewritePomsForDevelopmentPhaseTest
     {
         List<MavenProject> reactorProjects =
             createReactorProjects( "internal-snapshot-dependencies-without-dependencies-version-update" );
-        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDefaultConfiguration( reactorProjects, "internal-snapshot-dependencies-without-dependencies-version-update" );
         builder.setUpdateDependencies( false );
         mapNextVersion( builder, "groupId:subsubproject" );
 
diff --git a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhaseTest.java b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhaseTest.java
index ac74644..e25678e 100644
--- a/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhaseTest.java
+++ b/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhaseTest.java
@@ -87,8 +87,7 @@ public class RewritePomsForReleasePhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "basic-pom" ).toString() );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom" );
         builder.addReleaseVersion( "groupId:artifactId", NEXT_VERSION );
 
         String expected = readTestProjectFile( "basic-pom/pom.xml" );
@@ -108,8 +107,7 @@ public class RewritePomsForReleasePhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom-with-dashes-in-comment" );
-        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "basic-pom-with-dashes-in-comment" ).toString() );
+        ReleaseDescriptorBuilder builder = createDescriptorFromBasicPom( reactorProjects, "basic-pom-with-dashes-in-comment" );
         builder.addReleaseVersion( "groupId:artifactId", NEXT_VERSION );
 
         String expected = readTestProjectFile( "basic-pom-with-dashes-in-comment/pom.xml" );
@@ -166,8 +164,7 @@ public class RewritePomsForReleasePhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "pom-with-overridden-scm" );
-        ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "pom-with-overridden-scm" ).toString() );
+        ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion( reactorProjects, "pom-with-overridden-scm" );
         builder.addReleaseVersion( "groupId:subsubproject", NEXT_VERSION );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
@@ -188,10 +185,10 @@ public class RewritePomsForReleasePhaseTest
     }
 
     @Override
-    protected ReleaseDescriptorBuilder createConfigurationForPomWithParentAlternateNextVersion( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createConfigurationForPomWithParentAlternateNextVersion( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception
     {
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, workingDirectory );
 
         builder.addReleaseVersion( "groupId:artifactId", NEXT_VERSION );
         builder.addReleaseVersion( "groupId:subproject1", ALTERNATIVE_NEXT_VERSION );
@@ -199,10 +196,10 @@ public class RewritePomsForReleasePhaseTest
     }
 
     @Override
-    protected ReleaseDescriptorBuilder createConfigurationForWithParentNextVersion( List<MavenProject> reactorProjects )
+    protected ReleaseDescriptorBuilder createConfigurationForWithParentNextVersion( List<MavenProject> reactorProjects, String workingDirectory )
         throws Exception
     {
-        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = createDescriptorFromProjects( reactorProjects, workingDirectory );
 
         builder.addReleaseVersion( "groupId:artifactId", NEXT_VERSION );
         builder.addReleaseVersion( "groupId:subproject1", NEXT_VERSION );
@@ -303,7 +300,7 @@ public class RewritePomsForReleasePhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "interpolated-versions" );
-        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects, "interpolated-versions" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -341,8 +338,7 @@ public class RewritePomsForReleasePhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "basic-pom-inherited-scm" );
-        ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "basic-pom-inherited-scm" ).toString() );
+        ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion( reactorProjects, "basic-pom-inherited-scm" );
         builder.addReleaseVersion( "groupId:subsubproject", NEXT_VERSION );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
@@ -421,8 +417,7 @@ public class RewritePomsForReleasePhaseTest
     {
         List<MavenProject> reactorProjects =
             createReactorProjects( "rewrite-for-release/pom-with-parent-flat", "pom-with-parent-flat", "root-project" );
-        ReleaseDescriptorBuilder builder = createConfigurationForPomWithParentAlternateNextVersion( reactorProjects );
-        builder.setWorkingDirectory( getWorkingDirectory( "pom-with-parent-flat" ).toString() );
+        ReleaseDescriptorBuilder builder = createConfigurationForPomWithParentAlternateNextVersion( reactorProjects, "pom-with-parent-flat" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -446,20 +441,10 @@ public class RewritePomsForReleasePhaseTest
         assertTrue( comparePomFiles( reactorProjects, false ) );
     }
 
-    @Override
-    @Deprecated
-    protected ReleaseDescriptorBuilder createDescriptorFromProjects( List<MavenProject> reactorProjects )
-    {
-        ReleaseDescriptorBuilder builder = super.createDescriptorFromProjects( reactorProjects );
-        builder.setScmReleaseLabel( "release-label" );
-        return builder;
-    }
-    
     protected ReleaseDescriptorBuilder createDescriptorFromProjects( List<MavenProject> reactorProjects, String workingDirectory )
     {
-        ReleaseDescriptorBuilder builder = super.createDescriptorFromProjects( reactorProjects );
+        ReleaseDescriptorBuilder builder = super.createDescriptorFromProjects( reactorProjects, workingDirectory );
         builder.setScmReleaseLabel( "release-label" );
-        builder.setWorkingDirectory( getWorkingDirectory( workingDirectory ).toString() );
         return builder;
     }
 
@@ -485,7 +470,7 @@ public class RewritePomsForReleasePhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "imported-dependency-management-in-reactor" );
-        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects, "imported-dependency-management-in-reactor" );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );
 
@@ -497,7 +482,7 @@ public class RewritePomsForReleasePhaseTest
         throws Exception
     {
         List<MavenProject> reactorProjects = createReactorProjects( "modules-with-different-versions" );
-        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects );
+        ReleaseDescriptorBuilder builder = createMappedConfiguration( reactorProjects, "modules-with-different-versions" );
         builder.addReleaseVersion( "groupId:subproject2", ALTERNATIVE_NEXT_VERSION );
 
         phase.execute( ReleaseUtils.buildReleaseDescriptor( builder ), new DefaultReleaseEnvironment(), reactorProjects );

-- 
To stop receiving notification emails like this one, please contact
rfscholte@apache.org.

Mime
View raw message