To share logback configuration between multiple projects we embed our logback.xml file within a common jar. e.g. **mylogger.jar**. Projects depend upon this jar for logging hence it's always on the classpath. This means the logback.xml will be found as documented at

<https://logback.qos.ch/manual/configuration.html#auto_configuration>

However if another jar, e.g. **otherlib.jar**, also embeds a logback.xml file we'll see a warning 

```
09:27:03,122 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
09:27:03,122 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
09:27:03,122 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/WEB-INF/lib/mylogger.jar/logback.xml]
09:27:03,123 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
09:27:03,123 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/WEB-INF/lib/mylogger.jar/logback.xml]
09:27:03,123 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/WEB-INF/lib/otherlib.jar/logback.xml]

```

Worse sometimes it does not pick the correct logback.xml as this behavior is non-deterministic according to [Controlling the classpath in a servlet](https://stackoverflow.com/questions/264828/controlling-the-classpath-in-a-servlet).

Is there any mechanism to force the warning to fail a build? This'll alert us to the above scenario whereas a warning can be ignored.