Author: vsiveton
Date: Thu Feb 28 18:04:23 2008
New Revision: 632203

URL: http://svn.apache.org/viewvc?rev=632203&view=rev
Log:
MPLUGIN-79: Fix detection of JDK requirement
Submitted by: Benjamin Bentmann
Reviewed by: Vincent Siveton

o applied

Modified:
    
maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java

Modified: 
maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java
URL: 
http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java?rev=632203&r1=632202&r2=632203&view=diff
==============================================================================
--- 
maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java
 (original)
+++ 
maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java
 Thu Feb 28 18:04:23 2008
@@ -522,11 +522,12 @@
             }
             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 @@
                     continue;
                 }
 
-                if ( pluginConf.getChild( "target" ) != null )
+                if ( pluginConf.getChild( "target" ) == null )
                 {
                     continue;
                 }


Reply via email to