maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1645468 - in /maven/plugin-tools/trunk/maven-plugin-plugin/src: it/plugin-info-jdk-default-property/ it/plugin-info-jdk-default-version/ it/plugin-info-jdk/ it/plugin-info-jdk/plugin/ it/plugin-info-jdk/plugin/src/ it/plugin-info-jdk/plugi...
Date Sun, 14 Dec 2014 17:02:55 GMT
Author: hboutemy
Date: Sun Dec 14 17:02:53 2014
New Revision: 1645468

URL: http://svn.apache.org/r1645468
Log:
[MPLUGIN-279] added IT with quite complete scenarios and fixed algorithm

Added:
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/invoker.properties   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/pom.xml   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/plugins/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/plugins/issues/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/plugins/issues/plugin/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/pom.xml   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/plugins/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/plugins/issues/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/plugins/issues/plugin/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pom.xml   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/pom.xml   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/plugins/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/plugins/issues/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/plugins/issues/plugin/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/pom.xml   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/plugins/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/plugins/issues/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/plugins/issues/plugin/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/verify.groovy   (with props)
Removed:
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-property/
Modified:
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml
    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/it/plugin-info-jdk-default-version/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml?rev=1645468&r1=1645467&r2=1645468&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml Sun Dec 14 17:02:53 2014
@@ -74,6 +74,13 @@ under the License.
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-project-info-reports-plugin</artifactId>
         <version>2.4</version>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>index</report>
+            </reports>
+          </reportSet>
+        </reportSets>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/invoker.properties?rev=1645468&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/invoker.properties (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/invoker.properties Sun Dec 14 17:02:53 2014
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals = clean site

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/invoker.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/pom.xml?rev=1645468&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/pom.xml (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/pom.xml Sun Dec 14 17:02:53 2014
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.its.plugin-info-jdk</groupId>
+    <artifactId>parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>plugin</artifactId>
+  <name>target bytecode defined by plugin configuration</name>
+  <packaging>maven-plugin</packaging>
+
+  <properties><!-- will be overridden -->
+    <maven.compiler.source>1.3</maven.compiler.source>
+    <maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
+  </properties>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <configuration><!-- will be overridden -->
+            <source>1.4</source>
+            <target>1.4</target>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java?rev=1645468&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java Sun Dec 14 17:02:53 2014
@@ -0,0 +1,84 @@
+package org.apache.maven.plugins.issues.plugin;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+/**
+ * Goal which touches a timestamp file.
+ *
+ * @goal touch
+ * 
+ * @phase process-sources
+ */
+public class MyMojo
+    extends AbstractMojo
+{
+    /**
+     * Location of the file.
+     * @parameter expression="${project.build.directory}"
+     * @required
+     */
+    private File outputDirectory;
+
+    public void execute()
+        throws MojoExecutionException
+    {
+        File f = outputDirectory;
+
+        if ( !f.exists() )
+        {
+            f.mkdirs();
+        }
+
+        File touch = new File( f, "touch.txt" );
+
+        FileWriter w = null;
+        try
+        {
+            w = new FileWriter( touch );
+
+            w.write( "touch.txt" );
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( "Error creating file " + touch, e );
+        }
+        finally
+        {
+            if ( w != null )
+            {
+                try
+                {
+                    w.close();
+                }
+                catch ( IOException e )
+                {
+                    // ignore
+                }
+            }
+        }
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/pom.xml?rev=1645468&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/pom.xml (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/pom.xml Sun Dec 14 17:02:53 2014
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.its.plugin-info-jdk</groupId>
+    <artifactId>parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>pluginManagement</artifactId>
+  <name>target bytecode defined by pluginManagement configuration</name>
+  <packaging>maven-plugin</packaging>
+
+  <properties><!-- will be overridden -->
+    <maven.compiler.source>1.3</maven.compiler.source>
+    <maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
+  </properties>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <configuration>
+            <source>1.4</source>
+            <target>1.4</target>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java?rev=1645468&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java Sun Dec 14 17:02:53 2014
@@ -0,0 +1,84 @@
+package org.apache.maven.plugins.issues.plugin;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+/**
+ * Goal which touches a timestamp file.
+ *
+ * @goal touch
+ * 
+ * @phase process-sources
+ */
+public class MyMojo
+    extends AbstractMojo
+{
+    /**
+     * Location of the file.
+     * @parameter expression="${project.build.directory}"
+     * @required
+     */
+    private File outputDirectory;
+
+    public void execute()
+        throws MojoExecutionException
+    {
+        File f = outputDirectory;
+
+        if ( !f.exists() )
+        {
+            f.mkdirs();
+        }
+
+        File touch = new File( f, "touch.txt" );
+
+        FileWriter w = null;
+        try
+        {
+            w = new FileWriter( touch );
+
+            w.write( "touch.txt" );
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( "Error creating file " + touch, e );
+        }
+        finally
+        {
+            if ( w != null )
+            {
+                try
+                {
+                    w.close();
+                }
+                catch ( IOException e )
+                {
+                    // ignore
+                }
+            }
+        }
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pom.xml?rev=1645468&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pom.xml (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pom.xml Sun Dec 14 17:02:53 2014
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.plugin-info-jdk</groupId>
+  <artifactId>parent</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0</version>
+    </dependency>
+  </dependencies>
+
+  <modules>
+    <module>property</module>
+    <module>pluginManagement</module>
+    <module>plugin</module>
+    <module>requirement</module>
+  </modules>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>2.3.2</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-plugin-plugin</artifactId>
+          <version>@project.version@</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>@sitePluginVersion@</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-project-info-reports-plugin</artifactId>
+        <version>2.4</version>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>index</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+        <version>@project.version@</version>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/pom.xml?rev=1645468&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/pom.xml (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/pom.xml Sun Dec 14 17:02:53 2014
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.its.plugin-info-jdk</groupId>
+    <artifactId>parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>property</artifactId>
+  <name>target bytecode defined by maven.compiler.target property</name>
+  <packaging>maven-plugin</packaging>
+
+  <properties>
+    <maven.compiler.source>1.3</maven.compiler.source>
+    <maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
+  </properties>
+</project>

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java?rev=1645468&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java Sun Dec 14 17:02:53 2014
@@ -0,0 +1,84 @@
+package org.apache.maven.plugins.issues.plugin;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+/**
+ * Goal which touches a timestamp file.
+ *
+ * @goal touch
+ * 
+ * @phase process-sources
+ */
+public class MyMojo
+    extends AbstractMojo
+{
+    /**
+     * Location of the file.
+     * @parameter expression="${project.build.directory}"
+     * @required
+     */
+    private File outputDirectory;
+
+    public void execute()
+        throws MojoExecutionException
+    {
+        File f = outputDirectory;
+
+        if ( !f.exists() )
+        {
+            f.mkdirs();
+        }
+
+        File touch = new File( f, "touch.txt" );
+
+        FileWriter w = null;
+        try
+        {
+            w = new FileWriter( touch );
+
+            w.write( "touch.txt" );
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( "Error creating file " + touch, e );
+        }
+        finally
+        {
+            if ( w != null )
+            {
+                try
+                {
+                    w.close();
+                }
+                catch ( IOException e )
+                {
+                    // ignore
+                }
+            }
+        }
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/pom.xml?rev=1645468&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/pom.xml (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/pom.xml Sun Dec 14 17:02:53 2014
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.its.plugin-info-jdk</groupId>
+    <artifactId>parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>requirement</artifactId>
+  <name>target bytecode defined by report jdk requirement configuration</name>
+  <packaging>maven-plugin</packaging>
+
+  <properties><!-- will be overridden -->
+    <maven.compiler.source>1.3</maven.compiler.source>
+    <maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
+  </properties>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <configuration><!-- will be overridden -->
+            <source>1.4</source>
+            <target>1.4</target>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration><!-- will be overridden -->
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+        <configuration>
+          <requirements>
+            <jdk>1.8</jdk>
+          </requirements>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java?rev=1645468&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java Sun Dec 14 17:02:53 2014
@@ -0,0 +1,84 @@
+package org.apache.maven.plugins.issues.plugin;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+/**
+ * Goal which touches a timestamp file.
+ *
+ * @goal touch
+ * 
+ * @phase process-sources
+ */
+public class MyMojo
+    extends AbstractMojo
+{
+    /**
+     * Location of the file.
+     * @parameter expression="${project.build.directory}"
+     * @required
+     */
+    private File outputDirectory;
+
+    public void execute()
+        throws MojoExecutionException
+    {
+        File f = outputDirectory;
+
+        if ( !f.exists() )
+        {
+            f.mkdirs();
+        }
+
+        File touch = new File( f, "touch.txt" );
+
+        FileWriter w = null;
+        try
+        {
+            w = new FileWriter( touch );
+
+            w.write( "touch.txt" );
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( "Error creating file " + touch, e );
+        }
+        finally
+        {
+            if ( w != null )
+            {
+                try
+                {
+                    w.close();
+                }
+                catch ( IOException e )
+                {
+                    // ignore
+                }
+            }
+        }
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/verify.groovy?rev=1645468&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/verify.groovy (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/verify.groovy Sun Dec 14 17:02:53 2014
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+assert new File( basedir, 'property/target/site/plugin-info.html' ).text.contains( '<td>1.3</td>' )
+assert new File( basedir, 'pluginManagement/target/site/plugin-info.html' ).text.contains( '<td>1.4</td>' )
+assert new File( basedir, 'plugin/target/site/plugin-info.html' ).text.contains( '<td>1.5</td>' )
+assert new File( basedir, 'requirement/target/site/plugin-info.html' ).text.contains( '<td>1.8</td>' )
+
+return true;
\ No newline at end of file

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/verify.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk/verify.groovy
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

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=1645468&r1=1645467&r2=1645468&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 Sun Dec 14 17:02:53 2014
@@ -663,10 +663,13 @@ public class PluginReport
         }
 
         /**
-         * Try to lookup on the <code>org.apache.maven.plugins:maven-compiler-plugin</code> plugin to
-         * find the value of the <code>target</code> option.
-         * If not specified, uses the value defined by the user.
-         * If not specified, uses the value of the system property <code>java.specification.version</code>.
+         * <ol>
+         * <li>use configured jdk requirement</li>
+         * <li>use <code>target</code> configuration of <code>org.apache.maven.plugins:maven-compiler-plugin</code></li>
+         * <li>use <code>target</code> configuration of <code>org.apache.maven.plugins:maven-compiler-plugin</code> in
+         * <code>pluginManagement</code></li>
+         * <li>use <code>maven.compiler.target</code> property</li>
+         * </ol>
          *
          * @param project      not null
          * @param requirements not null
@@ -675,23 +678,90 @@ public class PluginReport
         private static String discoverJdkRequirement( MavenProject project, Requirements requirements )
         {
             String jdk = requirements.getJdk();
-            if ( jdk == null )
+
+            if ( jdk != null )
+            {
+                return jdk;
+            }
+
+            Plugin compiler = getCompilerPlugin( project.getBuild().getPluginsAsMap() );
+
+            jdk = getTarget( compiler );
+            if ( jdk != null )
+            {
+                return jdk;
+            }
+
+            Plugin compilerManagement = getCompilerPlugin( project.getPluginManagement().getPluginsAsMap() );
+
+            jdk = getTarget( compilerManagement );
+            if ( jdk != null )
+            {
+                return jdk;
+            }
+
+            // default value
+            jdk = project.getProperties().getProperty( "maven.compiler.target" );
+            if ( jdk != null )
+            {
+                return jdk;
+            }
+
+            String version = getVersion( compiler );
+
+            if ( version == null )
+            {
+                version = getVersion( compilerManagement );
+            }
+
+            if ( version != null )
             {
-                jdk = discoverJdkRequirementFromPlugins( project.getBuild().getPluginsAsMap(),
-                                                         project.getProperties() );
+                return "Default target for maven-compiler-plugin version " + version;
             }
-            if ( jdk == null && project.getPluginManagement() != null )
+
+            return "Unknown";
+        }
+
+        private static Plugin getCompilerPlugin( Map<String, Object> pluginsAsMap )
+        {
+            for ( Map.Entry<String, Object> entry : pluginsAsMap.entrySet() )
             {
-                jdk =
-                    discoverJdkRequirementFromPlugins( project.getPluginManagement().getPluginsAsMap(),
-                                                       project.getProperties() );
+                if ( entry.getKey().equals( "org.apache.maven.plugins:maven-compiler-plugin" ) )
+                {
+                    return (Plugin) entry.getValue();
+                }
             }
-            if ( jdk == null )
+            return null;
+        }
+
+        private static String getTarget( Plugin plugin )
+        {
+            if ( plugin != null )
+            {
+                Xpp3Dom pluginConf = (Xpp3Dom) plugin.getConfiguration();
+
+                if ( pluginConf != null )
+                {
+                    Xpp3Dom target = pluginConf.getChild( "target" );
+
+                    if ( target != null )
+                    {
+                        return target.getValue();
+                    }
+                }
+            }
+
+            return null;
+        }
+
+        private static String getVersion( Plugin plugin )
+        {
+            if ( plugin != null )
             {
-                jdk = "Unknown";
+                return plugin.getVersion();
             }
 
-            return jdk;
+            return null;
         }
 
         /**



Mime
View raw message