-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: Define version of error_prone_annotations
in parent POM
#3785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This change explicitly defines the version of the `error_prone_annotations` dependency in the `log4j` parent POM. Previously, the version was inherited via the `error-prone.version` property from `logging-parent`. However, because the `log4j-bom` POM is flattened during publication, this property no longer resolves in consumer projects. Fixes #3779
This change explicitly defines the version of the `error_prone_annotations` dependency in the `log4j` parent POM. Previously, the version was inherited via the `error-prone.version` property from `logging-parent`. However, because the `log4j-bom` POM is flattened during publication, this property no longer resolves in consumer projects. Fixes #3779
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR explicitly defines the version of the error_prone_annotations
dependency in the log4j
parent POM to ensure consumers no longer inherit an undefined property when the BOM is flattened.
- Added a new
<error-prone-annotations.version>
property inlog4j-parent/pom.xml
- Updated the managed dependency to use the new property
- Extended the changelog entry to include issue 3779 and updated its description
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/changelog/.2.x.x/3758_fix_jspecify_dep.xml | Added issue 3779 and broadened the description for both fixes |
log4j-parent/pom.xml | Defined error-prone-annotations.version and updated dependency reference |
Comments suppressed due to low confidence (2)
src/changelog/.2.x.x/3758_fix_jspecify_dep.xml:9
- [nitpick] The changelog entry for issue 3779 is appended to a file named after issue 3758, which may be confusing. Consider creating a separate file (e.g.,
3779_fix_error_prone_annotations_version.xml
) or renaming the existing file to reflect both issue IDs.
<issue id="3779" link="https://github.com/apache/logging-log4j2/issues/3779"/>
log4j-parent/pom.xml:83
- [nitpick] The property name uses hyphens while the artifactId uses underscores (
error_prone_annotations
). For consistency and to avoid confusion, consider aligning the property name with the artifactId (e.g.,error_prone_annotations.version
).
<error-prone-annotations.version>2.38.0</error-prone-annotations.version>
Unfortunately, this PR did not resolve #3779. I mistakenly applied the new logging-log4j2/log4j-parent/pom.xml Lines 1110 to 1114 in 65d30ee
The Maven dependency configuration still relies on the inherited logging-log4j2/log4j-parent/pom.xml Lines 859 to 864 in 65d30ee
The intention behind introducing a separate This highlights a deeper issue: the problem is difficult to reliably reproduce or detect:
I'm open to suggestions on how we might better catch issues like this in the future—especially around metadata mismatches and flattened POM artifacts. |
This change explicitly defines the version of the
error_prone_annotations
dependency in thelog4j
parent POM.Previously, the version was inherited via the
error-prone.version
property fromlogging-parent
. However, because thelog4j-bom
POM is flattened during publication, this property no longer resolves in consumer projects.Fixes #3779