Skip to content

Commit 4d4cc07

Browse files
committed
Don't fail hard when settings.xml can't be decrypted by the CLI
1 parent 68163a6 commit 4d4cc07

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfiguration.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import org.sonatype.plexus.components.cipher.DefaultPlexusCipher;
4848
import org.sonatype.plexus.components.cipher.PlexusCipherException;
4949
import org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher;
50+
import org.springframework.boot.cli.util.Log;
5051

5152
/**
5253
* Auto-configuration for a RepositorySystemSession that uses Maven's settings.xml to
@@ -76,8 +77,8 @@ public void apply(DefaultRepositorySystemSession session,
7677
Settings settings = loadSettings();
7778
SettingsDecryptionResult decryptionResult = decryptSettings(settings);
7879
if (!decryptionResult.getProblems().isEmpty()) {
79-
throw new IllegalStateException("Settings decryption failed: "
80-
+ decryptionResult.getProblems());
80+
Log.error("Settings decryption failed: " + decryptionResult.getProblems());
81+
// Continue - the encrypted credentials may not be used
8182
}
8283

8384
session.setOffline(settings.isOffline());

0 commit comments

Comments
 (0)