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 -- 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