apache / logging-parent

Parent project internally used in Maven-based projects of the Apache Logging Services
https://logging.apache.org/logging-parent
Apache License 2.0
2 stars 6 forks source link

Retain `project.build.outputTimestamp` property while trimming BOM #121

Closed vy closed 6 months ago

vy commented 8 months ago

flatten-bom execution inlines all properties and removes the <properties> block. While this is a good BOM practice, it causes following warnings during build:

project.build.outputTimestamp property should not be inherited but defined in parent POM from reactor /home/vy/Projects/logging-dist-dev/log4j/3.0.0-beta2-src/.flattened-pom.xml

Preferably, project.build.outputTimestamp property should be an exempt to BOM trimming and left as is.

vy commented 6 months ago

This turned out to be pretty difficult to implement – fact checked this in #maven. AFAIC, we don't have a choice but to keep only the project.build.outputTimestamp property to avoid the warning. Though ElementHandling of flatten-maven-plugin is pretty limited. I am not able to see a way out except transforming the generated .flattened-pom.xml one more time to add the missing p.b.o property, and this, AFAIC, necessitates a very ugly beanshell-maven-plugin block which I am very reluctant to introduce.

I flirted with the idea of asking help from flatten-maven-plugin developers. But judging from their open tickets, the project is barely floating.

In short, due to the complexity involved in solving this problem, I am closing this issue. Feel free to re-open it, if you have a better idea.