ppkarwasz commented on issue #3437:
URL: 
https://github.com/apache/logging-log4j2/issues/3437#issuecomment-2640456549

   @jjohannes,
   
   > (1) This was already discussed 
[here](https://github.com/apache/logging-log4j2/issues/3110#issuecomment-2423586754).
 The dependencies marked as `<provided>` 
[here](https://github.com/apache/logging-log4j2/blob/94d3227165f22993c126c9ec19f3ddc03abe967c/log4j-parent/pom.xml#L829-L858)
 would need to be switched to `<compile>`. But that has the unwanted effect 
that ALL users will get them as unnecessary RUNTIME dependencies. There is the 
option to publish additional [Gradle 
Metadata](https://github.com/gradle/gradle/blob/master/platforms/documentation/docs/src/docs/design/gradle-module-metadata-latest-specification.md)
 that supports the `compileOnlyApi` scope. If you are interested, I can make a 
contribution for that as I maintain the [Maven plugin for publishing such 
metadata with 
Maven](https://github.com/jjohannes/gradle-module-metadata-maven-plugin) (it's 
used by Jackson for example). But I can understand if you don't want to have 
additional complexity in your build setup.
   
   Please submit a PR, 🥺 . I found out about your 
`gradle-module-metadata-maven-plugin` a couple of weeks ago, but I didn't have 
the time to check how it works.
   
    
   > (2) Maybe you can check if the additional requires could be added to all 
`module-info`:
   > 
   > ```
   >     requires static transitive com.google.errorprone.annotations;
   >     requires static transitive com.github.spotbugs.annotations;
   >     requires static transitive biz.aQute.bnd.annotation;
   >     requires static transitive org.osgi.annotation.bundle;
   > ```
   > 
   > *`requires static` works also, but conceptually `requires static 
transitive` feels more correct as the annotations are transitively visible.
   
   A `requires static transitive` statement has some unwanted effects. When you 
compile using the module path, JPMS recursively enumerates all the modules 
marked as `transitive` and fails if one is missing. After your changes Gradle 
users will not be affected by this problem, but Maven users will. See #2929 for 
example.


-- 
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: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to