JBehave was developed as behaviour-driven and example-driven. Read more about the examples modules and examples philosophy.
Examples are not released as artifacts so the source code is needed to run them. The source code can be checked out from source repository or can be found as one of artifacts of the jbehave-distribution (the "src" zip bundle).
To build core modules and run examples with Maven:
mvn -s settings.xml clean install -Pexamples |
The 'examples' profile instructs Maven to build the releasable modules and to verify their behaviour by running the examples afterwards.
To run the GUI example too (requires non-headless mode):
mvn clean install -Pexamples,gui |
In some cases, you may want to run the examples against a known version of JBehave.
cd examples mvn clean install -Djbehave.version=[version] |
One option, is to pull the dependencies from the snapshots repository, activated by the sonatype profile in the settings.xml provided next to the top-level POM.
cd examples mvn -Psonatype -s ../settings.xml clean install -Djbehave.version=[version] |
The other option is to install the parent POM from source:
mvn clean install -N <-- installs locally only JBehave parent POM (does not recurse into the child modules) cd examples mvn clean install -Djbehave.version=[version] |