michael-o commented on code in PR #705: URL: https://github.com/apache/maven/pull/705#discussion_r848261045
########## maven-core/src/main/java/org/apache/maven/plugin/internal/ValidatingConfigurationListener.java: ########## @@ -92,6 +109,102 @@ private void notify( String fieldName, Object value ) { missingParameters.remove( fieldName ); } + + if ( LOGGER.isWarnEnabled() ) + { + warnDeprecated( fieldName, value ); + } + } + + private void warnDeprecated( String fieldName, Object value ) + { + Parameter parameter = mojoDescriptor.getParameterMap().get( fieldName ); + String deprecated = parameter.getDeprecated(); + if ( deprecated != null ) + { + Object defaultValue = evaluateValue( parameter.getDefaultValue() ); + if ( !Objects.equals( toString( value ), defaultValue ) ) + { + StringBuilder sb = new StringBuilder(); + sb.append( " Parameter '" ); + sb.append( fieldName ); + sb.append( '\'' ); + if ( parameter.getExpression() != null ) + { + String userProperty = parameter.getExpression().replace( "${", "'" ).replace( '}', '\'' ); + sb.append( " (user property " ); + sb.append( userProperty ); + sb.append( ")" ); + } + sb.append( " is deprecated. " ); Review Comment: This should be a colon, not a period. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org