Migrate from org.sonatype.plexus:plexus-cipher to org.codehaus.plexus:plexus-cipher
MSALReplace the unmaintained org.sonatype.plexus:plexus-cipher with org.codehaus.plexus:plexus-cipher 2.0, and org.sonatype.plexus:plexus-sec-dispatcher, which depends on it, with org.codehaus.plexus:plexus-sec-dispatcher 2.0, the versions Maven 3.9 uses. Both keep the org.sonatype.plexus.components packages and decrypt the passwords that 1.x encrypted. 2.1.0 doesn't, as it derives the key differently, and 3.0.0 has the API of Maven 4. In the modules that declare either artifact, this also removes the catch of the PlexusCipherException that the constructor of DefaultPlexusCipher no longer throws, and replaces the ROLE constants 2.0 removed. Where they declare the security dispatcher, it also passes the cipher to the constructor of DefaultSecDispatcher and a message to the constructor of SecDispatcherException, whose no-argument constructors 2.0 removed. It excludes the Sonatype artifacts where another dependency, such as Maven 3.8 or older, still brings them, as their classes would otherwise be on the classpath twice, and upgrades a maven-plugin-plugin older than 3.5, which can't read the classes that plexus-utils 3.4, a dependency of the 2.0 security dispatcher, has for Java 10. The 2.0 components are annotated for JSR-330 and Sisu, which Maven 3 uses, and Sisu also creates them from a Plexus components.xml, such as the one a Maven plugin declares its own SecDispatcher in. A classic Plexus container without Sisu, such as Maven 2's, can't create them, so a repository where a module runs one with the Sonatype artifacts is left alone, and its declarations of them are marked.
org. openrewrite. codehaus. plexus. MigrateToCodehausPlexusCiphermod run . --recipe= org. openrewrite. codehaus. plexus. MigrateToCodehausPlexusCipherInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.