Prevent rogue slf4j-impl coming from wildfly-elytron-2.2.2.Final.jar
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
97ca925620
commit
36a80b9622
|
@ -61,6 +61,9 @@ public class StacklessLogging implements AutoCloseable
|
|||
|
||||
public StacklessLogging(Class<?>... classesToSquelch)
|
||||
{
|
||||
if (loggerFactory == null)
|
||||
return;
|
||||
|
||||
for (Class<?> clazz : classesToSquelch)
|
||||
{
|
||||
JettyLogger jettyLogger = loggerFactory.getJettyLogger(clazz.getName());
|
||||
|
@ -77,6 +80,9 @@ public class StacklessLogging implements AutoCloseable
|
|||
|
||||
public StacklessLogging(Package... packagesToSquelch)
|
||||
{
|
||||
if (loggerFactory == null)
|
||||
return;
|
||||
|
||||
for (Package pkg : packagesToSquelch)
|
||||
{
|
||||
JettyLogger jettyLogger = loggerFactory.getJettyLogger(pkg.getName());
|
||||
|
@ -93,6 +99,9 @@ public class StacklessLogging implements AutoCloseable
|
|||
|
||||
public StacklessLogging(Logger... logs)
|
||||
{
|
||||
if (loggerFactory == null)
|
||||
return;
|
||||
|
||||
for (Logger log : logs)
|
||||
{
|
||||
if (log instanceof JettyLogger && !log.isDebugEnabled())
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -337,7 +337,7 @@
|
|||
<plexus-xml.version>4.0.3</plexus-xml.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<settingsPath>src/it/settings.xml</settingsPath>
|
||||
<slf4j.version>2.0.5</slf4j.version>
|
||||
<slf4j.version>2.0.9</slf4j.version>
|
||||
<spotbugs.maven.plugin.version>4.8.2.0</spotbugs.maven.plugin.version>
|
||||
<springboot.version>2.1.1.RELEASE</springboot.version>
|
||||
<surefire.rerunFailingTestsCount>0</surefire.rerunFailingTestsCount>
|
||||
|
|
|
@ -33,6 +33,15 @@
|
|||
<artifactId>jetty-home</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>pom</type>
|
||||
<exclusions>
|
||||
<!-- Introduces test scope dependencies that shouldn't be present during testing.
|
||||
Such as: older slf4j-api classes,
|
||||
or a slf4j-impl (in wildfly-elytron-2.2.2.Final.jar!/org/slf4j/ILoggerFactory.class) -->
|
||||
<exclusion>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>infinispan-remote-query</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
|
|
|
@ -47,6 +47,7 @@ import org.eclipse.jetty.toolchain.test.IO;
|
|||
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
||||
import org.eclipse.jetty.toolchain.test.jupiter.WorkDir;
|
||||
import org.eclipse.jetty.toolchain.test.jupiter.WorkDirExtension;
|
||||
import org.eclipse.jetty.util.component.LifeCycle;
|
||||
import org.eclipse.jetty.util.resource.PathResource;
|
||||
import org.eclipse.jetty.webapp.AbstractConfiguration;
|
||||
import org.eclipse.jetty.webapp.Configuration;
|
||||
|
@ -126,7 +127,7 @@ public class DeploymentErrorTest
|
|||
{
|
||||
if (stacklessLogging != null)
|
||||
stacklessLogging.close();
|
||||
server.stop();
|
||||
LifeCycle.stop(server);
|
||||
}
|
||||
|
||||
private void copyBadApp(String sourceXml, Path docroots)
|
||||
|
|
Loading…
Reference in New Issue