From e1153e125f7f660d62269b44aeba54f9f49a3a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20=C5=BBygie=C5=82o?= Date: Fri, 17 Jan 2025 10:41:14 +0100 Subject: [PATCH 1/2] Remove unused local variable --- .../src/main/resources/help-class-source-v4.vm | 6 ------ 1 file changed, 6 deletions(-) diff --git a/maven-plugin-tools-generators/src/main/resources/help-class-source-v4.vm b/maven-plugin-tools-generators/src/main/resources/help-class-source-v4.vm index 008c52192..4ecf09e9c 100644 --- a/maven-plugin-tools-generators/src/main/resources/help-class-source-v4.vm +++ b/maven-plugin-tools-generators/src/main/resources/help-class-source-v4.vm @@ -295,12 +295,6 @@ public class HelpMojo String parameterName = getValue( parameter, "name" ); String parameterDescription = getValue( parameter, "description" ); - Element fieldConfigurationElement = null; - if ( configurationElement != null ) - { - fieldConfigurationElement = (Element) findSingleChild( configurationElement, parameterName ); - } - String parameterDefaultValue = getValueOr( parameter, "defaultValue", "" ); if ( isNotEmpty( parameterDefaultValue ) ) { From 9a54958e561c7efc69b55956817c32a0f8265a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20=C5=BBygie=C5=82o?= Date: Fri, 17 Jan 2025 10:42:25 +0100 Subject: [PATCH 2/2] Remove unused parameter --- .../src/main/resources/help-class-source-v4.vm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/maven-plugin-tools-generators/src/main/resources/help-class-source-v4.vm b/maven-plugin-tools-generators/src/main/resources/help-class-source-v4.vm index 4ecf09e9c..5cb0bb170 100644 --- a/maven-plugin-tools-generators/src/main/resources/help-class-source-v4.vm +++ b/maven-plugin-tools-generators/src/main/resources/help-class-source-v4.vm @@ -253,7 +253,6 @@ public class HelpMojo throws MojoException { String mojoGoal = getValue( mojo, "goal" ); - Node configurationElement = findSingleChild( mojo, "configuration" ); Node description = findSingleChild( mojo, "description" ); if ( goal == null || goal.length() <= 0 || mojoGoal.equals( goal ) ) { @@ -283,13 +282,13 @@ public class HelpMojo for ( Node parameter : parameters ) { - writeParameter( sb, parameter, configurationElement ); + writeParameter( sb, parameter ); } } } } - private void writeParameter( StringBuilder sb, Node parameter, Node configurationElement ) + private void writeParameter( StringBuilder sb, Node parameter ) throws MojoException { String parameterName = getValue( parameter, "name" );