I have tried to execute the example you propose in your post, but there seems to be an error.
I have created the files included in this post, but when I execute
$ mvn test
I get the following error:
[ERROR] /home/my_name/dev/tests/cucumber-primer/model/src/test/java/se/waymark/rentit/steps/RentStepdefs.java:[6,29] error: package cucumber.annotation.en does not exist
In your pom.xml you use cucumber-java 1.1.1, as it says:
But version 1.1.1 of cucumber-java des not contain cucumber.annotation.en
So I think you mixed two versions of the example in the post, including a pom.xml that is newer than the .java. I have tried to use 1.0.1, 1.0.2, 1.0.7, … of the dependencies, but then a different error appears.
Could you please correct me if I’m wrong or specify the right version of modules?
I obviously made a mistake when I wanted to build the example in small steps. I had prepared an intermediate step that actually wasn’t compiled with the blog post. The other steps has been compiled when I built the blog post. I forgot to update this intermediate step when I updated to a newer version of Cucumber.