slachiewicz opened a new pull request, #1678: URL: https://github.com/apache/maven-dependency-plugin/pull/1678
`testRemoteRepositoriesAuthentication` was not testing anything. `test:test:1.0` persists in the checked-in `target/test-classes/unit/get-test/target/local-repo`, so without a `clean` the resolution is served from there and the test passes **with `GetMojo`'s `injectAuthentication` call deleted outright**. It now resolves into a `@TempDir` local repository, so the assertion depends on the transfer actually happening. The two paths that had no test at all are covered too: * an active `<proxy>` from the settings must be applied to the repositories named by `remoteRepositories`; * `<nonProxyHosts>` must exclude a repository from a proxy that would otherwise match it. The proxy points at a name in a reserved TLD (RFC 2606) that cannot resolve, so applying it is always observable as a failure, and the test asserts the failure message mentions that host — it cannot pass because the artifact was missing or the login was rejected. **Verification.** Against this branch: 6/6 pass. With the three `injectMirror`/`injectProxy`/`injectAuthentication` calls deleted from `GetMojo`, `testRemoteRepositoriesAuthentication`, `testRemoteRepositoriesProxy` and `testRemoteRepositoriesNonProxyHosts` all fail. So these characterise the behaviour rather than merely agreeing with the current implementation. Test-only; no `src/main` change. This is the first of three pieces split out of #1677 — it stands on its own, and it is what lets the follow-ups show that the mirror/proxy/credential behaviour survives the refactor. <sub>Drafted with Claude — please verify</sub> -- 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]
