slachiewicz commented on issue #758:
URL: https://github.com/apache/maven-wagon/issues/758#issuecomment-5225541238
Still open, and worth checking against the current code because the answer
is precise.
`wagon-http` does not create parent collections. In
`AbstractHttpClientWagon`, `put()` does call a hook before sending:
```java
// Parent directories need to be created before posting
mkdirs(PathUtils.dirname(resource.getName()));
```
but the hook itself is empty:
```java
protected void mkdirs(String dirname) throws HttpException, IOException {
// nothing to do
}
```
Only `WebDavWagon` overrides it, with the backward/forward `MKCOL` traversal
via `PathNavigator`. So a plain `http:`/`https:` repository still fails exactly
as described.
One thing has moved since this was filed: `WagonRedirectStrategy` now lists
`MKCOL` among the methods it will follow redirects for, though the comment
there is explicit that it covers only "the most basic case where the
redirection relocates to another collection which has an existing parent
collection".
This matters more than it did in 2022. `wagon-webdav-jackrabbit` is marked
for removal in 4.0.0 with its features "partially folded into" the default HTTP
provider — but the `MKCOL` traversal is the part that has not been folded in.
If the provider goes and this hook stays empty, deployments that rely on
parent-collection creation lose the capability with nothing to move to.
Whichever way 4.0.0 lands, this is the piece that has to come across.
--
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]