When running mvn verify
I am getting below message:
I already put the log4j2.xml
under src/test/resources
(but not in src/main/resources
because I do not want it to ship with actual app) as suggested here to no avail.
The HTML report is generated, the log file is written, and the build is successful as seen above. I am unsure where the error is coming from.
According http://logging.apache.org/log4j/2.x/manual/configuration.html#AutomaticConfiguration adding log4j2.xml
to classpath should help.
If a JSON file cannot be located the XML ConfigurationFactory will try to locate log4j2.xml on the classpath.
So if you still get ERROR message problem not with your sources. It looks like problem in maven-cucumber-reporting
plugin. As described here http://maven.apache.org/guides/mini/guide-maven-classloading.html
Please note that the plugin classloader does neither contain the dependencies of the current project nor its build output.
If maven plugin cannot find any log4j configuration in its own classpath (which is not including your sources/resources) you will see error messages. So yes, the only solution wait for release with fix https://github.com/damianszczepanik/cucumber-reporting/issues/675
You use the latest Cucumber version 3.15.0 (at the time of writing this). Your problem was resolved as issue #675. There was a commit from a pull request meant to fix this problem, but probably you have to wait until the next version is released in order to profit from it - or build a snapshot version locally and see if it also fixes the problem for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With