Examples of IndexPackingRequest


Examples of org.apache.maven.index.packer.IndexPackingRequest

    public void testUpdateInvalidProperties()
        throws Exception
    {
        Properties properties = new Properties();

        IndexPackingRequest request = new IndexPackingRequest( context, indexDir );

        // No properties definite fail
        assertNull( handler.getIncrementalUpdates( request, properties ) );

        properties.setProperty( IndexingContext.INDEX_TIMESTAMP, "junk" );
View Full Code Here

Examples of org.apache.maven.index.packer.IndexPackingRequest

    public void testUpdateValid()
        throws Exception
    {
        Properties properties = new Properties();

        IndexPackingRequest request = new IndexPackingRequest( context, indexDir );

        properties.setProperty( IndexingContext.INDEX_TIMESTAMP, "19991112182432.432 -0600" );

        FileUtils.copyDirectoryStructure( new File( getBasedir(), "src/test/repo/ch" ), new File( repoDir, "ch" ) );
View Full Code Here

Examples of org.apache.maven.index.packer.IndexPackingRequest

    }

    protected void packIndex( File targetDir, IndexingContext context )
        throws IllegalArgumentException, IOException
    {
        IndexPackingRequest request = new IndexPackingRequest( context, targetDir );
        request.setUseTargetProperties( true );
        packer.packIndex( request );
    }
View Full Code Here

Examples of org.apache.maven.index.packer.IndexPackingRequest

            indexingContext.optimize();

            if ( indexMergerRequest.isPackIndex() )
            {
                IndexPackingRequest request = new IndexPackingRequest( indexingContext, indexLocation );
                indexPacker.packIndex( request );
            }

            if ( indexMergerRequest.isTemporary() )
            {
View Full Code Here

Examples of org.apache.maven.index.packer.IndexPackingRequest

            File managedRepository = new File( repository.getLocation() );
            String indexDirectory = repository.getIndexDirectory();
            final File indexLocation = StringUtils.isBlank( indexDirectory )
                ? new File( managedRepository, ".indexer" )
                : new File( indexDirectory );
            IndexPackingRequest request = new IndexPackingRequest( context, indexLocation );
            indexPacker.packIndex( request );
            context.updateTimestamp( true );

            log.debug( "Index file packaged at '{}'.", indexLocation.getPath() );
View Full Code Here

Examples of org.apache.maven.index.packer.IndexPackingRequest

            context.optimize();

            if ( !repository.isSkipPackedIndexCreation() )
            {

                IndexPackingRequest request = new IndexPackingRequest( context, context.getIndexDirectoryFile() );
                indexPacker.packIndex( request );
                context.updateTimestamp( true );

                log.debug( "Index file packaged at '{}'.", context.getIndexDirectoryFile() );
            }
View Full Code Here

Examples of org.apache.maven.index.packer.IndexPackingRequest

            indexingContext.optimize();

            if ( indexMergerRequest.isPackIndex() )
            {
                IndexPackingRequest request = new IndexPackingRequest( indexingContext, indexLocation );
                indexPacker.packIndex( request );
            }

            if ( indexMergerRequest.isTemporary() )
            {
View Full Code Here

Examples of org.apache.maven.index.packer.IndexPackingRequest

            ArtifactScanningListener listener = new IndexerListener( context, debug, quiet );

            indexer.scan( context, listener, true );

            IndexPackingRequest request = new IndexPackingRequest( context, outputFolder );

            request.setCreateChecksumFiles( createChecksums );

            request.setCreateIncrementalChunks( createIncrementalChunks );

            if ( createLegacyIndex )
            {
                request.setFormats( Arrays.asList( IndexFormat.FORMAT_LEGACY, IndexFormat.FORMAT_V1 ) );
            }
            else
            {
                request.setFormats( Arrays.asList( IndexFormat.FORMAT_V1 ) );
            }

            if ( chunkCount != null )
            {
                request.setMaxIndexChunks( chunkCount.intValue() );
            }

            packIndex( packer, request, debug, quiet );

            if ( !quiet )
View Full Code Here

Examples of org.apache.maven.index.packer.IndexPackingRequest

    }

    public void testNoIncremental()
        throws Exception
    {
        IndexPackingRequest request = new IndexPackingRequest( context, indexPackDir );
        request.setCreateIncrementalChunks( true );
        packer.packIndex( request );

        Set<String> filenames = getFilenamesFromFiles( indexPackDir.listFiles() );
        Properties props = getPropertiesFromFiles( indexPackDir.listFiles() );
View Full Code Here

Examples of org.apache.maven.index.packer.IndexPackingRequest

    }

    public void test1Incremental()
        throws Exception
    {
        IndexPackingRequest request = new IndexPackingRequest( context, indexPackDir );
        request.setCreateIncrementalChunks( true );
        packer.packIndex( request );

        copyRepoContentsAndReindex( new File( getBasedir(), "src/test/nexus-1911/repo-inc-1" ), request );

        Set<String> filenames = getFilenamesFromFiles( indexPackDir.listFiles() );
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.