2

I'm trying to generate report using "mvn site" and want it to contain just surefire reports.

I've been reading some examples and documentation but I couldn't simply understand it. Like in this link, how does the report name gets mapped?

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-project-info-reports-plugin</artifactId>
    <version>2.9</version>
    <reportSets>
      <reportSet>
        <reports>
          <report>dependencies</report>
          <report>project-team</report>
          <report>mailing-list</report>
          <report>cim</report>
          <report>issue-tracking</report>
          <report>license</report>
          <report>scm</report>
        </reports>
      </reportSet>
    </reportSets>
  </plugin>

In the above example there are items like "dependencies", "project-team", etc.

  1. How do I get the name of the report to include to that list if I want to add one? Say I want to just include surefire reports, how do I get the name of the surefire report?

  2. How do these names get mapped?

supertonsky
  • 2,563
  • 6
  • 38
  • 68

1 Answers1

1

The Maven Project Info Reports plugin is used to generate reports information about the project.

How do these names get mapped?

These names are the name of the tags that a pom.xml(introductory information linked) defining a module consists of.

How do I get the name of the report to include to that list if I want to add one? Say I want to just include surefire reports, how do I get the name of the surefire report?

The plugin is not meant to be reporting the tests or build details reports, instead it is meant to report only the project-information(useful sublinks to b followed.)

Naman
  • 27,789
  • 26
  • 218
  • 353
  • Ultimately, I want to generate a PDF format of generated surefire-reports. And according to what I've read (https://stackoverflow.com/questions/4920842/how-to-us-maven-pdf-plugin-to-generate-pdf-from-surefire-report), it will need the mvn site to generate an XML that will be needed to generate PDF. So, how do I proceed without using the plugin you mentioned that's only meant for project-information? – supertonsky Oct 03 '17 at 08:55
  • @supertonsky The shared link already uses the desired plugins. I guess the OP there ended up adding all of the code which also included this plugin and you mistook this to be the core of report generation in terms of test reports. – Naman Oct 03 '17 at 08:57
  • I'm not sure, but he explicitly mentioned that maven pdf plugin really depends on site plugin to work. Even this link mentions it. (http://maven.apache.org/plugins/maven-pdf-plugin/usage.html#As_Part_Of_Your_Build_Process) Am I missing something? – supertonsky Oct 03 '17 at 09:31
  • @supertonsky And then did you look for https://maven.apache.org/plugins/maven-site-plugin/ ? – Naman Oct 03 '17 at 09:32
  • 1
    I did. Though after reading it, I still don't know how could I make maven-pdf-plugin work. I'm guessing that I need to understand exactly how maven-site-plugin works so I can make maven-pdf-plugin to work along with maven-site-plugin. That's the reason I asked the question. I still can't generate the PDF report, unfortunately. – supertonsky Oct 03 '17 at 09:43
  • 1
    @supertonsky Well, in that case, I think this question is far way off from what you intend to, Probably asking another about it after reading out all the details would be a better choice. Let's keep this one short to the `project-info-reports-plugin` instead. – Naman Oct 03 '17 at 09:45
  • It doesn't look like the names of the report are the tags in the pom.xml. Case in point is the following: https://maven.apache.org/plugins/maven-site-plugin/examples/configuring-reports.html – supertonsky Oct 03 '17 at 11:01
  • @supertonsky You are confusing two different plugins probably. Check this link for say https://maven.apache.org/plugins/maven-project-info-reports-plugin/project-info.html and click on the Overview table's keys to find their corresponding tag values used in the pom.xml. – Naman Oct 03 '17 at 11:03