From 24806642cb24469228c9a56f383ccab4af52c0cc Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Fri, 14 Apr 2023 22:13:02 +0200 Subject: [PATCH] [MRELEASE-1103] Decryption of server password in settings.xml failed (works with 2.5.3) Wrong file path used for master password file. Using plexus default, that is NOT same as Maven default. This closes #181 --- .../java/org/apache/maven/shared/release/util/MavenCrypto.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maven-release-manager/src/main/java/org/apache/maven/shared/release/util/MavenCrypto.java b/maven-release-manager/src/main/java/org/apache/maven/shared/release/util/MavenCrypto.java index cc9bb11b..ce357da0 100644 --- a/maven-release-manager/src/main/java/org/apache/maven/shared/release/util/MavenCrypto.java +++ b/maven-release-manager/src/main/java/org/apache/maven/shared/release/util/MavenCrypto.java @@ -63,6 +63,9 @@ private MavenCryptoException(String message, Throwable cause) { public MavenCrypto(DefaultSecDispatcher secDispatcher, PlexusCipher plexusCipher) { this.secDispatcher = secDispatcher; this.plexusCipher = plexusCipher; + + // Adjust the default path (def path != maven path) + this.secDispatcher.setConfigurationFile("~/.m2/settings-security.xml"); } public String decrypt(String value) throws MavenCryptoException {