congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ArtifactoryClientBuilder.create
Code IndexAdd Tabnine to your IDE (free)

How to use
create
method
in
org.jfrog.artifactory.client.ArtifactoryClientBuilder

Best Java code snippets using org.jfrog.artifactory.client.ArtifactoryClientBuilder.create (Showing top 8 results out of 315)

origin: jfrog/project-examples

/**
 * This method creates an artifactory object
 */
private static Artifactory createArtifactory(String username, String password, String artifactoryUrl) {
  if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password) || StringUtils.isEmpty(artifactoryUrl)){
    throw new IllegalArgumentException("Arguments passed to createArtifactory are not valid");
  }
  return ArtifactoryClientBuilder.create()
      .setUrl(artifactoryUrl)
      .setUsername(username)
      .setPassword(password)
      .build();
}
origin: jfrog/artifactory-client-java

@Test
public void connectionTimeoutBuilderTest() {
  ArtifactoryClientBuilder builder = ArtifactoryClientBuilder.create();
  builder.setUrl("http://myhost.com:80/")
      .setConnectionTimeout(100);
  assertEquals(builder.getConnectionTimeout(), new Integer(100));
  builder.build();
}
origin: jfrog/artifactory-client-java

  @Test
  public void socketTimeoutBuilderTest() {
    ArtifactoryClientBuilder builder = ArtifactoryClientBuilder.create();
    builder.setUrl("http://myhost.com:80/")
        .setSocketTimeout(100);

    assertEquals(builder.getSocketTimeout(), new Integer(100));
    builder.build();
  }
}
origin: jfrog/artifactory-client-java

@Test
public void proxyBuilderTest() {
  ArtifactoryClientBuilder builder = ArtifactoryClientBuilder.create();
  builder.setUrl("http://myhost.com:80/");
  ProxyConfig proxy = new ProxyConfig("localhost", 9090, "http", "user", "password");
  builder.setProxy(proxy);
  assertEquals(builder.getProxy(), proxy);
  builder.build();
}
origin: jfrog/artifactory-client-java

@Test(dependsOnMethods = "testCreate")
public void testCreateDirectoryWithoutPermissions() throws IOException {
  Artifactory anonymousArtifactory = ArtifactoryClientBuilder.create().setUrl(url).build();
  try {
    anonymousArtifactory.repository(localRepository.getKey()).folder("myFolder").create();
  } catch (HttpResponseException e) {
    assertTrue(e.getStatusCode() == HttpStatus.SC_UNAUTHORIZED);
  }
}
origin: jfrog/artifactory-client-java

@Test
public void urlsBuilderTest() throws IOException {
  Artifactory artifactory;
  artifactory = ArtifactoryClientBuilder.create().setUrl("http://myhost.com/clienttests").build();
  artifactory = ArtifactoryClientBuilder.create().setUrl("http://myhost.com:80/clienttests").build();
  assertEquals("http://myhost.com:80", artifactory.getUri());
  assertEquals("clienttests", artifactory.getContextName());
  artifactory = ArtifactoryClientBuilder.create().setUrl("http://myhost.com:80/clienttests/").build();
  assertEquals("http://myhost.com:80", artifactory.getUri());
  assertEquals("clienttests", artifactory.getContextName());
  artifactory = ArtifactoryClientBuilder.create().setUrl("http://myhost.com").build();
  assertEquals("http://myhost.com", artifactory.getUri());
  assertEquals("", artifactory.getContextName());
  artifactory = ArtifactoryClientBuilder.create().setUrl("http://myhost.com:80").build();
  assertEquals("http://myhost.com:80", artifactory.getUri());
  assertEquals("", artifactory.getContextName());
  artifactory = ArtifactoryClientBuilder.create().setUrl("http://myhost.com:80/").build();
  assertEquals("http://myhost.com:80", artifactory.getUri());
  assertEquals("", artifactory.getContextName());
  artifactory = ArtifactoryClientBuilder.create()
    .setUrl("http://abc.com:80/ab/artifactory/webapp/webapp").build();
  assertEquals("http://abc.com:80", artifactory.getUri());
  assertEquals("ab/artifactory/webapp/webapp", artifactory.getContextName());
origin: jfrog/artifactory-client-java

@Test
public void urlsTest() throws IOException {
  Artifactory artifactory;
  ArtifactoryClientBuilder artifactoryClientBuilder = ArtifactoryClientBuilder.create();
  artifactory = artifactoryClientBuilder.setUrl("http://myhost.com/clienttests").setUsername("").setPassword("").build();
  assertEquals("http://myhost.com", artifactory.getUri());
  assertEquals("clienttests", artifactory.getContextName());
  artifactory = artifactoryClientBuilder.setUrl("http://myhost.com:80/clienttests").setUsername("").setPassword("").build();
  assertEquals("http://myhost.com:80", artifactory.getUri());
  assertEquals("clienttests", artifactory.getContextName());
  artifactory = artifactoryClientBuilder.setUrl("http://myhost.com:80/clienttests/").setUsername("").setPassword("").build();
  assertEquals("http://myhost.com:80", artifactory.getUri());
  assertEquals("clienttests", artifactory.getContextName());
  artifactory = artifactoryClientBuilder.setUrl("http://myhost.com").setUsername("").setPassword("").build();
  assertEquals("http://myhost.com", artifactory.getUri());
  assertEquals("", artifactory.getContextName());
  artifactory = artifactoryClientBuilder.setUrl("http://myhost.com:80").setUsername("").setPassword("").build();
  assertEquals("http://myhost.com:80", artifactory.getUri());
  assertEquals("", artifactory.getContextName());
  artifactory = artifactoryClientBuilder.setUrl("http://myhost.com:80/").setUsername("").setPassword("").build();
  assertEquals("http://myhost.com:80", artifactory.getUri());
  assertEquals("", artifactory.getContextName());
  artifactory = artifactoryClientBuilder.setUrl("http://abc.com:80/ab/artifactory/webapp/webapp").setUsername("").setPassword("").build();
  assertEquals("http://abc.com:80", artifactory.getUri());
  assertEquals("ab/artifactory/webapp/webapp", artifactory.getContextName());
  artifactory = artifactoryClientBuilder.setUrl("http://myhost.com:80/").setUsername("").setPassword("").setUserAgent("testAgent").build();
  assertEquals(artifactory.getUri(), "http://myhost.com:80");
  assertEquals("", artifactory.getContextName());
  assertEquals("testAgent", artifactory.getUserAgent());
}
origin: jfrog/artifactory-client-java

fileMd5 = "8f17d4271b86478a2731deebdab8c846";
fileSha1 = "6c98d6766e72d5575f96c9479d1c1d3b865c6e25";
artifactory = ArtifactoryClientBuilder.create()
    .setUrl(url)
    .setUsername(username)
org.jfrog.artifactory.clientArtifactoryClientBuildercreate

Popular methods of ArtifactoryClientBuilder

  • build
  • setPassword
  • setUrl
  • setUsername
  • <init>
  • createClientBuilder
  • getConnectionTimeout
  • getProxy
  • getSocketTimeout
  • getUserAgent
  • setConnectionTimeout
  • setProxy
  • setConnectionTimeout,
  • setProxy,
  • setSocketTimeout,
  • setUserAgent

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • getSystemService (Context)
  • getContentResolver (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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