Package org.apache.maven.index.context

Examples of org.apache.maven.index.context.IndexingContext


            context );

        {
            Directory tempIndexDirectory = new RAMDirectory();

            IndexingContext tempContext =
                indexer.addIndexingContext( repositoryId + "temp", repositoryId, null, tempIndexDirectory,
                    repositoryUrl, null, MIN_CREATORS );

            indexer.addArtifactToIndex(
                createArtifactContext( repositoryId, "commons-lang", "commons-lang", "2.4", null ), tempContext );

            indexer.addArtifactToIndex( createArtifactContext( repositoryId, "junit", "junit", "3.8", null ),
                tempContext );

            indexer.addArtifactToIndex(
                createArtifactContext( repositoryId, "org.slf4j.foo", "jcl104-over-slf4j", "1.4.2", null ), context );

            RAMDirectory tempDir2 = new RAMDirectory( tempContext.getIndexDirectory() );

            indexer.removeIndexingContext( tempContext, false );

            context.merge( tempDir2 );
        }
View Full Code Here


        final String indexUrl = repositoryUrl + ".index";
        final Date contextTimestamp = df.parse( "20081125010000.000 -0600" );

        final ResourceFetcher mockFetcher = mockery.mock( ResourceFetcher.class );

        final IndexingContext tempContext = mockery.mock( IndexingContext.class );

        final Properties localProps = new Properties();
        localProps.setProperty( IndexingContext.INDEX_CHUNK_COUNTER, "1" );
        localProps.setProperty( IndexingContext.INDEX_CHAIN_ID, "someid" );
        localProps.setProperty( IndexingContext.INDEX_TIMESTAMP, "20081125010000.000 -0600" );
View Full Code Here

        final String indexUrl = repositoryUrl + ".index";
        final Date contextTimestamp = df.parse( "20081125010000.000 -0600" );

        final ResourceFetcher mockFetcher = mockery.mock( ResourceFetcher.class );

        final IndexingContext tempContext = mockery.mock( IndexingContext.class );

        mockery.checking( new Expectations()
        {
            {
                allowing( tempContext ).getIndexDirectoryFile();
View Full Code Here

        final String indexUrl = repositoryUrl + ".index";
        final Date contextTimestamp = df.parse( "20081128000000.000 -0600" );

        final ResourceFetcher mockFetcher = mockery.mock( ResourceFetcher.class );

        final IndexingContext tempContext = mockery.mock( IndexingContext.class );

        final Properties localProps = new Properties();
        localProps.setProperty( IndexingContext.INDEX_CHUNK_COUNTER, "1" );
        localProps.setProperty( IndexingContext.INDEX_CHAIN_ID, "someid" );
View Full Code Here

        final String indexUrl = repositoryUrl + ".index";
        final Date contextTimestamp = df.parse( "20081128000000.000 -0600" );

        final ResourceFetcher mockFetcher = mockery.mock( ResourceFetcher.class );

        final IndexingContext tempContext = mockery.mock( IndexingContext.class );

        mockery.checking( new Expectations()
        {
            {
                allowing( tempContext ).getIndexDirectoryFile();
View Full Code Here

        final String indexUrl = repositoryUrl + ".index";
        final Date contextTimestamp = df.parse( "20081128000000.000 -0600" );

        final ResourceFetcher mockFetcher = mockery.mock( ResourceFetcher.class );

        final IndexingContext tempContext = mockery.mock( IndexingContext.class );

        final Properties localProps = new Properties();
        localProps.setProperty( IndexingContext.INDEX_CHUNK_COUNTER, "3" );
        localProps.setProperty( IndexingContext.INDEX_CHAIN_ID, "someid" );
View Full Code Here

        final String indexUrl = repositoryUrl + ".index";
        final Date contextTimestamp = df.parse( "20081128000000.000 -0600" );

        final ResourceFetcher mockFetcher = mockery.mock( ResourceFetcher.class );

        final IndexingContext tempContext = mockery.mock( IndexingContext.class );

        mockery.checking( new Expectations()
        {
            {
                allowing( tempContext ).getIndexDirectoryFile();
View Full Code Here

        final String indexUrl = repositoryUrl + ".index";
        final Date contextTimestamp = df.parse( "20081128000000.000 -0600" );

        final ResourceFetcher mockFetcher = mockery.mock( ResourceFetcher.class );

        final IndexingContext tempContext = mockery.mock( IndexingContext.class );

        mockery.checking( new Expectations()
        {
            {
                allowing( tempContext ).getIndexDirectoryFile();
View Full Code Here

        repoIndexDir.mkdirs();

        System.out.println(
            "creating Index with id " + contextId + " path : " + filePath + " , indexPath " + repoIndex );

        IndexingContext indexingContext =
            nexusIndexer.addIndexingContext( contextId, contextId, repo, repoIndexDir, "http://www.apache.org",
                                             "http://www.apache.org/.index", indexCreators );
        indexingContext.setSearchable( true );
        nexusIndexer.scan( indexingContext, false );

        indexingContext.optimize();

        File managedRepository = new File( repoIndex );
        final File indexLocation = new File( managedRepository, ".index" );
        IndexPackingRequest request = new IndexPackingRequest( indexingContext, indexLocation );
        indexPacker.packIndex( request );
View Full Code Here

    @Override
    protected void prepareNexusIndexer( NexusIndexer nexusIndexer )
        throws Exception
    {
        IndexingContext ctx1 =
            nexusIndexer.addIndexingContext( "repo1", "repo1", new File( reposBase, "repo1" ), new File( idxsBase,
                "repo1" ), null, null, MIN_CREATORS );
        nexusIndexer.scan( ctx1 );

        IndexingContext ctx2 =
            nexusIndexer.addIndexingContext( "repo2", "repo2", new File( reposBase, "repo2" ), new File( idxsBase,
                "repo2" ), null, null, MIN_CREATORS );
        nexusIndexer.scan( ctx2 );

        IndexingContext ctx3 =
            nexusIndexer.addIndexingContext( "repo3", "repo3", new File( reposBase, "repo3" ), new File( idxsBase,
                "repo3" ), null, null, MIN_CREATORS );
        nexusIndexer.scan( ctx3 );

        IndexingContext ctx4 =
            nexusIndexer.addIndexingContext( "repo4", "repo4", new File( reposBase, "repo4" ), new File( idxsBase,
                "repo4" ), null, null, MIN_CREATORS );
        nexusIndexer.scan( ctx4 );

        context =
View Full Code Here

TOP

Related Classes of org.apache.maven.index.context.IndexingContext

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.