Skip to content

Replace the deprecated plexus-utils APIs still used in provider code #975

Description

@slachiewicz

Wagon's production code no longer uses the Plexus container: there is no Contextualizable, Context, PlexusContainer, ClassRealm or ComponentConfigurator outside the test-support modules, and wagon-provider-api has no Plexus import at all. What remains in src/main is plexus-utils, plus plexus-interactivity-api for the SSH prompter.

Three of those uses are deprecated or superseded, and are straightforward now that the 3.x line requires Java 8:

Where API Replacement
wagon-ssh-common StreamKnownHostsProvider StringOutputStream (deprecated) ByteArrayOutputStream, or read the stream directly
wagon-ssh-common StreamKnownHostsProvider, wagon-ssh AbstractJschWagon IOUtil (deprecated) java.nio.file.Files / try-with-resources
wagon-http-lightweight LightweightHttpWagon plexus-utils Base64 java.util.Base64

The remaining uses are a larger mechanical sweep rather than deprecation cleanup, and can follow separately: FileUtils in wagon-file, wagon-scm, wagon-ssh-common and wagon-webdav-jackrabbit, and StringUtils in wagon-scm, wagon-ssh-common, wagon-ssh-external and wagon-webdav-jackrabbit.

Two should stay as they are: util.cli.Commandline / CommandLineUtils in wagon-ssh-external, and components.interactivity.Prompter in wagon-ssh and wagon-ssh-common. Those are live components, not container leftovers.

This issue was created with AI assistance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions