##### Coverage Report - org.jbehave.mojo.ReportStepdocs

Classes in this File | Line Coverage | Branch Coverage | Complexity
ReportStepdocs |
100% | 8/8
N/A | N/A
| 3.0;3

1 |  |
     package org.jbehave.mojo;
2 |  |
3 |  |
     import org.apache.maven.plugin.MojoExecutionException;
4 |  |
     import org.apache.maven.plugin.MojoFailureException;
5 |  |
     import org.jbehave.core.embedder.Embedder;
6 |  |
7 |  |
     /**
8 |  |
      * Mojo to report stepdocs given a fully configured {@link Embedder} instance.
9 |  |
      *
10 |  |
      * @goal report-stepdocs
11 |  |
      */
12 | 2 |
     public class ReportStepdocs extends AbstractEmbedderMojo {
13 |  |
14 |  |
         public void execute() throws MojoExecutionException, MojoFailureException {
15 | 2 |
             Embedder embedder = newEmbedder();
16 | 2 |
             getLog().info("Reporting stepdocs using embedder " + embedder);
17 |  |
             try {
18 | 2 |
                 embedder.reportStepdocs();
19 | 1 |
             } catch (RuntimeException e) {
20 | 1 |
                 throw new MojoFailureException("Failed to report stepdocs", e);
21 | 1 |
             }
22 | 1 |
         }
23 |  |
24 |  |
     }