slachiewicz opened a new pull request, #989: URL: https://github.com/apache/maven-wagon/pull/989
Ports #987 to `master`, which carries the same two handwritten Plexus descriptors and the same deferral recorded in 4af0905a. `wagon-http` and `wagon-webdav-jackrabbit` each map one implementation onto several role hints, which a single `@Named` cannot express. This gives each hint its own empty subclass, the way `wagon-ftp` and `wagon-http-lightweight` already publish theirs, and removes both `META-INF/plexus/components.xml` files. | Hint | Before | After | | --- | --- | --- | | `http` | `HttpWagon` | `HttpWagon` | | `https` | `HttpWagon` | `HttpsWagon extends HttpWagon` | | `dav` | `WebDavWagon` | `WebDavWagon` | | `davs` | `WebDavWagon` | `WebDavsWagon extends WebDavWagon` | | `dav+http` | `WebDavWagon` | `WebDavHttpWagon extends WebDavWagon` | | `dav+https` | `WebDavWagon` | `WebDavHttpsWagon extends WebDavWagon` | Every hint keeps returning an instance that is still a `HttpWagon` or a `WebDavWagon`, so an `instanceof` check on either resolves as it does today. All six components declared `instantiation-strategy="per-lookup"`, which is the JSR-330 default, so none needs `@Singleton`. The cost is five new public classes. They are empty and exist only to carry a component name, but they become API on release. The alternative is to keep both descriptors and accept that these two providers need the Plexus shim while the other eight do not. The commit is a clean cherry-pick of 2026d868; no conflicts. Verified: after `mvn clean install`, the generated `META-INF/sisu/javax.inject.Named` in both jars and in the `wagon-http` shaded jar lists exactly the six implementations above, and no `components.xml` remains in either; BUILD SUCCESS, 986 tests, 0 failures, `spotless:check` clean across all 17 modules. *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]
