Package org.apache.maven.index

Examples of org.apache.maven.index.NexusIndexer


    public void cleanupIndex()
        throws Exception
    {
        log.info( "cleanup IndexingContext" );
        NexusIndexer nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class );
        for ( IndexingContext context : nexusIndexer.getIndexingContexts().values() )
        {
            nexusIndexer.removeIndexingContext( context, true );
        }

    }
View Full Code Here


        throws RepositoryAdminException
    {

        try
        {
            NexusIndexer nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class );

            IndexingContext context = nexusIndexer.getIndexingContexts().get( repository.getId() );
            if ( context != null )
            {
                // delete content only if directory exists
                nexusIndexer.removeIndexingContext( context,
                                                    deleteContent && context.getIndexDirectoryFile().exists() );
            }
        }
        catch ( PlexusSisuBridgeException e )
        {
View Full Code Here

  @Override
  public byte[] generateFile(RepositoryData data)
    throws Exception
  {
    NexusIndexer indexer = data.getIndexer();
    IndexingContext indexingContext = data.getIndexingContext();

        Query pq = indexer.constructQuery(MAVEN.PACKAGING, "deb", SearchType.EXACT);

        IteratorSearchRequest sreq = new IteratorSearchRequest(pq, indexingContext);
        IteratorSearchResponse hits = indexer.searchIterator(sreq);

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        OutputStreamWriter w = new OutputStreamWriter(baos);

        for (ArtifactInfo hit : hits) {
View Full Code Here

    @Test
    public void testMavenIndexerLoad()
        throws Exception
    {
        NexusIndexer nexusIndexer = plexusShimComponent.lookup( NexusIndexer.class );
        Assert.assertNotNull( nexusIndexer );
    }
View Full Code Here


    protected void removeMavenIndexes()
        throws Exception
    {
        NexusIndexer nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class );

        for ( IndexingContext indexingContext : nexusIndexer.getIndexingContexts().values() )
        {
            nexusIndexer.removeIndexingContext( indexingContext, false );
        }
    }
View Full Code Here

        throws RepositoryAdminException
    {

        try
        {
            NexusIndexer nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class );

            IndexingContext context = nexusIndexer.getIndexingContexts().get( repository.getId() );
            if ( context != null )
            {
                // delete content only if directory exists
                nexusIndexer.removeIndexingContext( context,
                                                    deleteContent && context.getIndexDirectoryFile().exists() );
            }
        }
        catch ( PlexusSisuBridgeException e )
        {
View Full Code Here


    protected void removeMavenIndexes()
        throws Exception
    {
        NexusIndexer nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class );

        for ( IndexingContext indexingContext : nexusIndexer.getIndexingContexts().values() )
        {
            nexusIndexer.removeIndexingContext( indexingContext, false );
        }
    }
View Full Code Here

    public void shutdown()
        throws Exception
    {

        log.info( "cleanup IndexingContext" );
        NexusIndexer nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class );
        for ( IndexingContext context : nexusIndexer.getIndexingContexts().values() )
        {
            nexusIndexer.removeIndexingContext( context, true );
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.index.NexusIndexer

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.