maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject maven-surefire git commit: [SUREFIRE-1262] Improve logging of classpath/modulepath
Date Fri, 08 Sep 2017 13:50:49 GMT
Repository: maven-surefire
Updated Branches:
  refs/heads/SUREFIRE-1262 569a9b7a8 -> ea92f9e40


[SUREFIRE-1262] Improve logging of classpath/modulepath


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

Branch: refs/heads/SUREFIRE-1262
Commit: ea92f9e40d203eebf5674b8446541daae37cc8bf
Parents: 569a9b7
Author: rfscholte <rfscholte@apache.org>
Authored: Fri Sep 8 15:50:42 2017 +0200
Committer: rfscholte <rfscholte@apache.org>
Committed: Fri Sep 8 15:50:42 2017 +0200

----------------------------------------------------------------------
 .../maven/plugin/surefire/AbstractSurefireMojo.java   |  8 ++++----
 .../plugin/surefire/SurefireDependencyResolver.java   |  2 +-
 .../org/apache/maven/surefire/booter/Classpath.java   | 14 ++++++++++++--
 3 files changed, 17 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/ea92f9e4/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index be7dc62..8509d18 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -1698,12 +1698,12 @@ public abstract class AbstractSurefireMojo
                                                 moduleDescriptor, packages, getTestClassesDirectory(),
                                                 effectiveIsEnableAssertions(), isChildDelegation()
);
 
-                getConsoleLogger().debug( testClasspath.getLogMessage( "test-classpath" )
);
-                getConsoleLogger().debug( testModulepath.getLogMessage( "test-modulepath"
) );
+                getConsoleLogger().debug( testClasspath.getLogMessage( "test", "classpath"
) );
+                getConsoleLogger().debug( testModulepath.getLogMessage( "test", "modulepath"
) );
                 getConsoleLogger().debug( providerClasspath.getLogMessage( "provider" ) );
 
-                getConsoleLogger().debug( testClasspath.getCompactLogMessage( "test-classpath(compact)"
) );
-                getConsoleLogger().debug( testModulepath.getCompactLogMessage( "test-modulepath(compact)"
) );
+                getConsoleLogger().debug( testClasspath.getCompactLogMessage( "test(compact)",
"classpath" ) );
+                getConsoleLogger().debug( testModulepath.getCompactLogMessage( "test(compact)",
"modulepath" ) );
                 getConsoleLogger().debug( providerClasspath.getCompactLogMessage( "provider(compact)"
) );
             }
             else

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/ea92f9e4/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireDependencyResolver.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireDependencyResolver.java
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireDependencyResolver.java
index 12a1239..6dce8df 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireDependencyResolver.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireDependencyResolver.java
@@ -146,7 +146,7 @@ public class SurefireDependencyResolver
                 Artifact artifact = (Artifact) o;
 
                 log.debug(
-                    "Adding to " + pluginName + " test classpath: " + artifact.getFile().getAbsolutePath()
+ " Scope: "
+                    "Adding to " + pluginName + " test path: " + artifact.getFile().getAbsolutePath()
+ " Scope: "
                         + artifact.getScope() );
 
                 files.add( artifact.getFile().getAbsolutePath() );

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/ea92f9e4/surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java
----------------------------------------------------------------------
diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java
b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java
index 609be0f..ecc0ab0 100644
--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java
+++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java
@@ -191,8 +191,13 @@ public class Classpath implements Iterable<String>
 
     public String getLogMessage( String descriptor )
     {
+        return getLogMessage( descriptor, "classpath" );
+    }
+
+    public String getLogMessage( String descriptor, String pathType )
+    {
         StringBuilder result = new StringBuilder();
-        result.append( descriptor ).append( " classpath:" );
+        result.append( descriptor ).append( ' ' ).append( pathType ).append( ':' );
         for ( String element : unmodifiableElements )
         {
             result.append( "  " ).append( element );
@@ -202,8 +207,13 @@ public class Classpath implements Iterable<String>
 
     public String getCompactLogMessage( String descriptor )
     {
+        return getCompactLogMessage( descriptor, "classpath" );
+    }
+
+    public String getCompactLogMessage( String descriptor, String pathType )
+    {
         StringBuilder result = new StringBuilder();
-        result.append( descriptor ).append( " classpath:" );
+        result.append( descriptor ).append( ' ' ).append( pathType ).append( ':' );
         for ( String element : unmodifiableElements )
         {
             result.append( "  " );


Mime
View raw message