kwin commented on code in PR #171:
URL:
https://github.com/apache/maven-plugin-tools/pull/171#discussion_r1017532143
##########
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java:
##########
@@ -235,6 +239,44 @@
@Parameter( defaultValue = "${localRepository}", required = true, readonly
= true )
private ArtifactRepository local;
+ /**
+ * The required Java version to set in the plugin descriptor. This is
evaluated by Maven 4 and ignored by earlier
+ * Maven versions. Can be either one of the following formats:
+ *
+ * <ul>
+ * <li>One of the values as for <a
href="https://maven.apache.org/pom.html#Activation">POM profile activation
+ * element {@code jdk}</a>, i.e. version ranges, version prefixes
+ * and negated version prefixes (starting with '!').</li>
+ * <li>{@code "auto"} to determine the minimum Java version from the
binary class version being generated during
+ * compilation (determined by the extractor).</li>
+ * <li>{@code "none"} to not set a required Java version.</li>
+ * </ul>
+ *
+ * @since 3.8.0
+ */
+ @Parameter( defaultValue = VALUE_AUTO )
+ String requiredJavaVersion;
+
+ /**
+ * The required Maven version to set in the plugin descriptor. This is
evaluated by Maven 4 and ignored by earlier
+ * Maven versions. Can be either one of the following formats:
+ *
+ * <ul>
+ * <li>A version range which specifies the supported Maven versions. It
can either use the usual mathematical
+ * syntax like {@code "[2.0.10,2.1.0),[3.0,)"} or use a single version
like {@code "2.2.1"}. The latter is a short
+ * form for {@code "[2.2.1,)"}, i.e. denotes the minimum version
required.</li>
+ * <li>{@code "auto"} to determine the minimum Maven version from the POMs
Maven prerequisite, or if not set the
+ * referenced Maven Plugin API version.</li>
+ * <li>{@code "none"} to not set a required Maven version.</li>
Review Comment:
IMHO MPLUGIN-418 is about the prerequisites in the pom.xml (relevant for
Maven 3), while this PR is only about plugin descriptor (only relevant for
Maven 4). Therefore even removing the "none" value here does not require a
Maven prerequisite in the pom.xml. Still removing the none is probably a good
idea, fixed in
https://github.com/apache/maven-plugin-tools/pull/171/commits/4c8e2499919b75c2e1cd5a12e474dc65070f7d4f
##########
maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java:
##########
@@ -102,6 +106,36 @@
private static final GroupKey GROUP_KEY = new GroupKey(
GroupKey.JAVA_GROUP, 100 );
+ /**
+ *
+ * @see <a
href="https://docs.oracle.com/javase/specs/jvms/se19/html/jvms-4.html#jvms-4.1">JVMS
4.1</a>
+ */
+ private static final Map<Integer, String> CLASS_VERSION_TO_JAVA_STRING;
Review Comment:
Done in
https://github.com/apache/maven-plugin-tools/pull/171/commits/4c8e2499919b75c2e1cd5a12e474dc65070f7d4f.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]