public Proxy getProxy( RemoteRepository repository ) { return repository.getProxy(); }
public Proxy getProxy( RemoteRepository repository ) { return repository.getProxy(); }
public Proxy getProxy( RemoteRepository repository ) { Proxy proxy = repository.getProxy(); if ( proxy != null ) { return proxy; } return selector.getProxy( repository ); }
public Proxy getProxy( RemoteRepository repository ) { Proxy proxy = repository.getProxy(); if ( proxy != null ) { return proxy; } return selector.getProxy( repository ); }
/** * Sets the proxy to use in order to access the repository. * * @param proxy The proxy to use, may be {@code null}. * @return This builder for chaining, never {@code null}. */ public Builder setProxy( Proxy proxy ) { this.proxy = proxy; if ( prototype != null ) { delta( PROXY, this.proxy, prototype.getProxy() ); } return this; }
/** * Sets the proxy to use in order to access the repository. * * @param proxy The proxy to use, may be {@code null}. * @return This builder for chaining, never {@code null}. */ public Builder setProxy( Proxy proxy ) { this.proxy = proxy; if ( prototype != null ) { delta( PROXY, this.proxy, prototype.getProxy() ); } return this; }
private String getRepoKey(RepositorySystemSession session, RemoteRepository repository) { StringBuilder buffer = new StringBuilder(128); Proxy proxy = repository.getProxy(); if (proxy != null) { buffer.append(AuthenticationDigest.forProxy(session, repository)).append('@'); buffer.append(proxy.getHost()).append(':').append(proxy.getPort()).append('>'); } buffer.append(AuthenticationDigest.forRepository(session, repository)).append('@'); buffer.append(repository.getContentType()).append('-'); buffer.append(normalizeRepoUrl(repository.getUrl())); return buffer.toString(); }
private String getRepoKey(RepositorySystemSession session, RemoteRepository repository) { StringBuilder buffer = new StringBuilder(128); Proxy proxy = repository.getProxy(); if (proxy != null) { buffer.append(AuthenticationDigest.forProxy(session, repository)).append('@'); buffer.append(proxy.getHost()).append(':').append(proxy.getPort()).append('>'); } buffer.append(AuthenticationDigest.forRepository(session, repository)).append('@'); buffer.append(repository.getContentType()).append('-'); buffer.append(normalizeRepoUrl(repository.getUrl())); return buffer.toString(); }
/** * Gets an authentication context for the proxy of the specified repository. * * @param session The repository system session during which the repository is accessed, must not be {@code null}. * @param repository The repository for whose proxy to create an authentication context, must not be {@code null}. * @return An authentication context for the proxy or {@code null} if no proxy is set or no authentication is * configured for it. */ public static AuthenticationContext forProxy( RepositorySystemSession session, RemoteRepository repository ) { Proxy proxy = repository.getProxy(); return newInstance( session, repository, proxy, ( proxy != null ) ? proxy.getAuthentication() : null ); }
private String getRepoKey( RepositorySystemSession session, RemoteRepository repository ) { StringBuilder buffer = new StringBuilder( 128 ); Proxy proxy = repository.getProxy(); if ( proxy != null ) { buffer.append( AuthenticationDigest.forProxy( session, repository ) ).append( '@' ); buffer.append( proxy.getHost() ).append( ':' ).append( proxy.getPort() ).append( '>' ); } buffer.append( AuthenticationDigest.forRepository( session, repository ) ).append( '@' ); buffer.append( repository.getContentType() ).append( '-' ); buffer.append( repository.getId() ).append( '-' ); buffer.append( normalizeRepoUrl( repository.getUrl() ) ); return buffer.toString(); }
/** * Gets an authentication context for the proxy of the specified repository. * * @param session The repository system session during which the repository is accessed, must not be {@code null}. * @param repository The repository for whose proxy to create an authentication context, must not be {@code null}. * @return An authentication context for the proxy or {@code null} if no proxy is set or no authentication is * configured for it. */ public static AuthenticationContext forProxy( RepositorySystemSession session, RemoteRepository repository ) { Proxy proxy = repository.getProxy(); return newInstance( session, repository, proxy, ( proxy != null ) ? proxy.getAuthentication() : null ); }
private String getRepoKey( RepositorySystemSession session, RemoteRepository repository ) { StringBuilder buffer = new StringBuilder( 128 ); Proxy proxy = repository.getProxy(); if ( proxy != null ) { buffer.append( AuthenticationDigest.forProxy( session, repository ) ).append( '@' ); buffer.append( proxy.getHost() ).append( ':' ).append( proxy.getPort() ).append( '>' ); } buffer.append( AuthenticationDigest.forRepository( session, repository ) ).append( '@' ); buffer.append( repository.getContentType() ).append( '-' ); buffer.append( repository.getId() ).append( '-' ); buffer.append( normalizeRepoUrl( repository.getUrl() ) ); return buffer.toString(); }
private RemoteRepository applyProxy(RemoteRepository repository) { if (repository.getProxy() == null) { RemoteRepository.Builder builder = new RemoteRepository.Builder(repository); builder.setProxy(this.session.getProxySelector().getProxy(repository)); repository = builder.build(); } return repository; }
/** * Gets the fingerprint for the authentication of the specified repository's proxy. * * @param session The repository system session during which the fingerprint is requested, must not be {@code null}. * @param repository The repository whose proxy authentication is to be fingerprinted, must not be {@code null}. * @return The fingerprint of the proxy authentication or an empty string if no proxy is present or if no proxy * authentication is configured, never {@code null}. */ public static String forProxy( RepositorySystemSession session, RemoteRepository repository ) { String digest = ""; Proxy proxy = repository.getProxy(); if ( proxy != null ) { Authentication auth = proxy.getAuthentication(); if ( auth != null ) { AuthenticationDigest authDigest = new AuthenticationDigest( session, repository, proxy ); auth.digest( authDigest ); digest = authDigest.digest(); } } return digest; }
/** * Gets the fingerprint for the authentication of the specified repository's proxy. * * @param session The repository system session during which the fingerprint is requested, must not be {@code null}. * @param repository The repository whose proxy authentication is to be fingerprinted, must not be {@code null}. * @return The fingerprint of the proxy authentication or an empty string if no proxy is present or if no proxy * authentication is configured, never {@code null}. */ public static String forProxy( RepositorySystemSession session, RemoteRepository repository ) { String digest = ""; Proxy proxy = repository.getProxy(); if ( proxy != null ) { Authentication auth = proxy.getAuthentication(); if ( auth != null ) { AuthenticationDigest authDigest = new AuthenticationDigest( session, repository, proxy ); auth.digest( authDigest ); digest = authDigest.digest(); } } return digest; }
public LocalState( RepositorySystemSession session, RemoteRepository repo, SslConfig sslConfig ) { global = GlobalState.get( session ); userToken = this; if ( global == null ) { connMgr = GlobalState.newConnectionManager( sslConfig ); userTokenKey = null; expectContinueKey = null; authSchemePools = new ConcurrentHashMap<HttpHost, AuthSchemePool>(); } else { connMgr = global.getConnectionManager( sslConfig ); userTokenKey = new CompoundKey( repo.getId(), repo.getUrl(), repo.getAuthentication(), repo.getProxy() ); expectContinueKey = new CompoundKey( repo.getUrl(), repo.getProxy() ); authSchemePools = global.getAuthSchemePools(); } if ( !ConfigUtils.getBoolean( session, true, CONFIG_PROP_WEBDAV + '.' + repo.getId(), CONFIG_PROP_WEBDAV ) ) { webDav = false; } }
private RemoteRepository getRemoteRepository( RepositorySystemSession session, ArtifactRepository remoteRepository ) throws ArtifactDeployerException { // CHECKSTYLE_OFF: LineLength RemoteRepository aetherRepo = (RemoteRepository) Invoker.invoke( RepositoryUtils.class, "toRepo", org.apache.maven.artifact.repository.ArtifactRepository.class, remoteRepository ); // CHECKSTYLE_ON: LineLength if ( aetherRepo.getAuthentication() == null || aetherRepo.getProxy() == null ) { RemoteRepository.Builder builder = new RemoteRepository.Builder( aetherRepo ); if ( aetherRepo.getAuthentication() == null ) { builder.setAuthentication( session.getAuthenticationSelector().getAuthentication( aetherRepo ) ); } if ( aetherRepo.getProxy() == null ) { builder.setProxy( session.getProxySelector().getProxy( aetherRepo ) ); } aetherRepo = builder.build(); } return aetherRepo; } }
proxy = toHost( repository.getProxy() );
Proxy p = repository.getProxy(); if ( p != null )
Proxy p = repository.getProxy(); if ( p != null )