Skip to content

fix(deps): build and release with dependencies from Airlock only - #2195

Merged
blakeli0 merged 2 commits into
mainfrom
fix-airlock-trusted-deps
Oct 20, 2026
Merged

blakeli0 merged 2 commits into
mainfrom
fix-airlock-trusted-deps

Conversation

@hj690

@hj690 hj690 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

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.4 and classworlds:1.1-alpha-2 — pulled in by clirr-maven-plugin:2.8 (clirr-compatibility-check profile is active on every JDK ≥ 1.8, and -Dclirr.skip=true does not stop plugin resolution).
  • plexus-i18n:1.0-beta-7 — pulled in by findbugs-maven-plugin:3.0.5 and maven-bundle-plugin:5.1.9 through doxia-site-renderer.
  • antlr:2.7.2 — pulled in by findbugs-maven-plugin:3.0.5 → velocity-tools → struts-core.

Fix

  • pom.xml and .kokoro/build.sh: make the clirr-compatibility-check profile opt-in. The CLIRR job in .kokoro/build.sh now enables it with -P=clirr-compatibility-check. The release scripts already pass -P=-clirr-compatibility-check, so they do not change.
  • pom.xml (pluginManagement): in findbugs-maven-plugin, override antlr to 2.7.7 and plexus-i18n to 1.0-beta-10.
  • pom.xml (pluginManagement): in maven-bundle-plugin, override plexus-i18n to 1.0-beta-10.
  • The plexus-i18n overrides exclude all transitive dependencies (*:*). The parent POM of plexus-i18n adds 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

  • The .class files and OSGi manifests of all release artifacts are byte-identical to main. Only the root pom.xml changes.
  • mvn install with tests passes on JDK 17: 738 tests, 0 failures, 2 skipped.
  • The CLIRR job command, mvn -P=clirr-compatibility-check clirr:check, still passes with 0 errors in 11 modules.

@hj690
hj690 requested a review from a team as a code owner October 19, 2026 13:50
@product-auto-label product-auto-label Bot added the size: m Pull request size is medium. label Oct 19, 2026
@hj690
hj690 marked this pull request as draft October 19, 2026 15:47
@hj690
hj690 force-pushed the fix-airlock-trusted-deps branch from 9a809b1 to 9a0c25e Compare October 19, 2026 18:09
@hj690
hj690 marked this pull request as ready for review October 19, 2026 18:26
Comment thread pom.xml
Comment on lines +398 to +400
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qq, this looks to be adding in a new plugin? Is this intended? Do we need maven-bundle-plugin?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>.

@hj690
hj690 requested review from blakeli0 and lqiu96 October 20, 2026 00:44

@lqiu96 lqiu96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, ty

@blakeli0
blakeli0 merged commit 8ca1243 into main Oct 20, 2026
28 checks passed
@blakeli0
blakeli0 deleted the fix-airlock-trusted-deps branch October 20, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants