maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject [41/49] maven git commit: [MNG-6308] added packaging in Building message footer and summary
Date Thu, 08 Feb 2018 22:53:50 GMT
[MNG-6308] added packaging in Building message footer and summary

Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/58cf490c
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/58cf490c
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/58cf490c

Branch: refs/heads/MNG-6255
Commit: 58cf490c696cebfb0cc3dce31fed68658b16626f
Parents: c2e3b3e
Author: Hervé Boutemy <hboutemy@apache.org>
Authored: Sat Jan 6 22:14:00 2018 +0100
Committer: Hervé Boutemy <hboutemy@apache.org>
Committed: Sat Jan 6 22:40:30 2018 +0100

----------------------------------------------------------------------
 .../org/apache/maven/cli/event/ExecutionEventLogger.java    | 9 +++++++--
 .../apache/maven/cli/event/ExecutionEventLoggerTest.java    | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/58cf490c/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
index 3da9ad3..85760e6 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
@@ -114,7 +114,9 @@ public class ExecutionEventLogger
             final List<MavenProject> projects = event.getSession().getProjects();
             for ( MavenProject project : projects )
             {
-                logger.info( project.getName() );
+                int len = LINE_LENGTH - project.getName().length() - project.getPackaging().length()
- 2;
+                logger.info( project.getName() + chars( ' ', ( len > 0 ) ? len : 1 ) +
'[' + project.getPackaging()
+                    + ']' );
             }
 
             totalProjects = projects.size();
@@ -302,7 +304,10 @@ public class ExecutionEventLogger
                 infoMain( building + ( ( pad > 0 ) ? chars( ' ', pad ) : "" ) + progress
);
             }
 
-            infoLine( '-' );
+            // ----------[ packaging ]----------
+            prefix = chars( '-', Math.max( 0, ( LINE_LENGTH - project.getPackaging().length()
- 4 ) / 2 ) );
+            suffix = chars( '-', Math.max( 0, LINE_LENGTH - project.getPackaging().length()
- 4 - prefix.length() ) );
+            infoMain( prefix + "[ " + project.getPackaging() + " ]" + suffix );
         }
     }
 

http://git-wip-us.apache.org/repos/asf/maven/blob/58cf490c/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
b/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
index 4c0539d..ca4c8a4 100644
--- a/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
+++ b/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java
@@ -73,7 +73,7 @@ public class ExecutionEventLoggerTest
         inOrder.verify( logger ).info( "" );
         inOrder.verify( logger ).info( "------------------< org.apache.maven:maven-embedder
>-------------------" );
         inOrder.verify( logger ).info( "Building Apache Maven Embedder 3.5.4-SNAPSHOT" );
-        inOrder.verify( logger ).info( "------------------------------------------------------------------------"
);
+        inOrder.verify( logger ).info( "--------------------------------[ jar ]---------------------------------"
);
     }
 
     @Test
@@ -101,6 +101,6 @@ public class ExecutionEventLoggerTest
         inOrder.verify( logger ).info( "" );
         inOrder.verify( logger ).info( "--< org.apache.maven.plugins.overflow:maven-project-info-reports-plugin
>--" );
         inOrder.verify( logger ).info( "Building Apache Maven Project Info Reports Plugin
3.0.0-SNAPSHOT" );
-        inOrder.verify( logger ).info( "------------------------------------------------------------------------"
);
+        inOrder.verify( logger ).info( "----------------------------[ maven-plugin ]----------------------------"
);
     }
 }


Mime
View raw message