@ Provides @ Singleton public List < RemoteRepository > getRemoteRepositories ( SettingsDecrypter decrypter , ExtensionList < RemoteRepositoryDecorator > decorators ) { List < RemoteRepository > repositories = new ArrayList < RemoteRepository > ( ) ; MavenDependencyResolverSettings resolverSettings = new MavenDependencyResolverSettings ( ) ; resolverSettings . setUseMavenCentral ( true ) ; List < RemoteRepository > repos = resolverSettings . getRemoteRepositories ( ) ; for ( RemoteRepository remoteRepository : repos ) { Server server = resolverSettings . getSettings ( ) . getServer ( remoteRepository . getId ( ) ) ; if ( server != null ) { server = decrypter . decrypt ( new DefaultSettingsDecryptionRequest ( server ) ) . getServer ( ) ; remoteRepository . setAuthentication ( new Authentication ( server . getUsername ( ) , server . getPassword ( ) , server . getPrivateKey ( ) , server . getPassphrase ( ) ) ) ; } repositories . add ( decorate ( remoteRepository , decorators ) ) ; } RemoteRepository r = new RemoteRepository ( "cloudbees-public-release" , "default" , "https://repository-cloudbees.forge.cloudbees.com/public-release/" ) ; repositories . add ( decorate ( r , decorators ) ) ; return repositories ; }
List of remote repositories to resolve artifacts from .