Examples of supported()


Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

  }

  protected void buildPathMatcherFor(final MavenProxyRepository mavenProxyRepository) {
    try {
      final PrefixSource prefixSource = manager.getPrefixSourceFor(mavenProxyRepository);
      if (prefixSource.supported()) {
        final PathMatcher pathMatcher = new PathMatcher(prefixSource.readEntries(), Integer.MAX_VALUE);
        pathMatchers.put(mavenProxyRepository.getId(), pathMatcher);
      }
      else {
        dropPathMatcherFor(mavenProxyRepository);
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

      // this is never null
      final PrefixSource oldPrefixSource = getPrefixSourceFor(mavenProxyRepository);
      // does repo goes from unpublished to published or other way around?
      final boolean stateChanged =
          (oldPrefixSource.supported()) != (prefixSource != null && prefixSource.supported());
      if (prefixSource != null && prefixSource.supported()) {
        if (stateChanged) {
          log.info("Updated and published prefix file of {}",
              RepositoryStringUtils.getHumanizedNameString(mavenProxyRepository));
        }
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

      // this is never null
      final PrefixSource oldPrefixSource = getPrefixSourceFor(mavenRepository);
      // does repo goes from unpublished to published or other way around?
      final boolean stateChanged =
          (oldPrefixSource.supported()) != (prefixSource != null && prefixSource.supported());

      if (prefixSource != null && prefixSource.supported()) {
        if (stateChanged) {
          log.info("Updated and published prefix file of {}",
              RepositoryStringUtils.getHumanizedNameString(mavenRepository));
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

      log.debug("Results of {} remote discovery: {}", mavenProxyRepository,
          discoveryResult.getAllResults());

      if (discoveryResult.isSuccessful()) {
        final PrefixSource remotePrefixSource = discoveryResult.getPrefixSource();
        if (remotePrefixSource.supported()) {
          // grab local too and merge them
          final DiscoveryResult<MavenRepository> localDiscoveryResult =
              localContentDiscoverer.discoverLocalContent(mavenProxyRepository);
          if (localDiscoveryResult.isSuccessful()) {
            final HashSet<String> mergedEntries = Sets.newHashSet();
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

          final List<String> membersWithoutPrefixFiles = new ArrayList<String>();
          for (Repository member : mavenGroupRepository.getMemberRepositories()) {
            final MavenRepository memberMavenRepository = member.adaptToFacet(MavenRepository.class);
            if (null != memberMavenRepository) {
              final PrefixSource ps = getPrefixSourceFor(memberMavenRepository);
              if (!ps.supported()) {
                membersWithoutPrefixFiles.add(memberMavenRepository.getName());
              }
            }
          }
          message =
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

    {
      final PrefixSource groupPrefixSource =
          wm.getPrefixSourceFor(getRepositoryRegistry().getRepositoryWithFacet(GROUP1_REPO_ID,
              MavenRepository.class));

      assertThat("Group1 should have WL", groupPrefixSource.supported());

      final List<String> groupEntries = groupPrefixSource.readEntries();
      assertThat(groupEntries, hasSize(1));
      assertThat(groupEntries, hasItem("/org/apache"));
    }
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

    {
      final PrefixSource groupPrefixSource =
          wm.getPrefixSourceFor(getRepositoryRegistry().getRepositoryWithFacet(GROUP2_REPO_ID,
              MavenRepository.class));

      assertThat("Group2 should have WL", groupPrefixSource.supported());

      final List<String> groupEntries = groupPrefixSource.readEntries();
      assertThat(groupEntries, hasSize(2));
      assertThat(groupEntries, hasItem("/org/apache"));
      assertThat(groupEntries, hasItem("/eu/flatwhite"));
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

    {
      final PrefixSource groupPrefixSource =
          wm.getPrefixSourceFor(getRepositoryRegistry().getRepositoryWithFacet(GROUP1_REPO_ID,
              MavenRepository.class));

      assertThat("Group1 should have WL", groupPrefixSource.supported());

      final List<String> groupEntries = groupPrefixSource.readEntries();
      assertThat(groupEntries, hasSize(4));
      assertThat(groupEntries, hasItem("/org/apache"));
      assertThat(groupEntries, hasItem("/org/sonatype"));
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

    {
      final PrefixSource groupPrefixSource =
          wm.getPrefixSourceFor(getRepositoryRegistry().getRepositoryWithFacet(GROUP2_REPO_ID,
              MavenRepository.class));

      assertThat("Group2 should have WL", groupPrefixSource.supported());

      final List<String> groupEntries = groupPrefixSource.readEntries();
      assertThat(groupEntries, hasSize(4));
      assertThat(groupEntries, hasItem("/org/apache"));
      assertThat(groupEntries, hasItem("/org/sonatype"));
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

    final Manager routingManager = lookup(Manager.class);
    final PrefixSource proxyPrefixSource = routingManager.getPrefixSourceFor(proxyRepository);

    assertThat("Prefix file for proxy repository should exists", proxyPrefixSource.exists());
    assertThat("Prefix file for proxy repository should be discovered", proxyPrefixSource.supported());
    assertThat("Prefix file should be instanceof FilePrefixSource", proxyPrefixSource instanceof FilePrefixSource);

    final List<String> entries = proxyPrefixSource.readEntries();
    // first 3 entries are from remote prefix file, see remotePrefixFile() method
    // last 4th entry was "sneaked" in to storage (simulating locally but not remotely available file)
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.