<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">You could look into modifying grade’s test classpath; something like:<div class=""><br class=""></div><div class=""><pre style="background-color: rgb(255, 255, 255); font-family: Menlo; font-size: 9pt;" class=""><span style="font-size: 9pt;" class="">configurations.</span><span style="font-size: 9pt; color: rgb(0, 128, 0); font-weight: bold;" class="">testRuntime</span><span style="font-size: 9pt;" class="">.exclude(</span><span style="font-size: 9pt; color: rgb(0, 128, 0); font-weight: bold;" class="">group</span><span style="font-size: 9pt;" class="">: </span><span style="font-size: 9pt; color: rgb(0, 128, 0); font-weight: bold;" class="">'org.apache.logging.log4j'</span><span style="font-size: 9pt;" class="">, </span><span style="font-size: 9pt; color: rgb(0, 128, 0); font-weight: bold;" class="">module</span><span style="font-size: 9pt;" class="">: </span><span style="font-size: 9pt; color: rgb(0, 128, 0); font-weight: bold;" class="">'log4j-slf4j-impl'</span><span style="font-size: 9pt;" class="">)</span></pre><div class=""><br class=""></div></div><div class=""><div style="orphans: 2; widows: 2;" class=""><font color="#222222" face="Inconsolata, Monaco, Lucida Console, Courier New, monospace" class=""><span style="font-size: 14px; white-space: pre; background-color: rgb(248, 248, 248);" class=""><br class=""></span></font></div><div><blockquote type="cite" class=""><div class="">On 25 Oct 2016, at 23:11, Mike Mills <<a href="mailto:mike@themills.id.au" class="">mike@themills.id.au</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I am trying to use a gradle build to use log4j2 as the runtime implementation and slf4j-test as the test configuration.<div class=""><br class=""></div><div class="">In a standard gradle build this means that both the log4j2 and slf4j-test StaticLoggerBinders end up on the classpath during tests and there is no guarantee that the slf4j-test jars are used. (The build works on my windows machine but fails on the Solaris/Jenkins).</div><div class=""><br class=""></div><div class="">Is there a way to force slf4j to choose the slf4j-test library? </div><div class=""><br class=""></div><div class="">Alternatively, would it make sense to modify slf4j to ALWAYS use the slf4j-test library if it is on the classpath?</div><div class=""><br class=""></div><div class="">Cheers for any suggestions.</div></div>
_______________________________________________<br class="">slf4j-user mailing list<br class=""><a href="mailto:slf4j-user@qos.ch" class="">slf4j-user@qos.ch</a><br class="">http://mailman.qos.ch/mailman/listinfo/slf4j-user</div></blockquote></div><br class=""></div></body></html>