Skip to content

Bundle the file and HTTP wagons used to load rulesUri - #1474

Merged
slachiewicz merged 1 commit into
masterfrom
agent/bundle-file-http-wagons
Nov 5, 2026
Merged

slachiewicz merged 1 commit into
masterfrom
agent/bundle-file-http-wagons

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

rulesUri (maven.version.rules) is loaded through the injected Map<String, Wagon>, and the file:, http: and https: entries came only from the providers Maven ships in lib/. On a distribution without them, the versions goals and the maxDependencyUpdates enforcer rule fail with "Could not load specified rules from โ€ฆ". This declares wagon-file and wagon-http 3.5.3 (runtime) in versions-maven-plugin and versions-enforcer, so they come from the plugin realm; versions-common stays free of them, and jcl-over-slf4j is excluded because commons-logging is already on the plugin classpath.

Verified: display-dependency-updates -Dmaven.version.rules=<file:// and http:// URI> โ†’ fails on master and passes with this change on a Maven 3.9.16 copy without lib/wagon-file* and lib/wagon-http*; passes on stock 3.9.16 and on Maven 4.0.0-rc-7 (stock and stripped). Unit tests and the rules-related ITs (it-use-latest-releases-003, it-rules-via-classpath-*, it-display-dependency-updates-issue-684-pom-based-rules, it-max-dependency-updates-*) pass; the full IT suite was not run.

Maven distributions may stop shipping wagon-file and wagon-http in lib/, which leaves the injected wagon map without file:, http: and https: entries. Declare the providers in the plugin and the enforcer rule so they come from the plugin realm.
@slachiewicz slachiewicz added the maintenance Cleanup, refactoring or other internal change label Nov 5, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review November 5, 2026 09:16
@slachiewicz
slachiewicz merged commit 7e87ce7 into master Nov 5, 2026
16 checks passed
@slachiewicz
slachiewicz deleted the agent/bundle-file-http-wagons branch November 5, 2026 09:17
@github-actions github-actions Bot added this to the 2.23.1 milestone Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Cleanup, refactoring or other internal change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant