Examples of ArtifactInfo


Examples of org.apache.maven.index.ArtifactInfo

        for ( int i = 0; i < r1.maxDoc(); i++ )
        {
            Document document = r1.document( i );

            ArtifactInfo ai = IndexUtils.constructArtifactInfo( document, context );

            if ( ai != null )
            {
                map.put( ai.getUinfo(), ai );
            }
        }

        return map;
    }
View Full Code Here

Examples of org.apache.maven.index.ArtifactInfo

        assertFalse( new File( repositoryConfig.getLocation(), ".index" ).exists() );
        assertEquals( 1, response.getTotalHits() );

        Set<ArtifactInfo> results = response.getResults();

        ArtifactInfo artifactInfo = results.iterator().next();
        assertEquals( "org.apache.archiva", artifactInfo.groupId );
        assertEquals( "archiva-index-methods-jar-test", artifactInfo.artifactId );
        assertEquals( "test-repo", artifactInfo.repository );

    }
View Full Code Here

Examples of org.apache.maven.index.ArtifactInfo

        FlatSearchRequest request = new FlatSearchRequest( q, getIndexingContext() );
        FlatSearchResponse response = indexer.searchFlat( request );

        Set<ArtifactInfo> results = response.getResults();

        ArtifactInfo artifactInfo = results.iterator().next();
        assertEquals( "org.apache.archiva", artifactInfo.groupId );
        assertEquals( "archiva-index-methods-jar-test", artifactInfo.artifactId );
        assertEquals( "test-repo", artifactInfo.repository );

        assertEquals( 1, response.getTotalHits() );
View Full Code Here

Examples of org.apache.maven.index.ArtifactInfo

        final Document d = r.document(i);
        final String uinfo = d.get(ArtifactInfo.UINFO);
        if (uinfo != null && !processedUinfos.contains(uinfo)) {
          // file is not present in storage but is on index, delete it from index
          final String[] ra = ArtifactInfo.FS_PATTERN.split(uinfo);
          final ArtifactInfo ai = new ArtifactInfo();
          ai.repository = context.getRepositoryId();
          ai.groupId = ra[0];
          ai.artifactId = ra[1];
          ai.version = ra[2];
          if (ra.length > 3) {
            ai.classifier = ArtifactInfo.renvl(ra[3]);
          }
          if (ra.length > 4) {
            ai.packaging = ArtifactInfo.renvl(ra[4]);
          }

          // minimal ArtifactContext for removal
          final ArtifactContext ac = new ArtifactContext(null, null, null, ai, ai.calculateGav());
          if (contextPath == null
              || context.getGavCalculator().gavToPath(ac.getGav()).startsWith(contextPath)) {
            if (IndexOp.DELETED == remove(ac)) {
              deleted++;
            }
View Full Code Here

Examples of org.apache.maven.index.ArtifactInfo

          if (ac != null) {
            if (log.isDebugEnabled()) {
              log.debug("The ArtifactContext created from file is fine, continuing.");
            }

            ArtifactInfo ai = ac.getArtifactInfo();

            if (ai.sha1 == null) {
              // if repo has no sha1 checksum, odd nexus one
              ai.sha1 =
                  item.getRepositoryItemAttributes().get(DigestCalculatingInspector.DIGEST_SHA1_KEY);
View Full Code Here

Examples of org.platformlayer.ops.cas.jenkins.JenkinsClient.BuildInfo.ArtifactInfo

      if (buildInfo == null) {
        return null;
      }

      String fingerprintFileName = fingerprint.getFileName();
      ArtifactInfo found = buildInfo.findArtifactByFileName(fingerprintFileName);
      if (found == null) {
        log.warn("Could not find artifact: " + fingerprint + " in " + buildInfo);
        return null;
      }

      URI url = found.getArtifactUrl();
      return new JenkinsCasObject(this, hash, url);
    } catch (JenkinsException e) {
      throw new OpsException("Error communicating with Jenkins", e);
    }
  }
View Full Code Here

Examples of org.sonatype.nexus.index.ArtifactInfo

        assertTrue( new File( repositoryConfig.getLocation(), ".index" ).exists() );
        assertEquals( 1, response.getTotalHits() );
       
        Set<ArtifactInfo> results = response.getResults();
       
        ArtifactInfo artifactInfo = (ArtifactInfo) results.iterator().next();
        assertEquals( "org.apache.archiva", artifactInfo.groupId );
        assertEquals( "archiva-index-methods-jar-test", artifactInfo.artifactId );
        assertEquals( "test-repo", artifactInfo.repository );
    }
View Full Code Here

Examples of org.sonatype.nexus.index.ArtifactInfo

        assertFalse( new File( repositoryConfig.getLocation(), ".index" ).exists() );
        assertEquals( 1, response.getTotalHits() );

        Set<ArtifactInfo> results = response.getResults();

        ArtifactInfo artifactInfo = (ArtifactInfo) results.iterator().next();
        assertEquals( "org.apache.archiva", artifactInfo.groupId );
        assertEquals( "archiva-index-methods-jar-test", artifactInfo.artifactId );
        assertEquals( "test-repo", artifactInfo.repository );

        context.close( true );
View Full Code Here

Examples of org.sonatype.nexus.index.ArtifactInfo

        assertEquals( 1, response.getTotalHits() );

        Set<ArtifactInfo> results = response.getResults();

        ArtifactInfo artifactInfo = (ArtifactInfo) results.iterator().next();
        assertEquals( "org.apache.archiva", artifactInfo.groupId );
        assertEquals( "archiva-index-methods-jar-test", artifactInfo.artifactId );
        assertEquals( "test-repo", artifactInfo.repository );

        context.close( true );
View Full Code Here

Examples of org.sonatype.nexus.index.ArtifactInfo

        assertTrue( new File( repositoryConfig.getLocation(), ".index" ).exists() );
        assertEquals( 1, response.getTotalHits() );
       
        Set<ArtifactInfo> results = response.getResults();
       
        ArtifactInfo artifactInfo = (ArtifactInfo) results.iterator().next();
        assertEquals( "org.apache.archiva", artifactInfo.groupId );
        assertEquals( "archiva-index-methods-jar-test", artifactInfo.artifactId );
        assertEquals( "test-repo", artifactInfo.repository );
    }
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.