veithen commented on PR #980:
URL: https://github.com/apache/ws-axiom/pull/980#issuecomment-6528960931

   Thanks for tracking this down. Adding an SLF4J binding looks like the right 
fix, but I'd suggest a different binding.
   
   `slf4j-jdk14` in `eclipse-tests` and `osgi-tests` isn't really a 
project-wide convention. Those modules run under Pax Exam, and `slf4j-jdk14` is 
provisioned into the OSGi container as a bundle through the `alta-maven-plugin` 
link files (see `BlueprintTest`, which loads `slf4j.api.link` and 
`slf4j.jdk14.link`).
   
   The non-OSGi test modules (`jaxws-tests`, `spring-ws-tests` and 
`spring-ws-testsuite`) use Log4j 2 instead, with these test-scoped dependencies 
(versions come from `log4j-bom` in the root POM):
   
   ```xml
   <dependency>
       <groupId>org.apache.logging.log4j</groupId>
       <artifactId>log4j-jcl</artifactId>
       <scope>test</scope>
   </dependency>
   <dependency>
       <groupId>org.apache.logging.log4j</groupId>
       <artifactId>log4j-slf4j2-impl</artifactId>
       <scope>test</scope>
   </dependency>
   <dependency>
       <groupId>org.apache.logging.log4j</groupId>
       <artifactId>log4j-core</artifactId>
       <scope>test</scope>
   </dependency>
   ```
   
   Each also has a `src/test/resources/log4j2-test.xml` with a console appender 
and the root level at `warn`. Could you do the same in `wss4j-tests` and copy 
that config file from `jaxws-tests`? That gives SLF4J a binding, which should 
fix the `CryptoFactory` initialization on Semeru, and keeps logging consistent 
with the other plain JUnit test modules.
   
   A small note on the description: `org.slf4j.impl.StaticLoggerBinder` is how 
SLF4J 1.x finds a binding, but we import `slf4j-bom` 2.0.20, and SLF4J 2.x 
finds providers through `ServiceLoader`. It might be worth checking which 
`slf4j-api` version actually ends up on the test classpath and updating the 
explanation to match. This doesn't change the fix.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to