damianszczepanik / maven-cucumber-reporting

maven mojo for cucumber reporting
GNU Lesser General Public License v2.1
122 stars 111 forks source link

No log4j2 configuration file found. #56

Closed restagner closed 7 years ago

restagner commented 7 years ago

I've just updated to version 3.1.0 of maven-cucumber-reporting. After the update, I am now seeing the following error message

[INFO] 
[INFO] --- maven-cucumber-reporting:3.1.0:generate (execution) @ residuals-web ---
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
[INFO] About to generate Cucumber report.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

What's meant by ERROR StatusLogger No log4j2 configuration file found?

NOTE, the cucumber report is successfully generated.

damianszczepanik commented 7 years ago

It complains about that logging configuration file is missing. Don't know why at the Error severity.

cbaldan commented 7 years ago

@restagner I read somewhere, in a blog, that if you add a simple log4j2.properties file in your resources folder will silence that message. I've been seeing this error since I started using this plugin, it might be missing inside it.

damianszczepanik commented 7 years ago

I didn't put this file as I prefer to have default log4j configuration or let user to configure it. This is only about logging so there is no need to worry

restagner commented 7 years ago

@damianszczepanik

It would appear that the conflict arises because I am using version 1.7.2 of log4j whereas the cucumber-reporting project uses version 2.6.2 of log4j. Here's the dependency tree output when executed on my project

mvn clean dependency:tree
[INFO] +- net.masterthought:maven-cucumber-reporting:jar:3.1.0:compile
[INFO] |  +- org.apache.maven.plugins:maven-gpg-plugin:jar:1.6:compile
[INFO] |  |  +- org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
[INFO] |  |  \- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile
[INFO] |  |     \- org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[INFO] |  \- net.masterthought:cucumber-reporting:jar:3.1.0:compile
[INFO] |     +- org.apache.logging.log4j:log4j-api:jar:2.6.2:compile
[INFO] |     +- org.apache.logging.log4j:log4j-core:jar:2.6.2:compile
[INFO] |     +- org.apache.velocity:velocity:jar:1.7:compile
[INFO] |     +- velocity-tools:velocity-tools:jar:1.4:compile
[INFO] |     +- joda-time:joda-time:jar:2.9.4:compile
[INFO] |     +- commons-io:commons-io:jar:2.5:compile
[INFO] |     +- net.lingala.zip4j:zip4j:jar:1.3.2:compile
[INFO] |     \- org.jsoup:jsoup:jar:1.9.2:compile

NOTE, that cucumber-reporting uses 2.6.2. So, I guess the bottom-line is that I will continue to live with the ERROR until I upgrade my project from log4j 1.7.2 to 2.6.2