Repository navigation
Load rulesUri through the Resolver transporter instead of Wagon - #1475
Merged
Merged
Conversation
cstamas
approved these changes
Nov 5, 2026
Fetch the rules file with the injected TransporterProvider, so rulesUri is served by the transports Maven is configured with (file, http, https, and Wagon-backed schemes such as scp when an extension provides them) and no Wagon providers need to be bundled. The wagon-file and wagon-http runtime dependencies added for rulesUri are removed again. The rules location is a plain URL, not a repository, so mirror settings are not applied. The previous setMirroredRepositories call had inverted semantics and the Wagon code ignored mirrors anyway; a mirrorOf * entry would otherwise redirect the URL to a repository manager.
The HTTP ITs start an in-JVM server from the setup hook, so no new test dependency is needed. The settings gain two server entries, one with the right and one with the wrong password.
slachiewicz
force-pushed
the
agent/rules-without-wagon
branch
from
November 6, 2026 20:31
b968d33 to
b38febd
Compare
This was referenced Nov 7, 2026
Closed
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.
rulesUriis now fetched with the injected ResolverTransporterProvider, using the repository the builder already set up with the session's proxy and theserverIdcredentials. It works with whatever transports Maven is configured with:file:,http(s):, and Wagon-backed schemes such asscp:ordav:when an extension provides the wagon. Wagon is no longer used: theMap<String, Wagon>constructor parameter of the mojos, reports and themaxDependencyUpdatesrule is replaced byTransporterProvider, and thewagon-provider-api,wagon-fileandwagon-httpdependencies are removed (maven-resolver-spiis provided).Could not load specified rules from <uri>: <cause>(for examplestatus code: 401, orno transport available for protocol "scp") instead of a rawRuntimeException.rulesUrioverfile:, over HTTP withserverIdand Basic auth, a wrong password, and the enforcer rule with arulesUri.Verified: rules ITs (9) and 83 further plugin ITs, all 7 enforcer ITs, unit tests โ pass;
display-dependency-updateswithfile:,http:andhttp:+ Basic auth rules โ pass on Maven 3.9.16 and 4.0.0-rc-7, both stock and without the bundledwagon-file/wagon-http, and with-Dmaven.resolver.transport=wagonon 3.9.16. Not run: the full IT suite, Maven 3.9.0 itself, a realscp:/dav:wagon extension.