Java Reference
In-Depth Information
Figure 10.4
HTML report from the Maven Surefire Report plug-in
invoke it by running a certain phase (as we did with both the Compiler plug-in and
the Surefire plug-in), but instead we have to call it directly from the command line:
mvn surefire-report:report
When we do so, Maven will try to compile the source files and the test cases and then
invoke the Surefire plug-in to produce the plain text and XML -formatted output of
the tests. After that the Surefire Report plug-in will try to transform all of the XML
reports from the target/surefire-reports/ directory into an HTML report that will be
placed in the target/site directory (remember that the convention for the directory is
to keep all of the generated documentation of the project, and the HTML reports are
considered documentation).
If you try to open the generated HTML report, it should look something like the
one shown in figure 10.4.
In the next section, we cover some of Maven's weaker points.
10.4
The bad side of Maven
So far, we've discussed Maven as the tool that's going to take the place of Ant. But as
with all other things in life, it's not all a bed of roses. Maven has its bad sides, too.
Before you get too excited, just think about it. Maven has been out since 2002, and
still Ant is the de facto standard for building software.
 
 
 
Search WWH ::




Custom Search