You are receiving this error because cucumber
or its dependencies are using log4j
for logging and since there is no log4j
configuration file so log4j
is printing such message.
If there is no log4j
configuration file, log4j
uses configuration similar to below -
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configuration>
<Configuration status="warn" name="xml_configuration">
<Appenders>
<Console name="consoleLogger" target="SYSTEM_OUT">
<PatternLayout
pattern="[%level] %m%n" />
</Console>
</Appenders>
<Loggers>
<Root level="error" additivity="false">
<appender-ref ref="consoleLogger" />
</Root>
</Loggers>
</Configuration>
Adding above configuration in /src/main/resources/log4j2.xml
will have same result as having no log4j2.xml
file.
Another way to try is to pass log4j2.xml
file to maven directly without putting it in project classpath. Something like below -
set MAVEN_OPTS="-Dlog4j.configurationFile=file:///path/to/log4j2.xml"
mvn verify