Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request configures the 'maven-enforcer-plugin' to skip the 'enforce-banned-duplicate-classes' execution in the POM-only modules 'gax-bom' and 'first-party-dependencies'. This prevents "No rules are configured" errors during build execution due to inheriting a released version of 'google-cloud-shared-config' that does not define this rule. I have no feedback to provide.
…and gax-bom In googleapis#14142 and googleapis#14272, the enforcer was split into a fast PR check (enforce) and a release check (enforce-banned-duplicate-classes). Modules without this execution ID or rules fail with "No rules are configured". - For first-party-dependencies: Update parent to the in-repo google-cloud-shared-config (1.22.0-SNAPSHOT) with relativePath and {x-version-update} tag, matching the configuration in sdk-platform-java-config and grpc-gcp-java. - For gax-bom: Skip enforce-banned-duplicate-classes because it inherits a released version of google-cloud-shared-config (1.17.0) from Central to prevent cross-groupId (com.google.api vs com.google.cloud) publication-ordering issues.
blakeli0
force-pushed
the
fix/ban-duplicate-classes-pom-modules
branch
from
September 23, 2026 20:28
bd2d03a to
957f7bc
Compare
This branch has not been deployed
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.
Summary
Fixes
No rules are configurederrors encountered in theban-duplicate-classesworkflow onfirst-party-dependenciesandgax-bom(e.g. in release PR #14491).Background
In #14142 and #14272, the enforcer plugin was split into:
enforce(fast metadata rules for PRs)enforce-banned-duplicate-classes(runsbanDuplicateClasseson release branches viamvn -B -ntp enforcer:enforce@enforce-banned-duplicate-classes -T 1C)When invoking a specific Maven execution ID across a multi-module reactor (
plugin:goal@executionId), Maven creates an empty ad-hoc execution for any module that does not define that execution ID. Becausemaven-enforcer-pluginrequires at least one rule (orskip=true), this caused theban-duplicate-classesjob to fail on:Changes
first-party-dependencies: Updates the parent to the in-repogoogle-cloud-shared-config(1.22.0-SNAPSHOT) withrelativePathand the{x-version-update}tag. Both sharegroupId: com.google.cloudand are staged/released together, matching the pattern insdk-platform-java-configandgrpc-gcp-java.gax-bom: Adds an explicit skip forenforce-banned-duplicate-classes.gax-bomhasgroupId: com.google.api(different fromcom.google.cloud) and retains a releasedgoogle-cloud-shared-configparent from Central to avoid cross-groupId publication-ordering cycles in Sonatype staging.Verification
mvn enforcer:enforce@enforce-banned-duplicate-classes -pl :gax-bom,:first-party-dependenciespasses.mvn enforcer:enforce@enforce -pl :gax-bom,:first-party-dependenciespasses.