In the java-ee maven project, I have a desire to use slf4j with logback, however I believe that including the "Glassfish-embedded-all" artifact from org.glassfish.extras leads to the fact that JDK14LoggerAdapter is used instead.
Removing this artifact will cause logging to work properly, but it will lead to test failures due to java-ee api problems, as described in this question - Testing for the Java EE 6 API .
The exact pom entry causing the problem, I suppose, is this:
<dependency>
<groupId>org.glassfish.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.1</version>
<scope>test</scope>
</dependency>
Is there a way to configure slf4j to use logging? Or is there a better way to test java code?
source
share