slachiewicz opened a new pull request, #1031:
URL: https://github.com/apache/maven-wagon/pull/1031

   Backport of the Apache HttpComponents 4.x → 5.x migration to the 
**`wagon-3.x`** maintenance line. `3.x` is the main line, so this PR comes 
first; [#1030](https://github.com/apache/maven-wagon/pull/1030) is the 
corresponding master forward-port and must be kept as-is.
   
   This is a straight cherry-pick of the four migration commits from the 
master-based branch, adapted only where the 3.x POM shape differs:
   
   1. `61d91b5f` Migrate HTTP and WebDAV wagons to Apache HttpComponents 5.x
   2. `acd43b26` Preserve Wagon PUT-on-303 redirects and WebDAV response 
lifecycle on HttpClient 5
   3. `a2424f1c` Buffer streamed PUT bodies so HttpClient 5 can replay them
   4. `77a61783` Only buffer streamed PUT bodies when expect-continue is enabled
   
   ### What changes
   
   - `httpclient` 4.5.14 / `httpcore` 4.4.16 → `httpclient5` **5.6.5** / 
`httpcore5` **5.4.4** (same versions as #1030).
   - `org.apache.http.*` → `org.apache.hc.client5.http.*` / 
`org.apache.hc.core5.http.*`.
   - Shade relocations: `org.apache.hc.client5` → 
`org.apache.maven.wagon.providers.http.httpclient.client5`, 
`org.apache.hc.core5` → `...httpclient.core5`; `httpcore5-h2` added to the 
shaded artifact set.
   - Auth, SSL, retry and redirect handling adapted to HttpClient 5; 
`WagonRedirectExec` rewrites 303 → 307 for PUT so the method and body are 
preserved.
   - `WagonHttpEntity` buffers a caller-supplied stream to a temp file **only** 
when PUT expect-continue is enabled (`http.protocol.expect-continue`, 
`Boolean.parseBoolean` semantics, default `true`). With expect-continue 
disabled the entity stays non-repeatable, so a streamed PUT on redirect still 
fails with `TransferFailedException`, as the TCK expects.
   
   ### Adaptations vs master
   
   - One textual conflict in `wagon-providers/wagon-http/pom.xml`: 3.x still 
declared the old `httpclient`/`httpcore` dependencies there; resolved by 
removing them (3.x's unscoped `plexus-utils` dependency was preserved).
   - 3.x-only `HttpMessageUtils.java` has no HttpComponents references and was 
left untouched.
   - All migrated Java sources are byte-identical to #1030; only POMs and 
user-guide docs differ to reflect the 3.x version/dependency shape.
   - Compiles with `release 8` (the 3.x Java floor), so there is no hard Java 
version blocker for HttpClient 5.6.5.
   
   ### Verification (JDK 17, `17.0.20-amzn`)
   
   - `mvn -B -pl wagon-providers/wagon-http -am 
-Dtest=HttpWagonTest,HttpWagonPreemptiveTest,HttpsWagonTest,HttpsWagonPreemptiveTest
 -Dsurefire.failIfNoSpecifiedTests=false test` → **244 tests, 0 failures, 0 
errors, 0 skipped**. Includes `testRedirectPutFailureNonRepeatableStream`, 
`testRedirectPutFromStreamRelativeUrl`, `testRedirectPutFromStreamWithFullUrl` 
and `testSecuredPutFromStream` in all four test classes.
   - Full `mvn -B -pl 
wagon-providers/wagon-http,wagon-providers/wagon-webdav-jackrabbit -am test` → 
only `No space left on device` errors from `HugeFileDownloadTest` (and three 
collateral disk-full errors in `HttpsWagonTest`) in this sandbox with 2 GiB 
free; no code failures.
   - Re-run of the same full reactor with `-Dtest='!HugeFileDownloadTest'` → 
**BUILD SUCCESS**, 733 tests, 0 failures, 0 errors, 2 skipped (API 94, 
http-shared 19, HTTP 306, WebDAV 314).
   - `mvn -q -B -N spotless:check` → pass.
   - JDK 8 is not installed locally, so no JDK 8 run was possible; the `release 
8` compile above covers source compatibility.
   
   Draft pending CI — not ready for review yet.
   


-- 
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]

Reply via email to