From da321cebe1ebdc5cab99c912954bf3b60b7005db Mon Sep 17 00:00:00 2001 From: Vincent Siveton Date: Fri, 29 Feb 2008 02:04:23 +0000 Subject: [PATCH] MPLUGIN-79: Fix detection of JDK requirement Submitted by: Benjamin Bentmann Reviewed by: Vincent Siveton o applied git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@632203 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/maven/plugin/plugin/PluginReport.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java index f4dbc98..4722f16 100644 --- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java +++ b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java @@ -522,11 +522,12 @@ public class PluginReport } if ( jdk == null ) { - jdk = discoverJdkRequirementFromPlugins( project.getPluginArtifactMap() ); + jdk = discoverJdkRequirementFromPlugins( project.getBuild().getPluginsAsMap() ); } if ( jdk == null ) { - jdk = System.getProperty( "java.specification.version" ); + // The Maven Compiler Plugin uses a fixed default value, not the current JDK version. + jdk = "1.1"; } return jdk; @@ -575,7 +576,7 @@ public class PluginReport continue; } - if ( pluginConf.getChild( "target" ) != null ) + if ( pluginConf.getChild( "target" ) == null ) { continue; }