| 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 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | 2 | public class MapStoriesAsEmbeddables extends AbstractEmbedderMojo { |
| 13 | |
|
| 14 | |
public void execute() throws MojoExecutionException, MojoFailureException { |
| 15 | 2 | Embedder embedder = newEmbedder(); |
| 16 | 2 | getLog().info("Mapping stories as embeddables using embedder " + embedder); |
| 17 | |
try { |
| 18 | 2 | embedder.runAsEmbeddables(classNames()); |
| 19 | 1 | } catch (RuntimeException e) { |
| 20 | 1 | throw new MojoFailureException("Failed to map stories as embeddables", e); |
| 21 | 1 | } |
| 22 | 1 | } |
| 23 | |
|
| 24 | |
} |