maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject [2/2] git commit: [MNG-5395] don't inject DefaultMavenPluginManager's logger into Mojos but create a dedicated logger with Mojo implementation name
Date Sat, 01 Dec 2012 03:30:25 GMT
[MNG-5395] don't inject DefaultMavenPluginManager's logger into Mojos
but create a dedicated logger with Mojo implementation name

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

Branch: refs/heads/master
Commit: fee1640d65561d26b02acdcbf1dff0d108b4f2ff
Parents: 4c8b300
Author: Hervé Boutemy <hboutemy@apache.org>
Authored: Sat Dec 1 04:27:23 2012 +0100
Committer: Hervé Boutemy <hboutemy@apache.org>
Committed: Sat Dec 1 04:27:23 2012 +0100

----------------------------------------------------------------------
 .../plugin/internal/DefaultMavenPluginManager.java |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/fee1640d/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
index 603e670..4429f44 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
@@ -83,6 +83,7 @@ import org.codehaus.plexus.configuration.PlexusConfiguration;
 import org.codehaus.plexus.configuration.PlexusConfigurationException;
 import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
 import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.logging.LoggerManager;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.StringUtils;
@@ -111,6 +112,9 @@ public class DefaultMavenPluginManager
     private Logger logger;
 
     @Requirement
+    private LoggerManager loggerManager;
+
+    @Requirement
     private PlexusContainer container;
 
     @Requirement
@@ -508,7 +512,8 @@ public class DefaultMavenPluginManager
 
             if ( mojo instanceof Mojo )
             {
-                ( (Mojo) mojo ).setLog( new DefaultLog( logger ) );
+                Logger mojoLogger = loggerManager.getLoggerForComponent( mojoDescriptor.getImplementation()
);
+                ( (Mojo) mojo ).setLog( new DefaultLog( mojoLogger ) );
             }
 
             Xpp3Dom dom = mojoExecution.getConfiguration();


Mime
View raw message