Examples of MavenGroupRepository


Examples of org.sonatype.nexus.proxy.maven.MavenGroupRepository

      assertEquals(1, md2.getVersioning().getVersions().size());
      assertEquals("20020202020202", md2.getVersioning().getLastUpdated());

      // get metadata from a gidr router but switch merging off (default is on), spoofing should happen, and the
      // highest ranked repo in group (repo1) should provide the file
      MavenGroupRepository mgr =
          getRepositoryRegistry().getRepositoryWithFacet("test", MavenGroupRepository.class);
      mgr.setMergeMetadata(false);
      ((AbstractMavenGroupRepository)mgr).commitChanges();
      // mgr.getCurrentCoreConfiguration().commitChanges();
      eventBus().post(new ConfigurationChangeEvent(getApplicationConfiguration(), null, null));

      item = getRootRouter().retrieveItem(new ResourceStoreRequest("/groups/test" + spoofedPath, false));
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.MavenGroupRepository

    // in case of group member changes, the "cascade" is sync, hence
    // we have no ordering problem as we have with async updates of proxy/hosted
    // reposes on boot
    prefixFileUpdateListener.reset();

    final MavenGroupRepository mgr =
        getRepositoryRegistry().getRepositoryWithFacet(GROUP1_REPO_ID, MavenGroupRepository.class);

    mgr.removeMemberRepositoryId(HOSTED1_REPO_ID);
    getApplicationConfiguration().saveConfiguration();
    waitForRoutingBackgroundUpdates();

    assertThat(prefixFileUpdateListener.getPublished(), contains(GROUP1_REPO_ID, GROUP2_REPO_ID));

    mgr.addMemberRepositoryId(HOSTED1_REPO_ID);
    getApplicationConfiguration().saveConfiguration();
    waitForRoutingBackgroundUpdates();

    assertThat(prefixFileUpdateListener.getPublished(),
        contains(GROUP1_REPO_ID, GROUP2_REPO_ID, GROUP1_REPO_ID, GROUP2_REPO_ID));
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.MavenGroupRepository

    // in case of group member changes, the "cascade" is sync, hence
    // we have no ordering problem as we have with async updates of proxy/hosted
    // reposes on boot
    prefixFileUpdateListener.reset();

    final MavenGroupRepository mgr =
        getRepositoryRegistry().getRepositoryWithFacet(GROUP2_REPO_ID, MavenGroupRepository.class);

    mgr.removeMemberRepositoryId(GROUP1_REPO_ID);
    mgr.addMemberRepositoryId(HOSTED1_REPO_ID);
    getApplicationConfiguration().saveConfiguration();
    waitForRoutingBackgroundUpdates();

    assertThat(prefixFileUpdateListener.getPublished(), contains(GROUP2_REPO_ID));

    mgr.addMemberRepositoryId(HOSTED2_REPO_ID);
    getApplicationConfiguration().saveConfiguration();
    waitForRoutingBackgroundUpdates();

    assertThat(prefixFileUpdateListener.getPublished(),
        contains(GROUP2_REPO_ID, GROUP2_REPO_ID));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.