Examples of updateTimestamp()


Examples of org.apache.maven.index.context.IndexingContext.updateTimestamp()

        for ( File artifactFile : filesToBeIndexed )
        {
            assertTrue( "file not exists " + artifactFile.getPath(), artifactFile.exists() );
            ArtifactContext ac = artifactContextProducer.getArtifactContext( context, artifactFile );
            nexusIndexer.addArtifactToIndex( ac, context );
            context.updateTimestamp( true );
        }

        if ( scan )
        {
            nexusIndexer.scan( context, new ArtifactScanListener(), false );
View Full Code Here

Examples of org.apache.maven.index.context.IndexingContext.updateTimestamp()

            // index packing optionnal ??
            //IndexPackingRequest indexPackingRequest =
            //    new IndexPackingRequest( indexingContext, indexingContext.getIndexDirectoryFile() );
            //indexPacker.packIndex( indexPackingRequest );
            indexingContext.updateTimestamp( true );

        }
        catch ( MalformedURLException e )
        {
            log.error( e.getMessage(), e );
View Full Code Here

Examples of org.apache.maven.index.context.IndexingContext.updateTimestamp()

                                // TODO check if update exists !!
                                nexusIndexer.deleteArtifactFromIndex( ac, context );
                                nexusIndexer.addArtifactToIndex( ac, context );
                            }

                            context.updateTimestamp();
                            context.commit();


                        }
                        else
View Full Code Here

Examples of org.apache.maven.index.context.IndexingContext.updateTimestamp()

                ac.getArtifactInfo().fextension = "pom";
                ac.getArtifactInfo().packaging = "pom";
                ac.getArtifactInfo().classifier = "pom";
            }
            nexusIndexer.addArtifactToIndex( ac, context );
            context.updateTimestamp( true );
        }

        if ( scan )
        {
            nexusIndexer.scan( context, new ArtifactScanListener(), false );
View Full Code Here

Examples of org.apache.maven.index.context.IndexingContext.updateTimestamp()

            scanner.scan( new ScanningRequest( tmpContext, //
                                               new DefaultScannerListener( tmpContext, indexerEngine,
                                                                           update, listener ), fromPath ) );

            tmpContext.updateTimestamp( true );
            context.replace( tmpContext.getIndexDirectory() );
        }
        catch ( Exception ex )
        {
            throw (IOException) new IOException( "Error scanning context " + context.getId() + ": " + ex ).initCause(
View Full Code Here

Examples of org.apache.maven.index.context.IndexingContext.updateTimestamp()

        FlatSearchResponse response2 = indexer.searchFlat( new FlatSearchRequest( q, tempContext ) );
        Collection<ArtifactInfo> tempContent = response2.getResults();
        assertEquals( tempContent.toString(), 2, tempContent.size() );

        // RAMDirectory is closed with context, forcing timestamp update
        tempContext.updateTimestamp( true );

        // A change in RAMDirectory and Directory behavior in general: it will copy the Index files ONLY
        // So we must make sure that timestamp file is transferred correctly.
        RAMDirectory tempDir2 = new RAMDirectory();
        IndexUtils.copyDirectory( tempContext.getIndexDirectory(), tempDir2 );
View Full Code Here

Examples of org.apache.maven.index.context.IndexingContext.updateTimestamp()

                                // TODO check if update exists !!
                                nexusIndexer.deleteArtifactFromIndex( ac, context );
                                nexusIndexer.addArtifactToIndex( ac, context );
                            }

                            context.updateTimestamp();
                            context.commit();


                        }
                        else
View Full Code Here

Examples of org.apache.maven.index.context.IndexingContext.updateTimestamp()

                ac.getArtifactInfo().fextension = "pom";
                ac.getArtifactInfo().packaging = "pom";
                ac.getArtifactInfo().classifier = "pom";
            }
            nexusIndexer.addArtifactToIndex( ac, context );
            context.updateTimestamp( true );
        }

        if ( scan )
        {
            nexusIndexer.scan( context, new ArtifactScanListener(), false );
View Full Code Here

Examples of org.apache.maven.index.context.IndexingContext.updateTimestamp()

                                // TODO check if update exists !!
                                nexusIndexer.deleteArtifactFromIndex( ac, context );
                                nexusIndexer.addArtifactToIndex( ac, context );
                            }

                            context.updateTimestamp();
                            context.commit();


                        }
                        else
View Full Code Here

Examples of org.apache.maven.index.context.IndexingContext.updateTimestamp()

            // index packing optionnal ??
            //IndexPackingRequest indexPackingRequest =
            //    new IndexPackingRequest( indexingContext, indexingContext.getIndexDirectoryFile() );
            //indexPacker.packIndex( indexPackingRequest );
            indexingContext.updateTimestamp( true );

        }
        catch ( MalformedURLException e )
        {
            log.error( e.getMessage(), e );
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.