-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
flatten-bom
configuration of flatten-maven-plugin
doesn't keep the parent
. This causes build failures for artifacts whose dependencies need to be resolved at runtime. Consider the following problem experienced in log4j-changelog-maven-plugin
:
log4j-changelog-maven-plugin
depends onlog4j-changelog
log4j-changelog
inherits fromlog4j-tools-parent
log4j-tools-parent
inherits fromlog4j-tools-bom
log4j-tools-bom
inherits fromlogging-parent
logging-parent
containsdependencyManagement
, etc. entries that are used bylog4j-changelog-maven-plugin
- Dependencies of
log4j-changelog-maven-plugin
et al. is resolved at runtime - Though at runtime, the deployed
log4j-tools-bom
is used, which is flattened and hence doesn't have a parent! - Hence, at runtime,
log4j-transform-maven-plugin
execution fails due to missing logic that should have been inherited fromlogging-parent
To avoid this, flatten-bom
configuration should better keep the parent using <parent>keep</parent>
in pomElements
block.