Maven Goals

JBehave supports accessing the Embedder functionality via Maven goals:

Maven goals support the following properties:

In addition, the unpack-view-resources goal supports the properties:

An example of a typical Maven plugin usage is:

The default scope is compile, which means that the stories will be looked up in the POM source directory. If the scope is set to test the stories will be looked up in the POM test source directory.

ClassLoading Logging Frameworks

JBehave uses FreeMarker to generate template-based reports. FreeMarker uses its own version of a logging facade framework which auto-discovers different logging frameworks, notably JDK Logging and Apache log4j. When using the JBehave Maven Plugin, and depending on the rest of your POM configuration, you may need to add Apache log4j as Plugin Dependency (as opposed to the Project Dependency) if you find that it's not able to load its classes, e.g.:

ClassLoading Groovy Meta Matcher

When using the JBehave Maven Plugin with a Groovy Meta Matcher you need to configure Groovy as Plugin Dependency (as opposed to the Project Dependency):