diff --git a/src/it/MPIR-460-jar/invoker.properties b/src/it/MPIR-460-jar/invoker.properties
new file mode 100644
index 00000000..0e9501c2
--- /dev/null
+++ b/src/it/MPIR-460-jar/invoker.properties
@@ -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 = ${project.groupId}:${project.artifactId}:${project.version}:dependency-info
diff --git a/src/it/MPIR-460-jar/pom.xml b/src/it/MPIR-460-jar/pom.xml
new file mode 100644
index 00000000..3d8e27c4
--- /dev/null
+++ b/src/it/MPIR-460-jar/pom.xml
@@ -0,0 +1,39 @@
+
+
+
+
<plugin>') +assert !report.contains('</plugin>') + +assert report.contains('
<dependency>') +assert report.contains('</dependency>') + +assert report.contains('Apache Ivy') +assert report.contains('Groovy Grape') +assert report.contains('Gradle/Grails') +assert report.contains('Scala SBT') +assert report.contains('Leiningen') diff --git a/src/it/MPIR-460-maven-plugin/invoker.properties b/src/it/MPIR-460-maven-plugin/invoker.properties new file mode 100644 index 00000000..0e9501c2 --- /dev/null +++ b/src/it/MPIR-460-maven-plugin/invoker.properties @@ -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 = ${project.groupId}:${project.artifactId}:${project.version}:dependency-info diff --git a/src/it/MPIR-460-maven-plugin/pom.xml b/src/it/MPIR-460-maven-plugin/pom.xml new file mode 100644 index 00000000..f03a0393 --- /dev/null +++ b/src/it/MPIR-460-maven-plugin/pom.xml @@ -0,0 +1,39 @@ + + + +
<plugin>') +assert report.contains('</plugin>') + +assert !report.contains('
<dependency>') +assert !report.contains('</dependency>') + +assert !report.contains('Apache Ivy') +assert !report.contains('Groovy Grape') +assert !report.contains('Gradle/Grails') +assert !report.contains('Scala SBT') +assert !report.contains('Leiningen') diff --git a/src/main/java/org/apache/maven/report/projectinfo/DependencyInformationReport.java b/src/main/java/org/apache/maven/report/projectinfo/DependencyInformationReport.java index d1d67a5f..4d57b22f 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/DependencyInformationReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/DependencyInformationReport.java @@ -37,6 +37,7 @@ public final class DependencyInformationReport extends AbstractProjectInfoReport { private static final String JAR_PACKAGING = "jar"; + private static final String PLUGIN_PACKAGING = "maven-plugin"; /** */ @@ -130,6 +131,32 @@ protected String getI18Nsection() { protected void renderBody() { startSection(getTitle()); + if (PLUGIN_PACKAGING.equals(packaging)) { + renderMavenPluginCoordinates(); + } else { + renderMavenDependencyCoordinates(); + renderIvyDependencyCoordinates(); + renderGrapeDependencyCoordinates(); + renderGradleDependencyCoordinates(); + renderScalaDependencyCoordinates(); + renderLeiningenDependencyCoordinates(); + } + + endSection(); + } + + private void renderMavenPluginCoordinates() { + Formatter plugin = new Formatter() + .format("