Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5961

Maven possibly not aware of log4j2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.9
    • 3.5.0-alpha-1, 3.5.0
    • Logging
    • None

    Description

      Using a fresh install of maven 3.3.9 I followed the steps at https://garygregory.wordpress.com/2015/03/23/watch-maven-in-color to add color highlighting to my output. Everything works as expected, however on all usages I would get the warning:

      [WARN] The SLF4J binding actually used is not supported by Maven: org.apache.logging.slf4j.Log4jLoggerFactory
      [WARN] Maven supported bindings are:
      [WARN] (from jar:file:/opt/apache-maven-3.3.9/lib/maven-embedder-3.3.9.jar!/META-INF/maven/slf4j-configuration.properties)
      - ch.qos.logback.classic.LoggerContext
      - org.slf4j.helpers.Log4jLoggerFactory
      - org.slf4j.impl.SimpleLoggerFactory
      

      This looks pretty harmless, and I was able to suppress it by manually adding the line

      org.apache.logging.slf4j.Log4jLoggerFactory org.apache.maven.cli.logging.impl.Log4j2Configuration
      

      to /META-INF/maven/slf4j-configuration.properties in maven-embedder-3.3.9.jar.

      I'm not sure that this is a "correct" solution, and I'm not even confident I could explain what effect it has, hence not posting a patch, but somebody with more knowledge might be able to triage this better. Or offer an "official" way to do colorized output.

      Attachments

        Issue Links

          Activity

            People

              aheritier Arnaud Heritier
              mdrob Mike Drob
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: