From 3c6009cbf48f78bc8f657c1eb18fa8f522a994a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Boutemy?= Date: Tue, 22 Mar 2022 08:12:56 +0100 Subject: [PATCH] [MNG-7438] add execution id to "configuring mojo" debug message [DEBUG] Configuring mojo execution 'org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test:default-test' with basic configurator rephrase "Configuring" to "Loading" mojo "from plugin realm" to differentiate from "configuring mojo" = apply configuration rename populatePluginFields(..) private method to populateMojoExecutionFields(..) to better match the intent --- .../plugin/internal/DefaultMavenPluginManager.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 9fdc1f624e..6d85b887d3 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 @@ -515,7 +515,7 @@ public class DefaultMavenPluginManager if ( logger.isDebugEnabled() ) { - logger.debug( "Configuring mojo " + mojoDescriptor.getId() + " from plugin realm " + pluginRealm ); + logger.debug( "Loading mojo " + mojoDescriptor.getId() + " from plugin realm " + pluginRealm ); } // We are forcing the use of the plugin realm for all lookups that might occur during @@ -609,7 +609,8 @@ public class DefaultMavenPluginManager ExpressionEvaluator expressionEvaluator = new PluginParameterExpressionEvaluator( session, mojoExecution ); - populatePluginFields( mojo, mojoDescriptor, pluginRealm, pomConfiguration, expressionEvaluator ); + populateMojoExecutionFields( mojo, mojoExecution.getExecutionId(), mojoDescriptor, pluginRealm, + pomConfiguration, expressionEvaluator ); return mojo; } @@ -620,8 +621,9 @@ public class DefaultMavenPluginManager } } - private void populatePluginFields( Object mojo, MojoDescriptor mojoDescriptor, ClassRealm pluginRealm, - PlexusConfiguration configuration, ExpressionEvaluator expressionEvaluator ) + private void populateMojoExecutionFields( Object mojo, String executionId, MojoDescriptor mojoDescriptor, + ClassRealm pluginRealm, PlexusConfiguration configuration, + ExpressionEvaluator expressionEvaluator ) throws PluginConfigurationException { ComponentConfigurator configurator = null; @@ -644,8 +646,8 @@ public class DefaultMavenPluginManager ValidatingConfigurationListener validator = new ValidatingConfigurationListener( mojo, mojoDescriptor, listener, expressionEvaluator ); - logger.debug( - "Configuring mojo '" + mojoDescriptor.getId() + "' with " + configuratorId + " configurator -->" ); + logger.debug( "Configuring mojo execution '" + mojoDescriptor.getId() + ':' + executionId + "' with " + + configuratorId + " configurator -->" ); configurator.configureComponent( mojo, configuration, expressionEvaluator, pluginRealm, validator );