ci: skip enforce-banned-duplicate-classes in non-jar POM modules - #14272
Merged
Conversation
In #14142, 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". Add an explicit skip execution for enforce-banned-duplicate-classes in: - native-image-shared-config: configuration-only parent POM - google-cloud-shared-config-parent: aggregator parent POM - full-convergence-check: standalone BOM test module
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 across multiple pom.xml files, including java-cloud-bom/tests/dependency-convergence/pom.xml, java-shared-config/native-image-shared-config/pom.xml, and java-shared-config/pom.xml. I have no feedback to provide as there are no review comments.
blakeli0
approved these changes
Sep 4, 2026
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 on POM-only modules.Background
In #14142, the enforcer 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 immediately on:Changes
Added an explicit
<execution>for<id>enforce-banned-duplicate-classes</id>with<skip>true</skip>to:java-shared-config/native-image-shared-config/pom.xml: configuration-only parent POMjava-shared-config/pom.xml: aggregator parent POMjava-cloud-bom/tests/dependency-convergence/pom.xml: standalone BOM test module (preserving its upper-bound deps check in theenforceexecution)Verification
mvn -B -ntp enforcer:enforce@enforce-banned-duplicate-classespasses injava-shared-config.mvn -B -ntp enforcer:enforce@enforcepasses injava-shared-config.mvn -B -ntp enforcer:enforce@enforce-banned-duplicate-classespasses injava-cloud-bom.mvn -B -ntp enforcer:enforce@enforcepasses injava-cloud-bom.