Reputation: 33
I just want to include basic reports in my Maven site. I've included this in my POM:
<project>
...
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
</plugin>
</plugins>
</reporting>
...
</project>
And this included in my site descriptor, index.xml:
<project>
...
<body>
<menu ref="reports" />
</body>
</project>
When I use mvn site:run
none of the reports are generated, and the menu isn't generated in the navigation. The only way I can generate reports is with direct command line calls, like mvn project-info-reports
. I can't get them on the site. All the help for Maven sites seems to be from 2010 so it's hard to figure out what's accurate. Here's what happens when I use clean site:run -Dport=8081
:
[INFO] ------------------------------------------------------------------------
[INFO] Building travelagentservice-client 1.0.0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-site-plugin:2.2:run (default-cli) @ travelagentservice-client ---
2014-06-10 15:41:30.812::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
[INFO] Parent project loaded from repository: choicehotels:corporate-pom:pom:2.1.0.0
[INFO] Starting Jetty on http://localhost:8081/
2014-06-10 15:41:30.960::INFO: jetty-6.1.5
2014-06-10 15:41:30.158::INFO: NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
2014-06-10 15:41:30.264::INFO: Started [email protected]:8081
Solution I figured out: I needed to specify the version of site I was using. It has to be 3.3.
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
</plugin>
Upvotes: 3
Views: 189
Reputation: 321
mvn site
with no plugin version, you should get a warningUpvotes: 2