slawekjaranowski commented on code in PR #269:
URL: 
https://github.com/apache/maven-plugin-tools/pull/269#discussion_r1514029558


##########
maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java:
##########
@@ -93,6 +110,9 @@ public class PluginReport extends AbstractMavenReport {
     @Parameter
     private List<RequirementsHistory> requirementsHistories = new 
ArrayList<>();
 
+    @Parameter(defaultValue = "[0,)")
+    private String detectRequirementsHistory;

Review Comment:
   A documentation will be appreciated



##########
maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/RequirementsHistory.java:
##########
@@ -118,33 +126,32 @@ public static String discoverJdkRequirement(MavenProject 
project, PluginDescript
         }
 
         jdk = getPluginParameter(compiler, "release");
-        if (jdk != null) {
-            return jdk;
+        if (jdk == null) {
+            jdk = 
project.getProperties().getProperty("maven.compiler.release");
         }
 
-        jdk = project.getProperties().getProperty("maven.compiler.release");
-        if (jdk != null) {
-            return jdk;
+        if (jdk == null) {
+            jdk = getPluginParameter(compiler, "target");
         }
 
-        jdk = getPluginParameter(compiler, "target");
-        if (jdk != null) {
-            return jdk;
+        if (jdk == null) {
+            // default value
+            jdk = project.getProperties().getProperty("maven.compiler.target");
         }
 
-        // default value
-        jdk = project.getProperties().getProperty("maven.compiler.target");
-        if (jdk != null) {
-            return jdk;
-        }
+        if (jdk == null) {
+            String version = (compiler == null) ? null : compiler.getVersion();
 
-        String version = (compiler == null) ? null : compiler.getVersion();
-
-        if (version != null) {
-            return "Default target for maven-compiler-plugin version " + 
version;
+            if (version != null) {
+                return "Default target for maven-compiler-plugin version " + 
version;
+            }
+        } else {
+            if (Arrays.asList("1.5", "1.6", "1.7", "1.8").contains(jdk)) {

Review Comment:
   `startsWith("1.")` ?



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to