[ 
https://issues.apache.org/jira/browse/MPLUGIN-511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17825865#comment-17825865
 ] 

ASF GitHub Bot commented on MPLUGIN-511:
----------------------------------------

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


##########
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:
   and 1.4 is 1.4: only starting with 1.5 we have the 5 alias





> create and share tooling to detect plugin prerequisites history
> ---------------------------------------------------------------
>
>                 Key: MPLUGIN-511
>                 URL: https://issues.apache.org/jira/browse/MPLUGIN-511
>             Project: Maven Plugin Tools
>          Issue Type: Improvement
>          Components: Plugin Plugin
>    Affects Versions: 3.11.0
>            Reporter: Herve Boutemy
>            Priority: Major
>             Fix For: 3.12.0
>
>
> to help creating documentation needed on plugins when implementing 
> MPLUGIN-400, i.e. fill requirementsHistories 
> [https://maven.apache.org/plugin-tools-archives/plugin-tools-3.7.0/maven-plugin-report-plugin/report-mojo.html#requirementshistories]
>  
> this will be useful both for Maven project itself, because we have 52 plugins 
> to work on 
> [https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-dist-tool/job/master/site/dist-tool-prerequisites.html]
> but this will help also every plugin maintainers: MojoHaus, others



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to