Archetypes

Archetypes are Maven project templates that can allow a quick and easy setup of new JBehave modules.

JBehave offers archetypes for several usecases:

  • jbehave-simple-archetype: the simplest form to run stories
  • jbehave-groovy-archetype: use steps written in Groovy
  • jbehave-guice-archetype: use Guice support
  • jbehave-pico-archetype: use Pico support
  • jbehave-spring-archetype: use Spring support

To use an archetype to generate a new project you can need to specify the path the archetype-catalog.xml which can be found in the binary distribution, in the archetypes directory:

When generating a new project, after you've selected the archetype, you need to specify the usual Maven project GAV coordinates, i.e. groupId, artifactId and version. These will be used to concretise the template.

If you are using Nexus 1.9 or above you don't need to specify the archetype catalog as it will automatically generate it for you. Then all you need is to search for archetypes with group org.jbehave. The Maven Central archetype catalog is also periodically updated, although perhaps not with the same frequency that you may require.