Skip to content

Creating a new project

Catalin edited this page May 28, 2020 · 36 revisions

With Cinnamon we have tried to make it as simple as possible to get you automating within minutes. Follow the instructions on this page to generate a Cinnamon template project with examples included.

Using the Maven archetype to create a new project template

The archetype currently creates a project that comprises our cucumber-jvm and webdriver modules. There are plans to provide other archetypes to fit your specific needs. Please let us know what they are.

Along with all needed references the project will be created with a basic structure fit for a BDD approach - features, steps, hooks, guice, etc.

Create a new project

1️⃣ Switch to a folder where you want to create the new project and run:

mvn archetype:generate -DarchetypeGroupId=io.magentys -DarchetypeArtifactId=cinnamon-archetype

 
2️⃣ Follow the prompts, entering the archetype property values:

  • Define value for property 'groupId': : eg. com.nttdata

    groupId will identify your project uniquely across all projects, so we need to enforce a naming schema. It has to follow the package name rules, meaning it has to be at least as a domain name you control, and you can create as many subgroups as you want. eg. org.apache.maven, org.apache.commons. A good way to determine the granularity of the groupId is to use the project structure. That is, if the current project is a multiple module project, it should append a new identifier to the parent's groupId. eg. org.apache.maven, org.apache.maven.plugins, org.apache.maven.reporting

  • Define value for property 'artifactId': : eg. acceptance-tests

    artifactId is the name of the jar without version. If you created it then you can choose whatever name you want with lowercase letters and no strange symbols. If it's a third party jar you have to take the name of the jar as it's distributed. eg. maven, commons-math

  • Define value for property 'version': : eg. 1.0.0-SNAPSHOT

    version if you distribute it then you can choose any typical version with numbers and dots (1.0, 1.1, 1.0.1, ...). Don't use dates as they are usually associated with SNAPSHOT (nightly) builds. If it's a third party artifact, you have to use their version number whatever it is, and as strange as it can look. eg. 2.0, 2.0.1, 1.3.1

  • Define value for property 'package': : eg. com.nttdata

    package As mentioned above, when a project is created from archetypes a basic structure fit for BDD approach is created. The package that will be specified will be the base/root package under which all other packages will be created (they follow Java naming & conventions)

  • Confirm properties configuration: eg. Y


✔️ And that's all there is to it!

The project should now be created in the current folder. You are now ready to start Using Cinnamon.

Take a look at the Basic workflow to understand your new project