Tabnine Logo
ArtifactRepository.getProxy
Code IndexAdd Tabnine to your IDE (free)

How to use
getProxy
method
in
org.apache.maven.artifact.repository.ArtifactRepository

Best Java code snippets using org.apache.maven.artifact.repository.ArtifactRepository.getProxy (Showing top 11 results out of 315)

origin: apache/maven

private ProxyInfo proxyInfo( ArtifactRepository repository )
{
  ProxyInfo proxyInfo = new ProxyInfo();
  proxyInfo.setHost( repository.getProxy().getHost() );
  proxyInfo.setType( repository.getProxy().getProtocol() );
  proxyInfo.setPort( repository.getProxy().getPort() );
  proxyInfo.setNonProxyHosts( repository.getProxy().getNonProxyHosts() );
  proxyInfo.setUserName( repository.getProxy().getUserName() );
  proxyInfo.setPassword( repository.getProxy().getPassword() );
  return proxyInfo;
}
origin: apache/maven

String getRepositoryKey( ArtifactRepository repository )
{
  StringBuilder buffer = new StringBuilder( 256 );
  Proxy proxy = repository.getProxy();
  if ( proxy != null )
  {
    if ( proxy.getUserName() != null )
    {
      int hash = ( proxy.getUserName() + proxy.getPassword() ).hashCode();
      buffer.append( hash ).append( '@' );
    }
    buffer.append( proxy.getHost() ).append( ':' ).append( proxy.getPort() ).append( '>' );
  }
  // consider the username&password because a repo manager might block artifacts depending on authorization
  Authentication auth = repository.getAuthentication();
  if ( auth != null )
  {
    int hash = ( auth.getUsername() + auth.getPassword() ).hashCode();
    buffer.append( hash ).append( '@' );
  }
  // consider the URL (instead of the id) as this most closely relates to the contents in the repo
  buffer.append( repository.getUrl() );
  return buffer.toString();
}
origin: apache/maven

effectiveRepository.setProxy( aliasedRepo.getProxy() );
origin: apache/maven

effectiveRepository.setProxy( aliasedRepo.getProxy() );
origin: apache/maven

if ( repository.getProxy() != null && logger.isDebugEnabled() )
  logger.debug( "Using proxy " + repository.getProxy().getHost() + ":" + repository.getProxy().getPort()
           + " for " + repository.getUrl() );
if ( repository.getAuthentication() != null && repository.getProxy() != null )
else if ( repository.getProxy() != null )
origin: apache/maven

public static RemoteRepository toRepo( ArtifactRepository repo )
{
  RemoteRepository result = null;
  if ( repo != null )
  {
    RemoteRepository.Builder builder =
      new RemoteRepository.Builder( repo.getId(), getLayout( repo ), repo.getUrl() );
    builder.setSnapshotPolicy( toPolicy( repo.getSnapshots() ) );
    builder.setReleasePolicy( toPolicy( repo.getReleases() ) );
    builder.setAuthentication( toAuthentication( repo.getAuthentication() ) );
    builder.setProxy( toProxy( repo.getProxy() ) );
    builder.setMirroredRepositories( toRepos( repo.getMirroredRepositories() ) );
    result = builder.build();
  }
  return result;
}
origin: org.jvnet.hudson.main/maven-plugin

  public Proxy getProxy()
  {
    return artifactRepository.getProxy();
  }
}    
origin: jenkinsci/maven-plugin

public Proxy getProxy()
{
  return artifactRepository.getProxy();
}
public List<ArtifactRepository> getMirroredRepositories()
origin: org.springframework.boot.experimental/spring-boot-thin-launcher

private org.eclipse.aether.repository.Proxy proxy(ArtifactRepository repo) {
  org.apache.maven.repository.Proxy proxy = repo.getProxy();
  if (proxy == null) {
    return null;
  }
  Authentication authentication = new AuthenticationBuilder()
      .addUsername(proxy.getUserName()).addPassword(proxy.getPassword())
      .build();
  return new org.eclipse.aether.repository.Proxy(proxy.getProtocol(),
      proxy.getHost(), proxy.getPort(), authentication);
}
origin: io.takari.maven.plugins/takari-lifecycle-plugin

public static RemoteRepository toRepo(ArtifactRepository repo) {
 RemoteRepository result = null;
 if (repo != null) {
  RemoteRepository.Builder builder = new RemoteRepository.Builder(repo.getId(), getLayout(repo), repo.getUrl());
  builder.setSnapshotPolicy(toPolicy(repo.getSnapshots()));
  builder.setReleasePolicy(toPolicy(repo.getReleases()));
  builder.setAuthentication(toAuthentication(repo.getAuthentication()));
  builder.setProxy(toProxy(repo.getProxy()));
  builder.setMirroredRepositories(toRepos(repo.getMirroredRepositories()));
  result = builder.build();
 }
 return result;
}
origin: takari/takari-lifecycle

public static RemoteRepository toRepo(ArtifactRepository repo) {
 RemoteRepository result = null;
 if (repo != null) {
  RemoteRepository.Builder builder = new RemoteRepository.Builder(repo.getId(), getLayout(repo), repo.getUrl());
  builder.setSnapshotPolicy(toPolicy(repo.getSnapshots()));
  builder.setReleasePolicy(toPolicy(repo.getReleases()));
  builder.setAuthentication(toAuthentication(repo.getAuthentication()));
  builder.setProxy(toProxy(repo.getProxy()));
  builder.setMirroredRepositories(toRepos(repo.getMirroredRepositories()));
  result = builder.build();
 }
 return result;
}
org.apache.maven.artifact.repositoryArtifactRepositorygetProxy

Popular methods of ArtifactRepository

  • getBasedir
  • pathOf
  • getUrl
  • getId
  • getLayout
  • getSnapshots
  • getReleases
  • find
  • pathOfLocalRepositoryMetadata
  • getAuthentication
  • getProtocol
  • pathOfRemoteRepositoryMetadata
  • getProtocol,
  • pathOfRemoteRepositoryMetadata,
  • setAuthentication,
  • setProxy,
  • setUrl,
  • isBlacklisted,
  • setId,
  • setLayout,
  • findVersions

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • JButton (javax.swing)
  • JFileChooser (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now