2

I'm trying to use the dependency-convergence report of the maven-project-info-reports plugin in a multi-module project that looks like:

test-project-parent
   + test-lib-a
   + test-lib-b

If I run site:site on the test-lib-a pom I get the report I expect showing dependency convergence for that project.

enter image description here

If I run site:site on the parent pom, a dependency convergence report is generated for each project but all three reports are the same and they include information about the whole reactor build instead of just each particular project.

enter image description here

How can I make the report generated for each module show only the information about that module and not the whole reactor build?

EDIT: This is my parent pom:

<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.example</groupId>
   <artifactId>site-test-parent</artifactId>
   <version>0.0.1-SNAPSHOT</version>
   <packaging>pom</packaging>
   <name>Maven Site Test</name>

   <modules>
      <module>test-lib-a</module>
      <module>test-lib-b</module>
   </modules>

   <reporting>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <version>2.9</version>
            <reportSets>
               <reportSet>
                  <reports>
                     <report>dependency-convergence</report>
                  </reports>
               </reportSet>
            </reportSets>
         </plugin>
      </plugins>
   </reporting>

</project>

This is the test-lib-a pom:

<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.example</groupId>
      <artifactId>site-test-parent</artifactId>
      <version>0.0.1-SNAPSHOT</version>
   </parent>

   <artifactId>test-lib-a</artifactId>

   <dependencies>
      <dependency>
         <groupId>commons-lang</groupId>
         <artifactId>commons-lang</artifactId>
         <version>2.4</version>
      </dependency>
   </dependencies>
</project>

The second screenshot is what gets generated in site-test/test-lib-a/target/site/dependency-convergence.html when I run site:site on the parent.

takteek
  • 7,020
  • 2
  • 39
  • 70
  • Could you share your report plugin configuration and which pom have you declared the same in? – Naman Jun 12 '17 at 05:10
  • Okay, added. They're very simple since this is just a test project so I can explore configuring various reports before applying them to my real project. – takteek Jun 12 '17 at 06:18

1 Answers1

0

So just to add two things from an attempt I made after with a similar configuration on one of my projects -

<reporting>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <version>2.9</version>
            <reportSets>
                <reportSet>
                    <reports>
                        <report>dependency-convergence</report>
                    </reports>
                </reportSet>
            </reportSets>
        </plugin>
    </plugins>
</reporting>
  1. How can I make the report generated for each module show only the information about that module and not the whole reactor build?

The only way I could figure out to generate different reports for dependency-convergence on different modules was to execute mvn:site on each module individually.

  1. From the documentation as shared by you as well. This doesn't seem to justify the point as an aggregator plugin., since I would expect the reports to be generated module(child module) specific when I run mvn:site on the parent level.

Though I doubt the specific words (reactor) builds from the line

project-info-reports:dependency-convergence is used to generate the Project Dependency Convergence report for (reactor) builds.

might mean that it generates the convergence report for a specific build.

Probably raising/reporting this to the mailing list may help further over this. Alias for which I hope is correctly put dev@maven.apache.org.

Naman
  • 27,789
  • 26
  • 218
  • 353