You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 on log4j-changelog
log4j-changelog inherits from log4j-tools-parent
log4j-tools-parent inherits from log4j-tools-bom
log4j-tools-bom inherits from logging-parent
logging-parent contains dependencyManagement, etc. entries that are used by log4j-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 from logging-parent
To avoid this, flatten-bom configuration should better keep the parent using <parent>keep</parent> in pomElements block.
The text was updated successfully, but these errors were encountered:
$ git clone https://github.com/apache/logging-log4j-tools.git && cd $_
$ git checkout 18425d95a4d150de905929d55bf55545d70f3d91
$ ./mvnw -N log4j-changelog:export@export-changelog -X
...
[INFO] --- log4j-changelog:0.5.0:export (export-changelog) @ log4j-tools-bom ---
[WARNING] The POM for org.apache.logging.log4j:log4j-changelog:jar:0.5.0 is invalid, transitive dependencies (if any) will not be available: 2 problems were encountered while building the effective model for org.apache.logging.log4j:log4j-changelog:0.5.0
[ERROR] 'dependencies.dependency.version' for org.osgi:osgi.annotation:jar is missing. @
[ERROR] 'dependencies.dependency.version' for com.github.spotbugs:spotbugs-annotations:jar is missing. @
flatten-bom
configuration offlatten-maven-plugin
doesn't keep theparent
. This causes build failures for artifacts whose dependencies need to be resolved at runtime. Consider the following problem experienced inlog4j-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
log4j-changelog-maven-plugin
et al. is resolved at runtimelog4j-tools-bom
is used, which is flattened and hence doesn't have a parent!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>
inpomElements
block.The text was updated successfully, but these errors were encountered: