diff --git a/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml b/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml
index 5a7c114..2ac9650 100644
--- a/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml
+++ b/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml
@@ -74,6 +74,13 @@ under the License.
org.apache.maven.pluginsmaven-project-info-reports-plugin2.4
+
+
+
+ index
+
+
+ org.apache.maven.plugins
diff --git a/maven-plugin-plugin/src/it/plugin-info-jdk-default-property/invoker.properties b/maven-plugin-plugin/src/it/plugin-info-jdk/invoker.properties
similarity index 95%
rename from maven-plugin-plugin/src/it/plugin-info-jdk-default-property/invoker.properties
rename to maven-plugin-plugin/src/it/plugin-info-jdk/invoker.properties
index abdde0d..5cc536a 100644
--- a/maven-plugin-plugin/src/it/plugin-info-jdk-default-property/invoker.properties
+++ b/maven-plugin-plugin/src/it/plugin-info-jdk/invoker.properties
@@ -15,4 +15,4 @@
# specific language governing permissions and limitations
# under the License.
-invoker.goals = clean site -DskipTests
+invoker.goals = clean site
diff --git a/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/pom.xml b/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/pom.xml
new file mode 100644
index 0000000..9b2aba1
--- /dev/null
+++ b/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/pom.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+ 4.0.0
+
+
+ org.apache.maven.its.plugin-info-jdk
+ parent
+ 1.0-SNAPSHOT
+
+ plugin
+ target bytecode defined by plugin configuration
+ maven-plugin
+
+
+ 1.3
+ ${maven.compiler.source}
+
+
+
+
+
+
+ maven-compiler-plugin
+
+ 1.4
+ 1.4
+
+
+
+
+
+
+ maven-compiler-plugin
+
+ 1.5
+ 1.5
+
+
+
+
+
diff --git a/maven-plugin-plugin/src/it/plugin-info-jdk-default-property/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java b/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
similarity index 62%
rename from maven-plugin-plugin/src/it/plugin-info-jdk-default-property/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
rename to maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
index 3f2d827..ec3f1db 100644
--- a/maven-plugin-plugin/src/it/plugin-info-jdk-default-property/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
+++ b/maven-plugin-plugin/src/it/plugin-info-jdk/plugin/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
@@ -1,19 +1,22 @@
package org.apache.maven.plugins.issues.plugin;
/*
- * Copyright 2001-2005 The Apache Software Foundation.
+ * 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
*
- * Licensed 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
*
- * 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.
+ * 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;
diff --git a/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/pom.xml b/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/pom.xml
new file mode 100644
index 0000000..75dd6ec
--- /dev/null
+++ b/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/pom.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+ 4.0.0
+
+
+ org.apache.maven.its.plugin-info-jdk
+ parent
+ 1.0-SNAPSHOT
+
+ pluginManagement
+ target bytecode defined by pluginManagement configuration
+ maven-plugin
+
+
+ 1.3
+ ${maven.compiler.source}
+
+
+
+
+
+
+ maven-compiler-plugin
+
+ 1.4
+ 1.4
+
+
+
+
+
+
diff --git a/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java b/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
new file mode 100644
index 0000000..ec3f1db
--- /dev/null
+++ b/maven-plugin-plugin/src/it/plugin-info-jdk/pluginManagement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
@@ -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
+ }
+ }
+ }
+ }
+}
diff --git a/maven-plugin-plugin/src/it/plugin-info-jdk-default-property/pom.xml b/maven-plugin-plugin/src/it/plugin-info-jdk/pom.xml
similarity index 84%
rename from maven-plugin-plugin/src/it/plugin-info-jdk-default-property/pom.xml
rename to maven-plugin-plugin/src/it/plugin-info-jdk/pom.xml
index 5b94a65..b603114 100644
--- a/maven-plugin-plugin/src/it/plugin-info-jdk-default-property/pom.xml
+++ b/maven-plugin-plugin/src/it/plugin-info-jdk/pom.xml
@@ -23,15 +23,13 @@ under the License.
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- org.apache.maven.its
- jdk-default-property
+ org.apache.maven.its.plugin-info-jdk
+ parent1.0-SNAPSHOT
- maven-plugin
+ pomUTF-8
- 1.5
- ${maven.compiler.source}
@@ -42,6 +40,13 @@ under the License.
+
+ property
+ pluginManagement
+ plugin
+ requirement
+
+
@@ -49,12 +54,6 @@ under the License.
org.apache.maven.pluginsmaven-compiler-plugin2.3.2
-
org.apache.maven.plugins
@@ -76,6 +75,13 @@ under the License.
org.apache.maven.pluginsmaven-project-info-reports-plugin2.4
+
+
+
+ index
+
+
+ org.apache.maven.plugins
diff --git a/maven-plugin-plugin/src/it/plugin-info-jdk-default-property/src/site/site.xml b/maven-plugin-plugin/src/it/plugin-info-jdk/property/pom.xml
similarity index 53%
rename from maven-plugin-plugin/src/it/plugin-info-jdk-default-property/src/site/site.xml
rename to maven-plugin-plugin/src/it/plugin-info-jdk/property/pom.xml
index 3c125b5..aa21b82 100644
--- a/maven-plugin-plugin/src/it/plugin-info-jdk-default-property/src/site/site.xml
+++ b/maven-plugin-plugin/src/it/plugin-info-jdk/property/pom.xml
@@ -19,12 +19,21 @@ specific language governing permissions and limitations
under the License.
-->
-
-
-
-
-
+
+ 4.0.0
+
+
+ org.apache.maven.its.plugin-info-jdk
+ parent
+ 1.0-SNAPSHOT
+
+ property
+ target bytecode defined by maven.compiler.target property
+ maven-plugin
+
+
+ 1.3
+ ${maven.compiler.source}
+
diff --git a/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java b/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
new file mode 100644
index 0000000..ec3f1db
--- /dev/null
+++ b/maven-plugin-plugin/src/it/plugin-info-jdk/property/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
@@ -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
+ }
+ }
+ }
+ }
+}
diff --git a/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/pom.xml b/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/pom.xml
new file mode 100644
index 0000000..5ab103f
--- /dev/null
+++ b/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/pom.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+ 4.0.0
+
+
+ org.apache.maven.its.plugin-info-jdk
+ parent
+ 1.0-SNAPSHOT
+
+ requirement
+ target bytecode defined by report jdk requirement configuration
+ maven-plugin
+
+
+ 1.3
+ ${maven.compiler.source}
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 1.4
+ 1.4
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 1.5
+ 1.5
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-plugin-plugin
+
+
+ 1.8
+
+
+
+
+
+
diff --git a/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java b/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
new file mode 100644
index 0000000..ec3f1db
--- /dev/null
+++ b/maven-plugin-plugin/src/it/plugin-info-jdk/requirement/src/main/java/org/apache/maven/plugins/issues/plugin/MyMojo.java
@@ -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
+ }
+ }
+ }
+ }
+}
diff --git a/maven-plugin-plugin/src/it/plugin-info-jdk-default-property/verify.groovy b/maven-plugin-plugin/src/it/plugin-info-jdk/verify.groovy
similarity index 65%
rename from maven-plugin-plugin/src/it/plugin-info-jdk-default-property/verify.groovy
rename to maven-plugin-plugin/src/it/plugin-info-jdk/verify.groovy
index 7a02709..2b43714 100644
--- a/maven-plugin-plugin/src/it/plugin-info-jdk-default-property/verify.groovy
+++ b/maven-plugin-plugin/src/it/plugin-info-jdk/verify.groovy
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -17,11 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-assert new File( basedir, 'target/site' ).exists();
-content = new File( basedir, 'target/site/plugin-info.html' ).text;
-
-assert content.contains( '
1.5
' );
-assert !content.contains( '
Default target for maven-compiler-plugin version' );
+assert new File( basedir, 'property/target/site/plugin-info.html' ).text.contains( '
1.3
' )
+assert new File( basedir, 'pluginManagement/target/site/plugin-info.html' ).text.contains( '
1.4
' )
+assert new File( basedir, 'plugin/target/site/plugin-info.html' ).text.contains( '
1.5
' )
+assert new File( basedir, 'requirement/target/site/plugin-info.html' ).text.contains( '
1.8
' )
return true;
\ No newline at end of file
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 6e5ff47..5d904b0 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
@@ -663,10 +663,13 @@ public class PluginReport
}
/**
- * Try to lookup on the org.apache.maven.plugins:maven-compiler-plugin plugin to
- * find the value of the target option.
- * If not specified, uses the value defined by the user.
- * If not specified, uses the value of the system property java.specification.version.
+ *
+ *
use configured jdk requirement
+ *
use target configuration of org.apache.maven.plugins:maven-compiler-plugin
+ *
use target configuration of org.apache.maven.plugins:maven-compiler-plugin in
+ * pluginManagement