slachiewicz opened a new pull request, #789: URL: https://github.com/apache/maven-pmd-plugin/pull/789
The `<exclusion>` for `org.apache.httpcomponents:httpclient` on the test-scoped `com.github.tomakehurst:wiremock-jre8` dependency in the root `pom.xml` is a leftover from when WireMock 1.x pulled in HttpClient 4.x. ### Evidence — `pilot:tree -Dscope=test` (before) ``` +- com.github.tomakehurst:wiremock-jre8:jar:2.35.2:test | +- org.apache.httpcomponents.client5:httpclient5:jar:5.1.3:test | | +- org.apache.httpcomponents.core5:httpcore5:jar:5.1.3:test | | \- org.apache.httpcomponents.core5:httpcore5-h2:jar:5.1.3:test +- org.apache.maven.resolver:maven-resolver-transport-http:jar:1.9.27:test | +- org.apache.httpcomponents:httpclient:jar:4.5.14:test | +- org.apache.httpcomponents:httpcore:jar:4.4.16:test ``` WireMock 2.35.2 no longer pulls in HttpClient 4.x at all — it uses HttpClient 5.1.3. The exclusion therefore matches nothing and is a no-op. HttpClient 4.5.14 is still on the test classpath, but solely through `maven-resolver-transport-http` (test scope), which is not part of this change. Excluding `httpclient5`/`httpcore5` from WireMock would be incorrect: WireMock's `HttpClientFactory` directly references `org.apache.hc.client5.http.*` classes, so it needs HttpClient 5 at test runtime. ### Change Removed the obsolete six-line `<exclusions>` block from the `wiremock-jre8` dependency. The dependency tree after the change is identical (same artifacts, versions and scopes) apart from build timing. ### Verification - `JAVA_HOME=17 mvn -q -B -N spotless:check` — passed (exit 0). - `JAVA_HOME=17 mvn -q -B test` — passed (exit 0): 92 tests run, 0 failures, 0 errors, 8 skipped (Windows-only tests). -- 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]
