allure-framework / allure-java

Allure integrations for Java test frameworks
Apache License 2.0
355 stars 224 forks source link

🐞: JavaDocDescriptionsProcessor prints Slf4J warnings during compilation #962

Closed rPraml closed 10 months ago

rPraml commented 1 year ago

What happened?

When the JavaDocDescriptionsProcessor is active, it prints

[INFO] Changes detected - recompiling the module! :dependency
[INFO] Compiling 22 source files with javac [debug target 17] to target/test-classes
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

This happens, because at this stage (during compile time!), there is no valid SLF4J setup.

The question is, why is the logger using Slf4J at all...

This happens, because it is initialized in ResultsUtil grafik

As far as I see, it has only a dependency to io.qameta.allure.util.ResultsUtils.generateMethodSignatureHash IMHO AnnotationProcessors should have as few dependencies as possible as they have to be loaded at compile time.

If you think so, I can try to provide a PR where the generateMethodSignatureHash code is inlined, so that the processor has no external dependencies.

What Allure Integration are you using?

allure-descriptions-javadoc

What version of Allure Integration you are using?

2.24.0

What version of Allure Report you are using?

2.24.0

Code of Conduct