This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-doap-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 22d6909  Remove the category and language parameters deprecated since 
1.0
22d6909 is described below

commit 22d69094585ba8985f7835c66bd680e4e0988c8e
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>&lt;doapOptions&gt;&lt;category/&gt;&lt;/doapOptions&gt;</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>&lt;doapOptions&gt;&lt;programmingLanguage/&gt;&lt;/doapOptions&gt;</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) {

Reply via email to