Package org.sonatype.nexus.client.core.subsystem.repository.maven

Examples of org.sonatype.nexus.client.core.subsystem.repository.maven.MavenProxyRepository


    final MavenHostedRepository remoteRepository = remoteRepositories().get(MavenHostedRepository.class,
        REMOTE_REPOSITORY_ID);
    remoteRepository.disableBrowsing().save();

    // create local/central proxying remote/central
    final MavenProxyRepository localRepository = localRepositories()
        .create(MavenProxyRepository.class, LOCAL_REPOSITORY_ID).asProxyOf(remoteRepository.contentUri())
        .doNotDownloadRemoteIndexes().withRepoPolicy("RELEASE").save();
    waitForRemoteToSettleDown();
    waitForLocalToSettleDown();

    assertThat(LOCAL_REPOSITORY_ID + " should not be autoblocked",
        !localRepositories().get(MavenProxyRepository.class, LOCAL_REPOSITORY_ID).status().isAutoBlocked());

    localRepository.refresh();

    assertThat(LOCAL_REPOSITORY_ID + " should not be autoblocked",
        !localRepositories().get(MavenProxyRepository.class, LOCAL_REPOSITORY_ID).status().isAutoBlocked());
  }
View Full Code Here


  public void createMaven2RepoWithDefaultValues() {
    final String id = uniqueName("nxcm5131-m2");

    doCreateMaven2Repo(id);

    MavenProxyRepository repository = repositories().get(id);

    assertThat(repository.id(), is(id));
    assertThat(repository.name(), is(id));

    assertThat(repository.itemMaxAge(), is(1440));
    assertThat(repository.artifactMaxAge(), is(0));
    assertThat(repository.metadataMaxAge(), is(0));

    assertThat(repository.isExposed(), is(false));
    assertThat(repository.isBrowsable(), is(false));
    assertThat(repository.isAutoBlocking(), is(true));
  }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.client.core.subsystem.repository.maven.MavenProxyRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.