From 8f0a5ee56a5087334b0ff25d1929409d512f533b Mon Sep 17 00:00:00 2001 From: Herve Boutemy Date: Sun, 27 Apr 2014 13:38:36 +0000 Subject: [PATCH] [MPLUGIN-262] fixed mojo deprecation too git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1590392 13f79535-47bb-0310-9956-ffa450edef68 --- maven-plugin-plugin/src/it/help-basic/expected-help.txt | 2 ++ .../src/main/resources/help-class-source.vm | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/maven-plugin-plugin/src/it/help-basic/expected-help.txt b/maven-plugin-plugin/src/it/help-basic/expected-help.txt index 09240af..5dc8bb8 100644 --- a/maven-plugin-plugin/src/it/help-basic/expected-help.txt +++ b/maven-plugin-plugin/src/it/help-basic/expected-help.txt @@ -2,6 +2,8 @@ Tests generation and compilation of the help mojo. help:test + Deprecated. As of 1.0, use the "quoted" goal instead. + MOJO-DESCRIPTION. Some 'quotation' marks and backslashes '\\', some important javadoc and an inline link to AnotherMojo. diff --git a/maven-plugin-tools-generators/src/main/resources/help-class-source.vm b/maven-plugin-tools-generators/src/main/resources/help-class-source.vm index 2a2765e..8555e71 100644 --- a/maven-plugin-tools-generators/src/main/resources/help-class-source.vm +++ b/maven-plugin-tools-generators/src/main/resources/help-class-source.vm @@ -282,16 +282,16 @@ public class HelpMojo { append( sb, goalPrefix + ":" + mojoGoal, 0 ); Node deprecated = findSingleChild( mojo, "deprecated" ); - if ( ( deprecated != null ) && isNotEmpty( deprecated.getNodeValue() ) ) + if ( ( deprecated != null ) && isNotEmpty( deprecated.getTextContent() ) ) { - append( sb, "Deprecated. " + deprecated, 1 ); + append( sb, "Deprecated. " + deprecated.getTextContent(), 1 ); if ( detail && description != null ) { append( sb, "", 0 ); append( sb, description.getTextContent(), 1 ); } } - else if (description != null ) + else if ( description != null ) { append( sb, description.getTextContent(), 1 ); }