Repository navigation
fix(deps): build and release with dependencies from Airlock only - #2195
Conversation
9a809b1 to
9a0c25e
Compare
| <groupId>org.apache.felix</groupId> | ||
| <artifactId>maven-bundle-plugin</artifactId> | ||
| <version>5.1.9</version> |
There was a problem hiding this comment.
qq, this looks to be adding in a new plugin? Is this intended? Do we need maven-bundle-plugin?
There was a problem hiding this comment.
I think maven-bundle-plugin is used in multiple sub-modules, and this is supposed to be the parent that override dependencies.
That being said, I think we should remove the version declaration in submodules (e.g. here) so it is less confusing.
There was a problem hiding this comment.
Thank you both for the review!
@lqiu96 , yes as Blake mentioned, maven-bundle-plugin is already used by google-http-client, google-http-client-apache-v2, and google-http-client-apache-v5, adding this in the root pom.xml lets the parent POM centrally override its transitive plexus-i18n dependency (1.0-beta-7 -> 1.0-beta-10) without repeating the override in all three modules.
Thanks for the suggestion @BlakeLi, I updated in a9559fa to remove the duplicate <version>5.1.9</version> declarations from the three child pom.xml files so they inherit the version from the parent <pluginManagement>.
Context
MOSS requires that we build and release this repo with dependencies only from Airlock (
maven-3p-trusted), not from Maven Central. This PR fixes the repository-side plugin blockers for that goal (b/572892413).Problem
There are 4 legacy build-plugin artifacts have no valid license, and rejected by Airlock:
plexus-components:1.1.4andclassworlds:1.1-alpha-2— pulled in byclirr-maven-plugin:2.8(clirr-compatibility-checkprofile is active on every JDK ≥ 1.8, and-Dclirr.skip=truedoes not stop plugin resolution).plexus-i18n:1.0-beta-7— pulled in byfindbugs-maven-plugin:3.0.5andmaven-bundle-plugin:5.1.9throughdoxia-site-renderer.antlr:2.7.2— pulled in byfindbugs-maven-plugin:3.0.5→velocity-tools→struts-core.Fix
pom.xmland.kokoro/build.sh: make theclirr-compatibility-checkprofile opt-in. The CLIRR job in.kokoro/build.shnow enables it with-P=clirr-compatibility-check. The release scripts already pass-P=-clirr-compatibility-check, so they do not change.pom.xml(pluginManagement): infindbugs-maven-plugin, overrideantlrto2.7.7andplexus-i18nto1.0-beta-10.pom.xml(pluginManagement): inmaven-bundle-plugin, overrideplexus-i18nto1.0-beta-10.plexus-i18noverrides exclude all transitive dependencies (*:*). The parent POM ofplexus-i18nadds old Plexus container JARs that Airlock does not have, and Maven core already provides those classes.No published module POMs or runtime dependencies are modified.
Testing and verification
.classfiles and OSGi manifests of all release artifacts are byte-identical tomain. Only the rootpom.xmlchanges.mvn installwith tests passes on JDK 17: 738 tests, 0 failures, 2 skipped.mvn -P=clirr-compatibility-check clirr:check, still passes with 0 errors in 11 modules.