mirror of https://github.com/apache/maven.git
[MNG-7504] Don't print warning unsupported reportPlugins for m-site-p
This commit is contained in:
parent
f0cef23c6e
commit
b3e7e57e4b
|
@ -156,28 +156,37 @@ public class DefaultMojoExecutionConfigurator
|
||||||
|
|
||||||
unknownParameters = getUnknownParameters( mojoExecution, parametersNamesAll );
|
unknownParameters = getUnknownParameters( mojoExecution, parametersNamesAll );
|
||||||
|
|
||||||
unknownParameters.forEach(
|
unknownParameters.stream()
|
||||||
name ->
|
.filter( parameterName -> isNotReportPluginsForMavenSite( parameterName, mojoExecution ) )
|
||||||
{
|
.forEach(
|
||||||
MessageBuilder messageBuilder = MessageUtils.buffer()
|
name ->
|
||||||
.warning( "Parameter '" )
|
|
||||||
.warning( name )
|
|
||||||
.warning( "' is unknown for plugin '" )
|
|
||||||
.warning( mojoExecution.getArtifactId() ).warning( ":" )
|
|
||||||
.warning( mojoExecution.getVersion() ).warning( ":" )
|
|
||||||
.warning( mojoExecution.getGoal() );
|
|
||||||
|
|
||||||
if ( mojoExecution.getExecutionId() != null )
|
|
||||||
{
|
{
|
||||||
messageBuilder.warning( " (" );
|
MessageBuilder messageBuilder = MessageUtils.buffer()
|
||||||
messageBuilder.warning( mojoExecution.getExecutionId() );
|
.warning( "Parameter '" )
|
||||||
messageBuilder.warning( ")" );
|
.warning( name )
|
||||||
}
|
.warning( "' is unknown for plugin '" )
|
||||||
|
.warning( mojoExecution.getArtifactId() ).warning( ":" )
|
||||||
|
.warning( mojoExecution.getVersion() ).warning( ":" )
|
||||||
|
.warning( mojoExecution.getGoal() );
|
||||||
|
|
||||||
messageBuilder.warning( "'" );
|
if ( mojoExecution.getExecutionId() != null )
|
||||||
|
{
|
||||||
|
messageBuilder.warning( " (" );
|
||||||
|
messageBuilder.warning( mojoExecution.getExecutionId() );
|
||||||
|
messageBuilder.warning( ")" );
|
||||||
|
}
|
||||||
|
|
||||||
logger.warn( messageBuilder.toString() );
|
messageBuilder.warning( "'" );
|
||||||
} );
|
|
||||||
|
logger.warn( messageBuilder.toString() );
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isNotReportPluginsForMavenSite( String parameterName,
|
||||||
|
MojoExecution mojoExecution )
|
||||||
|
{
|
||||||
|
return !( "reportPlugins".equals( parameterName )
|
||||||
|
&& "maven-site-plugin".equals( mojoExecution.getArtifactId() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
private Stream<String> getParameterNames( Parameter parameter )
|
private Stream<String> getParameterNames( Parameter parameter )
|
||||||
|
|
Loading…
Reference in New Issue