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

hboutemy pushed a commit to branch MNG-4840-documentation-4
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 5370e2dab5f1231b81487805a228005fe6ef0709
Author: Hervé Boutemy <hbout...@apache.org>
AuthorDate: Sat Mar 16 16:02:49 2024 +0100

    [MNG-4840] document requiredMavenVersion in plugin descriptor
---
 api/maven-api-plugin/src/main/mdo/plugin.mdo                | 12 +++++++++---
 .../apache/maven/plugin/descriptor/PluginDescriptor.java    | 13 +++++++++++++
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/api/maven-api-plugin/src/main/mdo/plugin.mdo 
b/api/maven-api-plugin/src/main/mdo/plugin.mdo
index 30933a497f..74e94165c0 100644
--- a/api/maven-api-plugin/src/main/mdo/plugin.mdo
+++ b/api/maven-api-plugin/src/main/mdo/plugin.mdo
@@ -89,13 +89,19 @@ under the License.
         <field>
           <name>requiredJavaVersion</name>
           <version>1.1.0+</version>
-          <description>A version range which specifies the supported Java 
versions. A version range can either use the usual mathematical syntax 
"[2.0.10,2.1.0),[3.0,)" or use a single version "2.2.1". The latter is a short 
form for "[2.2.1,)", i.e. denotes the minimum version required.</description>
+          <description>
+            A version range which specifies the supported Java versions. A 
version range can either use the usual mathematical syntax 
"[2.0.10,2.1.0),[3.0,)" or use a single version "2.2.1". The latter is a short 
form for "[2.2.1,)", i.e. denotes the minimum version required.
+            @since Maven 4.0.0-alpha-3
+          </description>
           <type>String</type>
         </field>
         <field>
           <name>requiredMavenVersion</name>
-          <version>1.1.0+</version>
-          <description>A version range which specifies the supported Maven 
versions. A version range can either use the usual mathematical syntax 
"[2.0.10,2.1.0),[3.0,)" or use a single version "2.2.1". The latter is a short 
form for "[2.2.1,)", i.e. denotes the minimum version required. This value 
takes precedence over the POMs Maven prerequisite.</description>
+          <version>1.0.0+</version>
+          <description>
+            A version range which specifies the supported Maven versions. A 
version range can either use the usual mathematical syntax 
"[2.0.10,2.1.0),[3.0,)" or use a single version "2.2.1". The latter is a short 
form for "[2.2.1,)", i.e. denotes the minimum version required. This value 
takes precedence over the POMs Maven prerequisite.
+            @since Maven 3.0.2
+          </description>
           <type>String</type>
         </field>
         <field xdoc.separator="blank">
diff --git 
a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
 
b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
index b806830879..1f041cb851 100644
--- 
a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
+++ 
b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
@@ -81,6 +81,7 @@ public class PluginDescriptor extends ComponentSetDescriptor 
implements Cloneabl
 
     private String description;
 
+    // MNG-4840
     private String requiredMavenVersion;
 
     private String requiredJavaVersion;
@@ -367,10 +368,22 @@ public class PluginDescriptor extends 
ComponentSetDescriptor implements Cloneabl
         return description;
     }
 
+    /**
+     * Set required Maven version.
+     *
+     * @param requiredMavenVersion Maven version required by the plugin
+     * @since 3.0.2
+     */
     public void setRequiredMavenVersion(String requiredMavenVersion) {
         this.requiredMavenVersion = requiredMavenVersion;
     }
 
+    /**
+     * Get required Maven version.
+     *
+     * @return the Maven version required by the plugin
+     * @since 3.0.2
+     */
     public String getRequiredMavenVersion() {
         return requiredMavenVersion;
     }

Reply via email to