Publish the HTTP and WebDAV wagons as JSR-330 beans - #987
Merged
slachiewicz merged 1 commit intoSep 4, 2026
Conversation
These two providers kept handwritten Plexus descriptors because each maps one implementation onto several role hints, which a single @nAmed cannot express. Give each hint its own empty subclass, the way wagon-ftp and wagon-http-lightweight already do, so all ten providers now resolve from the Sisu index alone. Do not restore the descriptors to add a hint: a component named there is invisible to any consumer that scans for @nAmed beans without the Plexus shim.
|
@slachiewicz The PR can't be associated to a milestone, because there are multiple open milestones. Please add the text "branch: agent/wagon-sisu-provided-scope" to the description to the milestone where this PR belongs to. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #988. Stacked on #986.
wagon-httpandwagon-webdav-jackrabbitwere the two providers 20d688a left on handwritten Plexus descriptors, because each maps one implementation onto several role hints and a single@Namedcannot express that. This gives each hint its own empty subclass, the waywagon-ftpandwagon-http-lightweightalready publish theirs, and removes bothMETA-INF/plexus/components.xmlfiles.httpHttpWagonHttpWagonhttpsHttpWagonHttpsWagon extends HttpWagondavWebDavWagonWebDavWagondavsWebDavWagonWebDavsWagon extends WebDavWagondav+httpWebDavWagonWebDavHttpWagon extends WebDavWagondav+httpsWebDavWagonWebDavHttpsWagon extends WebDavWagonEvery hint keeps returning an instance that is still a
HttpWagonor aWebDavWagon, so aninstanceofcheck on either resolves as it does today. All six components declaredinstantiation-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.
mastercarries the same two descriptors.Verified: after
mvn clean install, the generatedMETA-INF/sisu/javax.inject.Namedin both jars and in thewagon-httpshaded jar lists exactly the six implementations above, and nocomponents.xmlremains in either; BUILD SUCCESS, 986 tests, 0 failures.This change was created with AI assistance.