Re: jspecify dependency
"Piotr P. Karwasz" <[email protected]> Sun, 8 Sep 2024 09:47:25 +0200
| Newsgroups | gmane.comp.jakarta.log4j.user |
|---|---|
| Message-ID | <CAFmygFbke3EP0CT-2gaZLgB95MddEqTYLivnwNdra6-6RXTtnw@mail.gmail.com> |
Hi PJ, On Sun, 8 Sept 2024 at 02:40, PJ Fanning <[email protected]> wrote: > Is there any guidance on what log4j 2.24.0 users need to do regarding org.jspecify dependency. I've never had to add this dependency before - this is the first time I've ever come across the jspecify project. JSpecify is an annotation library, so we marked the module as `static` (optional`) in JPMS and `provided` in Maven. Unfortunately BND added the `transitive` JPMS keyword, which I didn't notice. One of the side-effects of `transitive` is that the compiler requires the dependency at compile-time (but not at runtime, where `static` rules). You can workaround the issue by adding: compileOnly 'org.jspecify:jspecify:1.0.0` to your Gradle dependencies and a `requires static org.jspecify;` (but not `transitive`) to your module descriptors. This should allow you to compile Apache POI without propagating the problem to POI's users. There is a Github issue for this[1]. I'll fix it in `2.24.1`. Piotr [1] https://github.com/apache/logging-log4j2/issues/2929