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

   Stacked on #986.
   
   `wagon-http` and `wagon-webdav-jackrabbit` were the two providers 20d688a2 
left on handwritten Plexus descriptors, because each maps one implementation 
onto several role hints and a single `@Named` cannot express that. 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.
   
   `master` carries the same two descriptors.
   
   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.
   
   *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]

Reply via email to