aeatonDev
aeatonDev

Reputation: 777

TFS 2015 Maven Build Step: Succeed even with Issues

I am using the Maven Build step and Maven tells me it has succeeded when I queue the build, however I still see errors in the issues section.

In the control section I do not have checked the option to Continue on Error.

Here are the build issues I am seeing:

  1. SLF4J: Class path contains multiple SLF4J bindings.
  2. SLF4J: Found binding in [jar:file:/C:/Windows/ServiceProfiles/NetworkService/.m2/repository/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  3. SLF4J: Found binding in [jar:file:/C:/Windows/ServiceProfiles/NetworkService/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.4.1/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  4. SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
  5. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

Per the documentation this is just a warning, however I would like it to fail on such warnings, how do I do that?

Upvotes: 0

Views: 289

Answers (1)

javapapo
javapapo

Reputation: 1342

Hi this is just a warning that notifies you that there are multiple jars in your configured classpath - that have SL4J binding implementations (to put it simply). Please look up the official documentation here.

You can try and modify the maven compiler plugin configuration to fail on warnings

<plugins>
    <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.3</version>
        <configuration>
            <source>1.8</source>
            <target>1.8</target>
            <showWarnings>true</showWarnings>
            <compilerArgs>
                <arg>-Xlint:all</arg>
                <arg>-Werror</arg>
            </compilerArgs>
        </configuration>
    </plugin>
</plugins>

Example taken from this question

Hope that helps

Upvotes: 1

Related Questions