From 9f348e98e5a4972bcfdeec7856c64c3c2b52f84a Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Sat, 25 Sep 2021 11:54:54 +0200 Subject: [PATCH] PlexusCipher should be injected --- .../maven/settings/crypto/MavenSecDispatcherProvider.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/MavenSecDispatcherProvider.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/MavenSecDispatcherProvider.java index e59d7e0592..a23d20cefd 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/MavenSecDispatcherProvider.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/crypto/MavenSecDispatcherProvider.java @@ -26,7 +26,7 @@ import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; -import org.sonatype.plexus.components.cipher.DefaultPlexusCipher; +import org.sonatype.plexus.components.cipher.PlexusCipher; import org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher; import org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor; import org.sonatype.plexus.components.sec.dispatcher.SecDispatcher; @@ -39,10 +39,11 @@ public final class MavenSecDispatcherProvider private final SecDispatcher secDispatcher; @Inject - public MavenSecDispatcherProvider( final Map decryptors ) + public MavenSecDispatcherProvider( final PlexusCipher plexusCipher, + final Map decryptors ) { this.secDispatcher = new DefaultSecDispatcher( - new DefaultPlexusCipher(), + plexusCipher, decryptors, "~/.m2/settings-security.xml" );