This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch MNG-6411
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 8c213a9dcb348ef722b441da63b1eff10d5db97b
Author: Ɓukasz Dywicki <l...@code-house.org>
AuthorDate: Fri May 11 15:38:04 2018 +0200

    MNG-6411 Improve readability of project list for resume option.
---
 .../org/apache/maven/graph/DefaultGraphBuilder.java   | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git 
a/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java 
b/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java
index ec72e8d..fb7a9f4 100644
--- a/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java
@@ -25,6 +25,7 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
@@ -311,13 +312,29 @@ public class DefaultGraphBuilder
             if ( !resumed )
             {
                 throw new MavenExecutionException( "Could not find project to 
resume reactor build from: " + selector
-                    + " vs " + projects, request.getPom() );
+                    + " vs " + formatProjects( projects ), request.getPom() );
             }
         }
 
         return result;
     }
 
+    private String formatProjects( List<MavenProject> projects )
+    {
+        StringBuilder projectNames = new StringBuilder();
+        Iterator<MavenProject> iterator = projects.iterator();
+        while ( iterator.hasNext() )
+        {
+            MavenProject project = iterator.next();
+            projectNames.append( project.getGroupId() ).append( ":" ).append( 
project.getArtifactId() );
+            if ( iterator.hasNext() )
+            {
+                projectNames.append( ", " );
+            }
+        }
+        return projectNames.toString();
+    }
+
     private boolean isMatchingProject( MavenProject project, String selector, 
File reactorDirectory )
     {
         // [groupId]:artifactId

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

Reply via email to