Package org.sonatype.nexus.index

Examples of org.sonatype.nexus.index.NexusIndexer


        String repositoryName = cli.hasOption( NAME ) ? cli.getOptionValue( NAME ) : indexDirectory.getName();

        File repository = new File( cli.getOptionValue( REPO ) );

        NexusIndexer indexer = (NexusIndexer) plexus.lookup( NexusIndexer.class );

        IndexPacker packer = (IndexPacker) plexus.lookup( IndexPacker.class );

        IndexingContext indexingContext = indexer.addIndexingContext( //
            repositoryName, // context id
            repositoryName, // repository id
            repository, // repository folder
            indexDirectory, // index folder
            null, // repositoryUrl
            null, // index update url
            indexers,
            false);

        boolean createZip = cli.hasOption( ZIP );

        boolean debug = cli.hasOption( DEBUG );

        boolean update = cli.hasOption( UPDATE );

        ArtifactScanningListener listener = new IndexerListener( indexingContext, packer, createZip, debug, update );

        indexer.scan( indexingContext, listener, update );
    }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.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.