From 0e655618cab0847ab2bc182d7282278234a2301f Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Mon, 1 Jul 2024 22:25:18 +0200 Subject: [PATCH] Cleanups legacy tags option from code and documentations Fix #98 --- .../codehaus/mojo/taglist/TagListReport.java | 10 ---- src/site/apt/usage.apt.vm | 20 ------- .../unit/basic-config-test/colons-pom.xml | 15 ++++-- .../basic-config-test/create-output-pom.xml | 15 ++++-- .../basic-config-test/empty-colons-pom.xml | 24 +++++++-- .../empty-comments-disabled-pom.xml | 17 ++++-- .../empty-comments-enabled-pom.xml | 15 ++++-- .../multiple-line-comments-disabled-pom.xml | 15 ++++-- .../multiple-line-comments-enabled-pom.xml | 15 ++++-- .../show-empty-details-disabled-pom.xml | 24 +++++++-- .../show-empty-details-enabled-pom.xml | 24 +++++++-- .../unit/basic-config-test/xml-output-pom.xml | 15 ++++-- .../counting-tags-test/counting-tags-pom.xml | 53 ++++++++++++++++--- .../unit/tag-test/c-style-tags-pom.xml | 15 ++++-- .../tag-test/cplusplus-style-tags-pom.xml | 15 ++++-- .../tag-test/javadoc-multi-style-tags-pom.xml | 15 ++++-- .../javadoc-single-style-tags-pom.xml | 15 ++++-- .../unit/tag-test/not-start-line-tags-pom.xml | 15 ++++-- .../source-code-variable-tags-pom.xml | 15 ++++-- 19 files changed, 262 insertions(+), 90 deletions(-) diff --git a/src/main/java/org/codehaus/mojo/taglist/TagListReport.java b/src/main/java/org/codehaus/mojo/taglist/TagListReport.java index a38b4d3..211c8d0 100644 --- a/src/main/java/org/codehaus/mojo/taglist/TagListReport.java +++ b/src/main/java/org/codehaus/mojo/taglist/TagListReport.java @@ -190,8 +190,6 @@ public class TagListReport extends AbstractMavenReport { @Parameter private org.codehaus.mojo.taglist.options.TagListOptions tagListOptions; - private String[] tags; - /** * Skip generating report if no tags found in sources. * @@ -262,14 +260,6 @@ private void executeAnalysis() { // Create the tag classes List tagClasses = new ArrayList<>(); - // If any old style tags were used, then add each tag as a tag class - if (tags != null && tags.length > 0) { - getLog().warn("Using legacy tag format. This is not recommended."); - for (String tag : tags) { - tagClasses.add(createTagClass(tag)); - } - } - // If the new style of tag options were used, add them if (tagListOptions != null && !tagListOptions.getTagClasses().isEmpty()) { // Scan each tag class diff --git a/src/site/apt/usage.apt.vm b/src/site/apt/usage.apt.vm index d84a85e..5d8f6d6 100644 --- a/src/site/apt/usage.apt.vm +++ b/src/site/apt/usage.apt.vm @@ -88,24 +88,4 @@ mvn site ... -+---+ - - For backwards compatibility with versions prior to the 2.4 release, the legacy tags configuration is supported; - however, only exact matching - is used with legacy configuration. - -+---+ - - - ... - - - TODO - FIXME - @todo - @deprecated - - - ... - +---+ diff --git a/src/test/resources/unit/basic-config-test/colons-pom.xml b/src/test/resources/unit/basic-config-test/colons-pom.xml index 23830e5..766d02f 100644 --- a/src/test/resources/unit/basic-config-test/colons-pom.xml +++ b/src/test/resources/unit/basic-config-test/colons-pom.xml @@ -35,9 +35,18 @@ ${basedir}/target/test-classes/unit/basic-config-test/outputDirectory - - @colons - + + + + @colons + + + @colons + + + + + diff --git a/src/test/resources/unit/basic-config-test/create-output-pom.xml b/src/test/resources/unit/basic-config-test/create-output-pom.xml index f2a95dc..322ae33 100644 --- a/src/test/resources/unit/basic-config-test/create-output-pom.xml +++ b/src/test/resources/unit/basic-config-test/create-output-pom.xml @@ -35,9 +35,18 @@ ${basedir}/target/test-classes/unit/basic-config-test/outputDirectory - - @create_output - + + + + @create_output + + + @create_output + + + + + diff --git a/src/test/resources/unit/basic-config-test/empty-colons-pom.xml b/src/test/resources/unit/basic-config-test/empty-colons-pom.xml index ded0c1e..7361be0 100644 --- a/src/test/resources/unit/basic-config-test/empty-colons-pom.xml +++ b/src/test/resources/unit/basic-config-test/empty-colons-pom.xml @@ -36,10 +36,26 @@ ${basedir}/target/test-classes/unit/basic-config-test/outputDirectory true - - @empty_no_colons - @empty_colons - + + + + @empty_no_colons + + + @empty_no_colons + + + + + @empty_colons + + + @empty_colons + + + + + diff --git a/src/test/resources/unit/basic-config-test/empty-comments-disabled-pom.xml b/src/test/resources/unit/basic-config-test/empty-comments-disabled-pom.xml index 493c240..537d2ac 100644 --- a/src/test/resources/unit/basic-config-test/empty-comments-disabled-pom.xml +++ b/src/test/resources/unit/basic-config-test/empty-comments-disabled-pom.xml @@ -33,13 +33,22 @@ taglist-maven-plugin - + ${basedir}/target/test-classes/unit/basic-config-test/outputDirectory-empty-comments-disabled true false - - @empty_comment - + + + + @empty_comment + + + @empty_comment + + + + + diff --git a/src/test/resources/unit/basic-config-test/empty-comments-enabled-pom.xml b/src/test/resources/unit/basic-config-test/empty-comments-enabled-pom.xml index 7ae7908..8b3d051 100644 --- a/src/test/resources/unit/basic-config-test/empty-comments-enabled-pom.xml +++ b/src/test/resources/unit/basic-config-test/empty-comments-enabled-pom.xml @@ -36,9 +36,18 @@ ${basedir}/target/test-classes/unit/basic-config-test/outputDirectory true - - @empty_comment - + + + + @empty_comment + + + @empty_comment + + + + + diff --git a/src/test/resources/unit/basic-config-test/multiple-line-comments-disabled-pom.xml b/src/test/resources/unit/basic-config-test/multiple-line-comments-disabled-pom.xml index 6d4211c..9aa4451 100644 --- a/src/test/resources/unit/basic-config-test/multiple-line-comments-disabled-pom.xml +++ b/src/test/resources/unit/basic-config-test/multiple-line-comments-disabled-pom.xml @@ -36,9 +36,18 @@ ${basedir}/target/test-classes/unit/basic-config-test/outputDirectory false - - @multiple_line_comment - + + + + @multiple_line_comment + + + @multiple_line_comment + + + + + diff --git a/src/test/resources/unit/basic-config-test/multiple-line-comments-enabled-pom.xml b/src/test/resources/unit/basic-config-test/multiple-line-comments-enabled-pom.xml index c3f7de3..3f59957 100644 --- a/src/test/resources/unit/basic-config-test/multiple-line-comments-enabled-pom.xml +++ b/src/test/resources/unit/basic-config-test/multiple-line-comments-enabled-pom.xml @@ -36,9 +36,18 @@ ${basedir}/target/test-classes/unit/basic-config-test/outputDirectory true - - @multiple_line_comment - + + + + @multiple_line_comment + + + @multiple_line_comment + + + + + diff --git a/src/test/resources/unit/basic-config-test/show-empty-details-disabled-pom.xml b/src/test/resources/unit/basic-config-test/show-empty-details-disabled-pom.xml index 23dde6a..642355d 100644 --- a/src/test/resources/unit/basic-config-test/show-empty-details-disabled-pom.xml +++ b/src/test/resources/unit/basic-config-test/show-empty-details-disabled-pom.xml @@ -36,10 +36,26 @@ ${basedir}/target/test-classes/unit/basic-config-test/outputDirectory false - - @show_empty_details_tag_in_code - @show_empty_details_tag_not_in_code - + + + + @show_empty_details_tag_in_code + + + @show_empty_details_tag_in_code + + + + + @show_empty_details_tag_not_in_code + + + @show_empty_details_tag_not_in_code + + + + + diff --git a/src/test/resources/unit/basic-config-test/show-empty-details-enabled-pom.xml b/src/test/resources/unit/basic-config-test/show-empty-details-enabled-pom.xml index 1b6575e..a2b46d5 100644 --- a/src/test/resources/unit/basic-config-test/show-empty-details-enabled-pom.xml +++ b/src/test/resources/unit/basic-config-test/show-empty-details-enabled-pom.xml @@ -36,10 +36,26 @@ ${basedir}/target/test-classes/unit/basic-config-test/outputDirectory true - - @show_empty_details_tag_in_code - @show_empty_details_tag_not_in_code - + + + + @show_empty_details_tag_in_code + + + @show_empty_details_tag_in_code + + + + + @show_empty_details_tag_not_in_code + + + @show_empty_details_tag_not_in_code + + + + + diff --git a/src/test/resources/unit/basic-config-test/xml-output-pom.xml b/src/test/resources/unit/basic-config-test/xml-output-pom.xml index 82cd1ff..3a2ad8b 100644 --- a/src/test/resources/unit/basic-config-test/xml-output-pom.xml +++ b/src/test/resources/unit/basic-config-test/xml-output-pom.xml @@ -36,9 +36,18 @@ ${basedir}/target/test-classes/unit/basic-config-test/outputDirectory false - - @create_output - + + + + @create_output + + + @create_output + + + + + diff --git a/src/test/resources/unit/counting-tags-test/counting-tags-pom.xml b/src/test/resources/unit/counting-tags-test/counting-tags-pom.xml index 76520b8..5861b24 100644 --- a/src/test/resources/unit/counting-tags-test/counting-tags-pom.xml +++ b/src/test/resources/unit/counting-tags-test/counting-tags-pom.xml @@ -33,15 +33,52 @@ taglist-maven-plugin - + ${basedir}/target/test-classes/unit/counting-tags-test/outputDirectory - - TODO - <todo - FIXME - DOCUMENT_ME - NOT_YET_DOCUMENTED - + + + + TODO + + + TODO + + + + > + <todo + + + <todo + + + + + FIXME + + + FIXME + + + + + DOCUMENT_ME + + + DOCUMENT_ME + + + + + NOT_YET_DOCUMENTED + + + NOT_YET_DOCUMENTED + + + + + diff --git a/src/test/resources/unit/tag-test/c-style-tags-pom.xml b/src/test/resources/unit/tag-test/c-style-tags-pom.xml index 7d75e48..9c9a52c 100644 --- a/src/test/resources/unit/tag-test/c-style-tags-pom.xml +++ b/src/test/resources/unit/tag-test/c-style-tags-pom.xml @@ -35,9 +35,18 @@ ${basedir}/target/test-classes/unit/tag-test/outputDirectory - - c_style_tag - + + + + c_style_tag + + + c_style_tag + + + + + diff --git a/src/test/resources/unit/tag-test/cplusplus-style-tags-pom.xml b/src/test/resources/unit/tag-test/cplusplus-style-tags-pom.xml index 38e4c2f..e5451e6 100644 --- a/src/test/resources/unit/tag-test/cplusplus-style-tags-pom.xml +++ b/src/test/resources/unit/tag-test/cplusplus-style-tags-pom.xml @@ -35,9 +35,18 @@ ${basedir}/target/test-classes/unit/tag-test/outputDirectory - - c++_style_tag - + + + + c++_style_tag + + + c++_style_tag + + + + + diff --git a/src/test/resources/unit/tag-test/javadoc-multi-style-tags-pom.xml b/src/test/resources/unit/tag-test/javadoc-multi-style-tags-pom.xml index 84520cf..dd7ff14 100644 --- a/src/test/resources/unit/tag-test/javadoc-multi-style-tags-pom.xml +++ b/src/test/resources/unit/tag-test/javadoc-multi-style-tags-pom.xml @@ -35,9 +35,18 @@ ${basedir}/target/test-classes/unit/tag-test/outputDirectory - - javadoc_multi_style_tag - + + + + javadoc_multi_style_tag + + + javadoc_multi_style_tag + + + + + diff --git a/src/test/resources/unit/tag-test/javadoc-single-style-tags-pom.xml b/src/test/resources/unit/tag-test/javadoc-single-style-tags-pom.xml index a5377da..d78484f 100644 --- a/src/test/resources/unit/tag-test/javadoc-single-style-tags-pom.xml +++ b/src/test/resources/unit/tag-test/javadoc-single-style-tags-pom.xml @@ -35,9 +35,18 @@ ${basedir}/target/test-classes/unit/tag-test/outputDirectory - - javadoc_single_style_tag - + + + + javadoc_single_style_tag + + + javadoc_single_style_tag + + + + + diff --git a/src/test/resources/unit/tag-test/not-start-line-tags-pom.xml b/src/test/resources/unit/tag-test/not-start-line-tags-pom.xml index 0d27563..6fd649d 100644 --- a/src/test/resources/unit/tag-test/not-start-line-tags-pom.xml +++ b/src/test/resources/unit/tag-test/not-start-line-tags-pom.xml @@ -36,9 +36,18 @@ ${basedir}/target/test-classes/unit/tag-test/outputDirectory-not-start-line-tags true - - not_start_of_line_tag - + + + + not_start_of_line_tag + + + not_start_of_line_tag + + + + + diff --git a/src/test/resources/unit/tag-test/source-code-variable-tags-pom.xml b/src/test/resources/unit/tag-test/source-code-variable-tags-pom.xml index f72f390..5687756 100644 --- a/src/test/resources/unit/tag-test/source-code-variable-tags-pom.xml +++ b/src/test/resources/unit/tag-test/source-code-variable-tags-pom.xml @@ -36,9 +36,18 @@ ${basedir}/target/test-classes/unit/tag-test/outputDirectory-source-code-variable-tags true - - source_code_variable_tag - + + + + source_code_variable_tag + + + source_code_variable_tag + + + + +