@@ -900,6 +900,11 @@ public void execute() throws MojoExecutionException, MojoFailureException {
900900 return ;
901901 }
902902
903+ reportDeprecatedProtocPluginsArgument (binaryMavenPlugins , "binaryMavenPlugin" , "binary-maven" );
904+ reportDeprecatedProtocPluginsArgument (binaryPathPlugins , "binaryPathPlugin" , "binary-path" );
905+ reportDeprecatedProtocPluginsArgument (binaryUrlPlugins , "binaryUrlPlugin" , "binary-url" );
906+ reportDeprecatedProtocPluginsArgument (jvmMavenPlugins , "jvmMavenPlugin" , "jvm-maven" );
907+
903908 var enabledLanguages = Language .setBuilder ()
904909 .addIf (javaEnabled , Language .JAVA )
905910 .addIf (kotlinEnabled , Language .KOTLIN )
@@ -1026,4 +1031,40 @@ private <L> List<L> nonNullList(@Nullable List<L> list) {
10261031 private <K , V > Map <K , V > nonNullMap (@ Nullable Map <K , V > map ) {
10271032 return requireNonNullElseGet (map , Map ::of );
10281033 }
1034+
1035+ private void reportDeprecatedProtocPluginsArgument (
1036+ @ Nullable Collection <?> arg ,
1037+ String singularName ,
1038+ String replacementKind
1039+ ) {
1040+ if (arg == null || arg .isEmpty ()) {
1041+ return ;
1042+ }
1043+
1044+ var before = String .join (
1045+ "\n " ,
1046+ " <" + singularName + "s>" ,
1047+ " <" + singularName + ">" ,
1048+ " ..." ,
1049+ " </" + singularName + ">" ,
1050+ " </" + singularName + "s>"
1051+ );
1052+
1053+ var after = String .join (
1054+ "\n " ,
1055+ " <protocPlugins>" ,
1056+ " <protocPlugin kind=\" " + replacementKind + "\" >" ,
1057+ " ..." ,
1058+ " </protocPlugin>" ,
1059+ " </protocPlugins>"
1060+ );
1061+
1062+ log .warn (
1063+ "[DEPRECATED] The \" {}s\" attribute is deprecated for removal in v5.0.0. Please "
1064+ + "replace\n {}\n ...with...\n {}\n moving forwards." ,
1065+ singularName ,
1066+ before ,
1067+ after
1068+ );
1069+ }
10291070}
0 commit comments