Package org.sonatype.nexus.index

Examples of org.sonatype.nexus.index.ArtifactInfo$VersionComparator


        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


        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

        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

        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

        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

            for ( int i = start; i < end; i++ )
            {
                Document doc = hits.doc( i );

                ArtifactInfo artifactInfo = indexingContext.constructArtifactInfo( doc );

                if ( artifactInfo != null )
                {
                    artifactInfo.repository = indexingContext.getRepositoryId();
View Full Code Here

        if ( hits != null && hits.length() != 0 )
        {
            for ( int i = 0; i < hits.length(); i++ )
            {
                ArtifactInfo artifactInfo = indexingContext.constructArtifactInfo( hits.doc( i ) );

                if ( artifactInfo != null )
                {
                    artifactInfo.repository = indexingContext.getRepositoryId();
View Full Code Here

                    Hits hits = s.search( new TermQuery( term ) );

                    if ( hits.length() == 0 )
                    {
                        ArtifactInfo info = constructArtifactInfo( d );
                        ArtifactContext artifactContext = new ArtifactContext( null, null, null, info );
                        ArtifactIndexingContext indexingContext = new DefaultArtifactIndexingContext( artifactContext );

                        Document doc = new Document();
View Full Code Here

    public ArtifactInfo constructArtifactInfo( Document doc )
    {
        boolean res = false;

        ArtifactInfo artifactInfo = new ArtifactInfo();

        artifactInfo.context = getId();

        for ( IndexCreator ic : getIndexCreators() )
        {
View Full Code Here

        {
            count++;

            long t = System.currentTimeMillis();

            ArtifactInfo ai = ac.getArtifactInfo();

            if ( debug && "maven-plugin".equals( ai.packaging ) )
            {
                System.err.printf( "Plugin: %s:%s:%s - %s %s\n", //
                    ai.groupId,
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.index.ArtifactInfo$VersionComparator

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.