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

   Hi @sasidhar-chittumuru-jemmic,
   
   Great catch—thank you! This issue is related to #3758 and will be addressed 
in the upcoming `2.25.1` release, scheduled for early July.
   
   ### Root Cause
   
   The problem originates from our use of the Flatten Maven Plugin, which 
strips unnecessary elements from our POMs before they are published. The 
`log4j-bom` POM is significantly flattened, and in the process, its link to the 
`logging-parent`—which defines the `error-prone.version` property—is lost.
   
   This issue isn't detected during the build because Maven computes the 
effective model of all modules in the reactor **before** any plugin (including 
flattening) is executed. As a result, the build sees the correct model, but the 
published POM is missing required metadata, leading to problems for consumers.
   
   ### Possible Solutions
   
   One way to catch this kind of issue would be to also flatten the `log4j` 
parent POM. Since the Flatten Maven Plugin would use the already-flattened 
`log4j-bom`, the missing `error-prone.version` would be detected as an error. 
However, this isn't a clean solution: flattening `log4j` would remove its own 
link to `log4j-bom`, introducing a different set of problems for child 
artifacts.
   
   For now, the most pragmatic solution is to explicitly define 
`error-prone.version` in both `log4j` and `logging-parent`. This will restore 
stability without requiring deeper structural changes.
   
   Longer term, we plan to resolve this class of issues more comprehensively by 
migrating to Maven 4 (#3780), which introduces a formal separation between 
build and consumer POMs, making this kind of workaround unnecessary.
   
   


-- 
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