Repository navigation
[main] Add transitive compileOnlyApi dependencies (#3450 port) - #4510
Open
guru-bharadwaj20 wants to merge 1 commit into
Open
guru-bharadwaj20 wants to merge 1 commit into
guru-bharadwaj20 wants to merge 1 commit into
Conversation
…pache#3450 port) Port of apache#3450 to main. The annotation libraries that log4j-parent declares with provided scope are now added as compileOnlyApi dependencies in the Gradle Module Metadata and as 'requires static' directives in the generated module-info. Fixes apache#3600
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports #3450 to
main, as asked in #3600.The annotation libraries that
log4j-parentdeclares withprovidedscope (bnd, Error Prone, JSpecify, OSGi bundle and versioning, SpotBugs) are now:compileOnlyApidependencies in the Gradle Module Metadata, throughgradle-module-metadata-maven-pluginbnd-jpms-module-info, so bnd writesrequires staticfor them in the generatedmodule-infoI used the current 2.x version of the change, with plugin version 1.2. Unlike 2.x,
mainstill depends onspotbugs-annotations, so it stays in both lists, as it was in the original #3450. JSpecify isn't in the module list because bnd already emitsrequires static org.jspecifyonmain.What I checked, building
log4j-corewith./mvnw -pl log4j-core -am install -DskipTests:module-info.classoflog4j-corenow hasrequires staticforbiz.aQute.bnd.annotation,com.github.spotbugs.annotations,com.google.errorprone.annotations,org.osgi.annotation.bundleandorg.osgi.annotation.versioning. A build ofmainwithout the change has none of them.log4j-core-3.0.0-SNAPSHOT.modulelists the six libraries inapiElementsand not inruntimeElements../mvnw -pl log4j-parent,log4j-core spotless:checkand./mvnw -pl log4j-core -am verify -DskipTestspass.Added a changelog entry in
src/changelog/.3.x.x.Fixes #3600