Examples of ArtifactInfo


Examples of org.apache.maven.index.ArtifactInfo

    }

    public void populateArtifactInfo( ArtifactContext artifactContext )
        throws IOException
    {
        ArtifactInfo ai = artifactContext.getArtifactInfo();

        File artifactFile = artifactContext.getArtifact();

        // TODO : olamy : supports only jars ?
View Full Code Here

Examples of org.apache.maven.index.ArtifactInfo

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

        assertEquals( 1, r.size() );

        ArtifactInfo ai = r.iterator().next();

        assertEquals( "com.adobe.flexunit", ai.groupId );
        assertEquals( "flexunit", ai.artifactId );
        assertEquals( "0.90", ai.version );
        assertEquals( null, ai.classifier );
View Full Code Here

Examples of org.apache.maven.index.ArtifactInfo

        IteratorSearchResponse response = indexer.searchIterator( request );

        assertEquals( "15 total hits (before filtering!)", 15, response.getTotalHits() );

        ArtifactInfo ai = response.getResults().next();
        assertTrue( "Iterator has to have next (2 should be returned)", ai != null );

        ai = response.getResults().next();
        assertTrue( "Iterator has to have next (2 should be returned)", ai != null );
View Full Code Here

Examples of org.apache.maven.index.ArtifactInfo

            return null;
        }

        boolean res = false;

        ArtifactInfo artifactInfo = new ArtifactInfo();

        for ( IndexCreator ic : context.getIndexCreators() )
        {
            res |= ic.updateArtifactInfo( doc, artifactInfo );
        }
View Full Code Here

Examples of org.apache.maven.index.ArtifactInfo

        return updateDocument( doc, context, true );
    }

    public static Document updateDocument( Document doc, IndexingContext context, boolean updateLastModified )
    {
        ArtifactInfo ai = constructArtifactInfo( doc, context );
        if ( ai == null )
        {
            return doc;
        }

        Document document = new Document();

        // unique key
        document.add( new Field( ArtifactInfo.UINFO, ai.getUinfo(), Field.Store.YES, Field.Index.NOT_ANALYZED ) );

        if ( updateLastModified || doc.getField( ArtifactInfo.LAST_MODIFIED ) == null )
        {
            document.add( new Field( ArtifactInfo.LAST_MODIFIED, //
                Long.toString( System.currentTimeMillis() ), Field.Store.YES, Field.Index.NO ) );
View Full Code Here

Examples of org.apache.maven.index.ArtifactInfo

                String uinfo = d.get( ArtifactInfo.UINFO );

                if ( uinfo != null )
                {
                    ArtifactInfo info = IndexUtils.constructArtifactInfo( d, this );
                    rootGroups.add( info.getRootGroup() );
                    allGroups.add( info.groupId );
                }
            }

            setRootGroups( rootGroups );
View Full Code Here

Examples of org.apache.maven.index.ArtifactInfo

        assertEquals( 4, r.size() );

        List<ArtifactInfo> list = new ArrayList<ArtifactInfo>( r );

        ArtifactInfo ai = null;

        // g a v p c #1
        ai = list.get( 0 );

        assertEquals( "ant", ai.groupId );
View Full Code Here

Examples of org.apache.maven.index.ArtifactInfo

                                  "src/test/repo-with-osgi/org/apache/karaf/features/org.apache.karaf.features.command/2.2.2/org.apache.karaf.features.command-2.2.2.jar" );

        File pom = new File( getBasedir(),
                             "src/test/repo-with-osgi/org/apache/karaf/features/org.apache.karaf.features.command/2.2.2/org.apache.karaf.features.command-2.2.2.pom" );

        ArtifactInfo artifactInfo =
            new ArtifactInfo( "test", "org.apache.karaf.features", "org.apache.karaf.features.command", "2.2.2", null );

        ArtifactContext artifactContext = new ArtifactContext( pom, artifact, null, artifactInfo, null );

        indexCreator.populateArtifactInfo( artifactContext );

        assertNotNull( "bundleSymbolicName", artifactContext.getArtifactInfo().bundleSymbolicName );

        assertNotNull( "bundleVersion", artifactContext.getArtifactInfo().bundleVersion );

        assertNotNull( "bundleExportPackage", artifactContext.getArtifactInfo().bundleExportPackage );

        assertEquals( "org.apache.karaf.features.command", artifactContext.getArtifactInfo().bundleSymbolicName );

        assertEquals( "2.2.2", artifactContext.getArtifactInfo().bundleVersion );

        assertEquals(
            "org.apache.karaf.features.command.completers;uses:=\"org.apache.karaf.features,org.apache.karaf.shell.console,org.apache.karaf.shell.console.completer\";version=\"2.2.2\",org.apache.karaf.features.command;uses:=\"org.apache.felix.gogo.commands,org.apache.karaf.features,org.apache.karaf.shell.console,org.osgi.framework,org.apache.felix.service.command\";version=\"2.2.2\"",
            artifactContext.getArtifactInfo().bundleExportPackage );

        ArtifactInfo ai = artifactContext.getArtifactInfo();

        assertEquals( "This bundle provides the Karaf shell commands to manipulate features.", ai.bundleDescription );
        assertEquals( "Apache Karaf :: Features :: Command", ai.bundleName );
        assertEquals( "http://www.apache.org/licenses/LICENSE-2.0.txt", ai.bundleLicense );
        assertEquals( "http://www.apache.org/", ai.bundleDocUrl );
View Full Code Here

Examples of org.apache.maven.index.ArtifactInfo

            FlatSearchResponse response = nexusIndexer.searchFlat( request );

            //System.out.println("results with export package query " + response.getResults() );
            assertEquals( 1, response.getResults().size() );

            ArtifactInfo ai = response.getResults().iterator().next();

            assertEquals( "org.apache.karaf.features", ai.groupId );
            assertEquals( "org.apache.karaf.features.command", ai.artifactId );
            assertEquals( "2.2.2", ai.version );
            assertEquals( "org.apache.karaf.features.command", ai.bundleSymbolicName );
View Full Code Here

Examples of org.apache.maven.index.ArtifactInfo

            FlatSearchResponse response = nexusIndexer.searchFlat( request );

            //System.out.println("results with export package query " + response.getResults() );
            assertEquals( 1, response.getResults().size() );

            ArtifactInfo ai = response.getResults().iterator().next();
            System.out.println( "ai " + ai );

            assertEquals( "org.apache.felix", ai.groupId );
            assertEquals( "org.apache.felix.bundlerepository", ai.artifactId );
            assertEquals( "1.6.6", ai.version );
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.