[ 
https://issues.apache.org/jira/browse/MNG-7504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17556363#comment-17556363
 ] 

ASF GitHub Bot commented on MNG-7504:
-------------------------------------

michael-o commented on code in PR #758:
URL: https://github.com/apache/maven/pull/758#discussion_r901635390


##########
maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultMojoExecutionConfigurator.java:
##########
@@ -151,28 +151,42 @@ private void checkUnknownMojoConfigurationParameters( 
MojoExecution mojoExecutio
 
         unknownParameters = getUnknownParameters( mojoExecution, 
parametersNamesAll );
 
-        unknownParameters.forEach(
-            name ->
-            {
-                MessageBuilder messageBuilder = MessageUtils.buffer()
-                    .warning( "Parameter '" )
-                    .warning( name )
-                    .warning( "' is unknown for plugin '" )
-                    .warning( mojoExecution.getArtifactId() ).warning( ":" )
-                    .warning( mojoExecution.getVersion() ).warning( ":" )
-                    .warning( mojoExecution.getGoal() );
-
-                if ( mojoExecution.getExecutionId() != null )
+        unknownParameters.stream()
+            .filter( parameterName -> isNotReportPluginsForMavenSite( 
parameterName, mojoExecution ) )
+            .forEach(

Review Comment:
   Insane! I love lambdas!





> Warning about unknown reportPlugins parameters for m-site-p are always 
> generated
> --------------------------------------------------------------------------------
>
>                 Key: MNG-7504
>                 URL: https://issues.apache.org/jira/browse/MNG-7504
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 3.9.0, 4.0.0
>            Reporter: Slawomir Jaranowski
>            Priority: Major
>
> In {{m-site-p 3.7}} configuration parameter {{reportPlugins}} was removed 
> MSITE-792
> After MNG-7468 unknown parameter is detected and warning is generated.
> We have service {{org.apache.maven.model.plugin.DefaultReportingConverter}} 
> which always add configuration for m-site-p with unsupported parameter 
> {{reportPlugins}}.
> Configuration is added when project contains reporting sections.
> Possible solution 
> - drop service  - easy to implement but with impact on m-site-p < 3.7
> - detect m-site-p version in project - complicated
> - don't print warning about {{reportPlugins}} for {{m-site-p}} - easy but 
> workaround



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to