use of org.eclipse.aether.util.repository.ConservativeAuthenticationSelector in project spring-boot by spring-projects.
the class MavenSettings method createAuthenticationSelector.
private AuthenticationSelector createAuthenticationSelector(SettingsDecryptionResult decryptedSettings) {
DefaultAuthenticationSelector selector = new DefaultAuthenticationSelector();
for (Server server : decryptedSettings.getServers()) {
AuthenticationBuilder auth = new AuthenticationBuilder();
auth.addUsername(server.getUsername()).addPassword(server.getPassword());
auth.addPrivateKey(server.getPrivateKey(), server.getPassphrase());
selector.add(server.getId(), auth.build());
}
return new ConservativeAuthenticationSelector(selector);
}
Aggregations