Trying to run cucumber tests using POM file | Selenium Forum
M
Posted on 11/02/2016
Tried running cucumber tests using POM file but build is failing with below error -

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Not a file or directory: C:\Users\vkumar30\dwptest\tags
at cucumber.runtime.io.FileResourceIterator$FileIterator.<init>(FileResourceIterator.java:54)
at cucumber.runtime.io.FileResourceIterator.<init>(FileResourceIterator.java:20)
at cucumber.runtime.io.FileResourceIterable.iterator(FileResourceIterable.java:19)
at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:38)
at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:117)
at cucumber.runtime.Runtime.run(Runtime.java:92)
at cucumber.api.cli.Main.run(Main.java:20)
at cucumber.api.cli.Main.main(Main.java:12)
... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.596 s
[INFO] Finished at: 2016-02-11T11:50:26+00:00
[INFO] Final Memory: 19M/290M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default) on project dwptest: An exception occured while executing the
Java class. null: InvocationTargetException: Not a file or directory: C:\Users\vkumar30\dwptest\tags -> [Help 1]


Any help is much appreciated.

NOTE: This is in reference with Video 42 from your tutorial. Let me know if more info needed

M
Replied on 11/02/2016

you project is not able to find the file

[color=#FF0000:1vaah9pu]Caused by: java.lang.IllegalArgumentException: Not a file or directory: C:\Users\vkumar30\dwptest\tags[/color:1vaah9pu]


M
Replied on 15/02/2016

I have just put a "--" before the tags and it worked fine. but in the video recording it doesnt say that so was not sure.......while I moved on then I saw in another video you have added a "--" against tags.

Not sure what difference does it makes....or it just commented?


M
Replied on 15/02/2016

use these

<!-- -->