Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why maven doesn't generate project reports?

It's Maven 3.0. I'm creating a new project:

mvn archetype:create

Then I'm creating a file site/site.xml:

<project name="foo">
  <body>
    <menu name="Overview">
      <item name="Introduction" href="index.html" />
    </menu>
    <menu ref="reports" />
  </body>
</project>

Then I'm adding a reporting plugin to pom.xml:

<reporting>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-project-info-reports-plugin</artifactId>
      <version>2.1.1</version>
    </plugin>
  </plugins>
</reporting>

Then I run mvn site and it says "BUILD SUCCESS". But I don't see any reports in project site (reporting menu item is not there). What am I doing wrong?

like image 471
yegor256 Avatar asked Nov 06 '10 07:11

yegor256


People also ask

Does Maven tool generate project structure?

Maven is a popular open-source build tool developed by the Apache Group to build, publish, and deploy several projects at once for better project management. The tool provides allows developers to build and document the lifecycle framework.

What is Maven project Info reports Plugin?

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

What is reporting in Maven?

ReportNG is a simple HTML reporting plug-in for the TestNG unit-testing framework. License. Apache 2.0. Ranking. #4938 in MvnRepository (See Top Artifacts)

What is the advantage and disadvantages of Maven?

Maven makes easy to start project in different environments and one doesn't needs to handle the dependencies injection, builds, processing, etc. Adding a new dependency is very easy. One has to just write the dependency code in pom file.


1 Answers

Maven 3 reporting is different.

[...]
<build>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-site-plugin</artifactId>
    <version>3.0-beta-2</version>
    <configuration>
      <reportPlugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>2.2</version>
          <reports>
            <report>cim</report>
            <report>issue-tracking</report>
          </reports>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.2</version>
        </plugin>
      </reportPlugins>
    </configuration>
  </plugin>
</build>
[...]
like image 51
yegor256 Avatar answered Sep 30 '22 19:09

yegor256