small medium large xlarge

26 Feb 2017, 22:38
Timothy Rowe (1 post)

In chapter 4, the box on dependency management part 2, we (supposedly) finish setting up pom.xml and the text says “From now on, when we want to build our projects and run our tests, we’ll use Maven: mvn clean test”

I’d already put the feature file in the features directory, but when I execute mvn clean test it doesn’t seem to find the feature file. It says it’s skipping the non-existent resource directory src/test/resources, which looks like a likely place for the feature file, but putting it in there doesn’t seem to do anything either (I’m expecting get a list of the steps I need to define).

How do I tell Maven where to look for the feature files? (And the step definition files - I bet that will be the next problem I have)?

27 Feb 2017, 18:41
Seb Rose (21 posts)

Hi Timothy,

Have you had a look at the source code for the book (

Can you see any obvious differences between your POM or project structure and the sample code in the zip file?

If the problem persists could you share your POM (maybe as a Gist) and describe your overall folder structure.

Thanks Seb

23 Aug 2017, 12:26
Marco Ippolito (1 post)

Hi all, I’ve download the code and I try to compile and run test in “/step_definitions_inside/01” directory with ‘mvn clean test’ command.

It compile but doesn’t run test: on consolle I can see only compiling LOG and message for test session. After this I wait for many minutes without see anything: I need to use CRL+c to get prompt…

this is LOG printout:

$ mvn clean test
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Cucumber-JVM Book ATM Example 1.0
[INFO] ------------------------------------------------------------------------
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ atm-example ---
[INFO] Deleting C:\Users\emaripp\CucumberLearning\step_definitions_inside\01\target
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ atm-example ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\emaripp\CucumberLearning\step_definitions_inside\01\src\main\resources
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ atm-example ---
[INFO] No sources to compile
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ atm-example ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ atm-example ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 2 source files to C:\Users\emaripp\CucumberLearning\step_definitions_inside\01\target\test-classes
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ atm-example ---
[INFO] Surefire report directory: C:\Users\emaripp\CucumberLearning\step_definitions_inside\01\target\surefire-reports

 T E S T S

Anyone have any idea why this happened?

31 Aug 2017, 10:15
Seb Rose (21 posts)

Hi Marco,

Sorry for the delay in responding.

Is this the first of the sample code that you have tried? Have you managed to run any of the examples?

I just downloaded the sample again and it ran as expected, so we need to work out what is different about your situation. I used the same Maven plugin versions as shown in your post - the only difference that is obvious is the encoding warnings. So, please add the following line to the <properties> section of pom.xml:


Do you still get the same problem?



You must be logged in to comment