-
Notifications
You must be signed in to change notification settings - Fork 7
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-plugindepends onlog4j-changeloglog4j-changeloginherits fromlog4j-tools-parentlog4j-tools-parentinherits fromlog4j-tools-bomlog4j-tools-bominherits fromlogging-parentlogging-parentcontainsdependencyManagement, etc. entries that are used bylog4j-changelog-maven-plugin- Dependencies of
log4j-changelog-maven-pluginet al. is resolved at runtime - Though at runtime, the deployed
log4j-tools-bomis used, which is flattened and hence doesn't have a parent! - Hence, at runtime,
log4j-transform-maven-pluginexecution 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.