Java – why doesn’t Maven generate project reports?
•
Java
This is Maven 3.0 I am creating a new project:
mvn archetype:create
Then I create 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 add a report plug-in 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 the MVN site, which says "build success" But I didn't see any reports on the project website (the report menu item is not available) What on earth did I do wrong?
Solution
Maven 3 report 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> [...]
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码