slachiewicz opened a new pull request, #526: URL: https://github.com/apache/maven-build-cache-extension/pull/526
A WebDAV remote cache no longer needs the Wagon WebDAV provider or the system properties that went with it. The cache does GET and PUT and nothing else. The only thing `wagon-webdav-jackrabbit` added was creating parent collections before a PUT, and the resolver HTTP transport does that itself once `supportWebDav` is on. The extension now turns that on for its own cache repository, so the runtime dependency goes away and `-Daether.transport.http.supportWebDav=true`, `-Daether.connector.http.supportWebDav=true` and `-Dmaven.resolver.transport=wagon` are all unnecessary. A legacy `dav:` URL keeps working: the prefix is stripped and the same HTTP transport serves it. Both resolver property names are set deliberately. Resolver 1.9.x (Maven 3.9.x) spells it `aether.connector.http.supportWebDav` and resolver 2.x (Maven 3.10.x, 4.x) spells it `aether.transport.http.supportWebDav`; the extension compiles against 1.9.27 but runs on whichever Maven provides, so it cannot reference the 2.x constant. `AbstractForwardingRepositorySystemSession` exists in both, and the flag is scoped to the cache repository id and applied to a forwarding view, so nothing else in the build sees it. `RemoteCacheDavTest` could not cover this. Its nginx image creates parent collections on PUT, so it passes whether or not the client issues MKCOL — and the test project's own `.mvn/maven.config` already set both properties unconditionally, which masked the behaviour entirely. This adds `RemoteCacheStrictDavTest` against a small in-JVM WebDAV server that answers 409 to a PUT into a collection that does not exist, as RFC 4918 requires and as Apache `mod_dav` or nginx without `create_full_put_path` do. It asserts MKCOL was actually issued and that no PUT was rejected, and its project deliberately does not pre-enable the flags. Verified, per profile, `mvn verify -Prun-its -Dit.test=RemoteCache*DavTest`: | Maven | with the change | without the session wiring | |---|---|---| | 3.9.16 (resolver 1.9.27) | 2/2 pass | — | | 3.10.0-rc-1 (resolver 2.x) | 2/2 pass | **2/2 fail** | | 4.0.0-rc-6 | 2/2 pass | — | The negative control is the point: on Maven 3.10 the new test goes red when the session wiring is reverted, so it gates the behaviour rather than merely passing alongside it. `RemoteCacheDavTest` stays green throughout, now parameterised over the two URL forms instead of over the transport. `checkstyle:check` and `spotless` pass. Docs updated: the section telling users to pick between two system properties or a `dav:` URL is replaced by "no extra configuration is needed". One consequence worth flagging for apache/maven-wagon: this removes the last runtime consumer of `wagon-webdav-jackrabbit` I could find in the Maven estate, which bears on whether that provider is still worth carrying. *This change was created with AI assistance.* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
