From 69b3b9bdacf30018b17fa9289d1e8d49c8f77037 Mon Sep 17 00:00:00 2001 From: Vincent Siveton Date: Tue, 19 Feb 2008 11:56:58 +0000 Subject: [PATCH] o using PluginUtils.element() git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@629080 13f79535-47bb-0310-9956-ffa450edef68 --- .../generator/PluginDescriptorGenerator.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java index 1421e79..3ec1e67 100644 --- a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java +++ b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java @@ -43,10 +43,13 @@ import java.util.Set; * @todo add example usage tag that can be shown in the doco * @todo need to add validation directives so that systems embedding maven2 can * get validation directives to help users in IDEs. + * + * @version $Id$ */ public class PluginDescriptorGenerator implements Generator { + /** {@inheritDoc} */ public void execute( File destinationDirectory, PluginDescriptor pluginDescriptor ) throws IOException { @@ -436,17 +439,8 @@ public class PluginDescriptorGenerator w.endElement(); } - public void element( XMLWriter w, String name, String value ) + private void element( XMLWriter w, String name, String value ) { - w.startElement( name ); - - if ( value == null ) - { - value = ""; - } - - w.writeText( value ); - - w.endElement(); + PluginUtils.element( w, name, value ); } }