maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject [maven-release] 01/05: Pull up commonBasedir
Date Sun, 04 Mar 2018 19:17:52 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 33ca391a8e44f5d881254825ec59fc358ab2fe39
Author: rfscholte <rfscholte@apache.org>
AuthorDate: Sun Feb 25 21:37:18 2018 +0100

    Pull up commonBasedir
---
 .../release/phase/AbstractRewritePomsPhase.java    | 30 +++++++++++-----------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
index ac6a682..d068ce4 100644
--- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
+++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
@@ -169,16 +169,27 @@ public abstract class AbstractRewritePomsPhase
                             List<MavenProject> reactorProjects, boolean simulate, ReleaseResult
result )
         throws ReleaseExecutionException, ReleaseFailureException
     {
+        String commonBasedir;
+        try
+        {
+            commonBasedir = ReleaseUtil.getCommonBasedir( reactorProjects );
+        }
+        catch ( IOException e )
+        {
+            throw new ReleaseExecutionException( "Exception occurred while calculating common
basedir: "
+                + e.getMessage(), e );
+        }
+
         for ( MavenProject project : reactorProjects )
         {
             logInfo( result, "Transforming '" + project.getName() + "'..." );
 
-            transformProject( project, releaseDescriptor, releaseEnvironment, reactorProjects,
simulate, result );
+            transformProject( project, releaseDescriptor, releaseEnvironment, commonBasedir,
simulate, result );
         }
     }
 
     private void transformProject( MavenProject project, ReleaseDescriptor releaseDescriptor,
-                                   ReleaseEnvironment releaseEnvironment, List<MavenProject>
reactorProjects,
+                                   ReleaseEnvironment releaseEnvironment, String commonBasedir,
                                    boolean simulate, ReleaseResult result )
         throws ReleaseExecutionException, ReleaseFailureException
     {
@@ -215,7 +226,7 @@ public abstract class AbstractRewritePomsPhase
             }
         }
 
-        transformDocument( project, etl.getModel(), releaseDescriptor, reactorProjects, scmRepository,
+        transformDocument( project, etl.getModel(), releaseDescriptor, commonBasedir, scmRepository,
                            result, simulate );
 
         File outputFile;
@@ -233,7 +244,7 @@ public abstract class AbstractRewritePomsPhase
     }
 
     private void transformDocument( MavenProject project, Model modelTarget, ReleaseDescriptor
releaseDescriptor,
-                                    List<MavenProject> reactorProjects, ScmRepository
scmRepository,
+                                    String commonBasedir, ScmRepository scmRepository,
                                     ReleaseResult result, boolean simulate )
         throws ReleaseExecutionException, ReleaseFailureException
     {
@@ -327,17 +338,6 @@ public abstract class AbstractRewritePomsPhase
             }
         }
 
-        String commonBasedir;
-        try
-        {
-            commonBasedir = ReleaseUtil.getCommonBasedir( reactorProjects );
-        }
-        catch ( IOException e )
-        {
-            throw new ReleaseExecutionException( "Exception occurred while calculating common
basedir: "
-                + e.getMessage(), e );
-        }
-
         transformScm( project, modelTarget, releaseDescriptor, projectId, scmRepository,
result,
                       commonBasedir );
     }

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

Mime
View raw message