Archetypes are Maven project templates that can allow a quick and easy setup of new JBehave modules.
JBehave Web offers archetypes for several usecases:
To generate a project from an archetype, first you need to select the archetype, then provide the information to create the concrete project from the archetype. This information includes:
To select a project from command-line, you can invoke:
mvn archetype:generate -Dfilter=org.jbehave.web:jbehave-web |
Choose an archetype from the list:
[INFO] [archetype:generate {execution: default-cli}] [INFO] Generating project in Interactive mode Choose archetype: 1: remote -> org.jbehave.web:jbehave-web-selenium-java-spring-archetype (-) Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : |
Provide the project information:
Define value for property 'groupId': : com.example.app Define value for property 'artifactId': : app-stories [INFO] Using property: version = 1.0-SNAPSHOT Define value for property 'package': com.example.app: [INFO] Using property: jbehaveCoreVersion = 3.6 [INFO] Using property: jbehaveWebVersion = 3.5 [INFO] Using property: jbehaveSiteVersion = 3.1.1 Confirm properties configuration: groupId: com.example.app artifactId: app-stories version: 1.0-SNAPSHOT package: com.example.app jbehaveCoreVersion: 3.6 jbehaveWebVersion: 3.5 jbehaveSiteVersion: 3.1.1 Y: |
You can also specify the path the archetype-catalog.xml which can be found in the binary distribution, in the archetypes directory:
mvn archetype:generate -DarchetypeCatalog=file://path/to/catalog |
Eclipse with m2e plugin allows the creation of Maven project from archetypes, easily filtering the archetype you are interested in.