Skip to content

Commit

Permalink
Merge pull request quarkusio#6929 from aloubyansky/mvn-decrypt-fixes
Browse files Browse the repository at this point in the history
Remove stacktrace logging when Maven's settings-security.xml could not be located
  • Loading branch information
gsmet authored Feb 3, 2020
2 parents 5475d84 + 606de18 commit 4cc69f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,10 @@ public static DefaultRepositorySystemSession newSession(RepositorySystem system,
decrypt.setProxies(settings.getProxies());
decrypt.setServers(settings.getServers());
final SettingsDecryptionResult decrypted = new SettingsDecrypterImpl().decrypt(decrypt);
if(decrypted.getProblems().isEmpty()) {
if(!decrypted.getProblems().isEmpty() && log.isDebugEnabled()) {
// this is how maven handles these
for(SettingsProblem p : decrypted.getProblems()) {
log.warn("Problem decrypting maven settings: " + p);
log.debug(p.getMessage(), p.getException());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

import org.sonatype.plexus.components.cipher.DefaultPlexusCipher;
import org.sonatype.plexus.components.cipher.PlexusCipher;
import org.sonatype.plexus.components.cipher.PlexusCipherException;
Expand Down Expand Up @@ -106,7 +105,6 @@ public String decrypt( String str )
}
catch ( Exception e )
{
e.printStackTrace();
throw new SecDispatcherException(e);
}
}
Expand Down

0 comments on commit 4cc69f1

Please sign in to comment.