This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch agent/remove-deprecated-parameters in repository https://gitbox.apache.org/repos/asf/maven-doap-plugin.git
commit 3b6b715ffda5b62a816dd483473a4232d3d98769 Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Sat Nov 14 10:52:10 2026 +0100 Remove the category and language parameters deprecated since 1.0 --- .../org/apache/maven/plugin/doap/DoapMojo.java | 81 +--------------------- 1 file changed, 2 insertions(+), 79 deletions(-) diff --git a/src/main/java/org/apache/maven/plugin/doap/DoapMojo.java b/src/main/java/org/apache/maven/plugin/doap/DoapMojo.java index 011df7c..6f5a138 100644 --- a/src/main/java/org/apache/maven/plugin/doap/DoapMojo.java +++ b/src/main/java/org/apache/maven/plugin/doap/DoapMojo.java @@ -249,24 +249,6 @@ public class DoapMojo extends AbstractMojo { // Doap options // ---------------------------------------------------------------------- - /** - * The category which should be displayed in the DOAP file. - * - * @deprecated Since 1.0. Instead of, configure - * <code><doapOptions><category/></doapOptions></code> parameter. - */ - @Parameter(property = "category") - private String category; - - /** - * The programming language which should be displayed in the DOAP file. - * - * @deprecated Since 1.0. Instead of, configure - * <code><doapOptions><programmingLanguage/></doapOptions></code> parameter. - */ - @Parameter(property = "language") - private String language; - /** * Specific DOAP parameters, i.e. options that POM doesn't have any notions. <br/> * Example: @@ -944,7 +926,7 @@ public class DoapMojo extends AbstractMojo { * http://usefulinc.com/ns/doap#programming-language</a> */ private void writeProgrammingLanguage(XMLWriter writer, MavenProject project) { - if (StringUtils.isEmpty(doapOptions.getProgrammingLanguage()) && (language == null || language.isEmpty())) { + if (StringUtils.isEmpty(doapOptions.getProgrammingLanguage())) { messages.addMessage( new String[] {"doapOptions", "programmingLanguage"}, null, @@ -954,34 +936,6 @@ public class DoapMojo extends AbstractMojo { boolean addComment = false; String comment = "Programming language."; - if (language != null && !language.isEmpty()) // backward compatible - { - getLog().warn("The <language/> parameter is deprecated, please use " - + messages.toConfiguration(new String[] {"doapOptions", "programmingLanguage"}, null) - + " parameter instead of."); - - language = language.trim(); - - if (asfExtOptions.isIncluded()) { - String asfLanguage = ASFExtOptionsUtil.getProgrammingLanguageSupportedByASF(language); - if (asfLanguage == null) { - messages.getErrorMessages() - .add("The deprecated " + messages.toConfiguration(new String[] {"language"}, language) - + " parameter is not supported by ASF. Should be one of " - + Arrays.toString(ASFExtOptionsUtil.PROGRAMMING_LANGUAGES)); - } else { - DoapUtil.writeComment(writer, comment); - addComment = true; - DoapUtil.writeElement( - writer, doapOptions.getXmlnsPrefix(), "programming-language", asfLanguage.trim()); - } - } else { - DoapUtil.writeComment(writer, comment); - addComment = true; - DoapUtil.writeElement(writer, doapOptions.getXmlnsPrefix(), "programming-language", language.trim()); - } - } - if (StringUtils.isNotEmpty(doapOptions.getProgrammingLanguage())) { String[] languages = StringUtils.split(doapOptions.getProgrammingLanguage(), ","); for (String language : languages) { @@ -1024,7 +978,7 @@ public class DoapMojo extends AbstractMojo { * @see <a href="http://usefulinc.com/ns/doap#category">http://usefulinc.com/ns/doap#category</a> */ private void writeCategory(XMLWriter writer, MavenProject project) { - if (StringUtils.isEmpty(doapOptions.getCategory()) && (category == null || category.isEmpty())) { + if (StringUtils.isEmpty(doapOptions.getCategory())) { messages.addMessage( new String[] {"doapOptions", "category"}, null, UserMessages.REQUIRED_BY_ASF_OR_RECOMMENDED); return; @@ -1033,37 +987,6 @@ public class DoapMojo extends AbstractMojo { // TODO: how to lookup category, map it, or just declare it. boolean addComment = false; String comment = "A category of project."; - if (category != null && !category.isEmpty()) // backward compatible - { - getLog().warn("The <category/> parameter is deprecated, please use " - + messages.toConfiguration(new String[] {"doapOptions", "category"}, null) - + " parameter instead of."); - - category = category.trim(); - - if (asfExtOptions.isIncluded()) { - String asfCategory = ASFExtOptionsUtil.getCategorySupportedByASF(category); - if (asfCategory == null) { - messages.getErrorMessages() - .add("The deprecated " + messages.toConfiguration(new String[] {"category"}, category) - + " parameter is not supported by ASF. Should be one of " - + Arrays.toString(ASFExtOptionsUtil.CATEGORIES)); - } else { - DoapUtil.writeComment(writer, comment); - addComment = true; - DoapUtil.writeRdfResourceElement( - writer, - doapOptions.getXmlnsPrefix(), - "category", - ASFExtOptionsUtil.CATEGORY_RESOURCE + asfCategory); - } - } else { - DoapUtil.writeComment(writer, comment); - addComment = true; - DoapUtil.writeElement(writer, doapOptions.getXmlnsPrefix(), "category", category); - } - } - if (StringUtils.isNotEmpty(doapOptions.getCategory())) { String[] categories = StringUtils.split(doapOptions.getCategory(), ","); for (String category : categories) {
