From a137cc67bdc28409c4b9b25eb2aed06f1e070122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Boutemy?= Date: Sat, 16 Mar 2024 16:02:49 +0100 Subject: [PATCH] [MNG-4840] document requiredMavenVersion in plugin descriptor --- .../maven/plugin/descriptor/PluginDescriptor.java | 13 +++++++++++++ maven-plugin-api/src/main/mdo/plugin.mdo | 9 +++++++++ 2 files changed, 22 insertions(+) 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 e4f5cc4935..85e289bfb5 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 @@ -77,6 +77,7 @@ public class PluginDescriptor extends ComponentSetDescriptor implements Cloneabl private String description; + // MNG-4840 private String requiredMavenVersion; private Plugin plugin; @@ -295,10 +296,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; } diff --git a/maven-plugin-api/src/main/mdo/plugin.mdo b/maven-plugin-api/src/main/mdo/plugin.mdo index 5232e6a4ae..4ccc632b3d 100644 --- a/maven-plugin-api/src/main/mdo/plugin.mdo +++ b/maven-plugin-api/src/main/mdo/plugin.mdo @@ -92,6 +92,15 @@ under the License. boolean true + + requiredMavenVersion + 1.0.0 + + Minimum Maven version required to use the plugin. + @since Maven 3.0.2 + + String + mojos 1.0.0