You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2018/05/17 21:35:18 UTC

[maven] branch MNG-6411 created (now 8c213a9)

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

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


      at 8c213a9  MNG-6411 Improve readability of project list for resume option.

This branch includes the following new commits:

     new 8c213a9  MNG-6411 Improve readability of project list for resume option.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


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

[maven] 01/01: MNG-6411 Improve readability of project list for resume option.

Posted by hb...@apache.org.
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 <lu...@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
hboutemy@apache.org.