3

I have a multi module pom

ProjectBaseDir>

  • Module A
  • Module B
  • parentPom.xml

I don't have any site.xml

ProjectBaseDir> mvn clean site

produces the below files under the directory

ProjectBaseDir/target/site>

  • cpd.html, pmd.html, findbugs.html
  • project-reports.html (Note: no index.html)
  • folders (css, images, apidocs)

Links generated in multi module pom points to "index.html" but that file is not created. staging fixes the relative path of the module files but the original issue of index.html still exists

ProjectBaseDir> mvn site:stage
  1. How can I fix the link to point to "project-reports.html" ?
  2. Or how can I instruct mvn site to create index.html instead of project-reports.html ?

Note: I tried "maven-project-info-reports-plugin" with reportsets of index but it did not change anything.

Praveen
  • 71
  • 5

1 Answers1

0

This might not help, but I had setup the maven-site-plugin with an explicit reportinPlugins config section in an effort to get javadoc generation with mvn site working on jdk8. It looked like this

 <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.6</version>
                <configuration>
                    <reportPlugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                            <configuration>
                                <additionalparam>${javadoc.opts}</additionalparam>
                            </configuration>
   </plugin>

My issue was that the project info reporting plugin was never firing, nor was anything else in the reporting plugin section of the parent pom. The fix was to remove the reportPlugins child of maven site, like this

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.6</version>
</plugin>

Apparently when it is defined, it's a replacement, not just a configure a plugin type of thing.

spy
  • 3,199
  • 1
  • 18
  • 26