Package org.apache.maven.archiva.common.consumers

Examples of org.apache.maven.archiva.common.consumers.Consumer


        }

        Iterator it = consumers.iterator();
        while ( it.hasNext() )
        {
            Consumer consumer = (Consumer) it.next();

            /* NOTE: Do not insert the consumer exclusion patterns here.
             * Exclusion patterns are handled by RepositoryScanner.wantsFile(Consumer, String)
             *
             * addUniqueElements( consumer.getExcludePatterns(), allExcludes );
             */
            addUniqueElements( consumer.getIncludePatterns(), allIncludes );
        }

        if ( extraFileInclusions != null )
        {
            allIncludes.addAll( extraFileInclusions );
View Full Code Here


        stats = new ScanStatistics( repository );

        Iterator it = this.consumers.iterator();
        while ( it.hasNext() )
        {
            Consumer consumer = (Consumer) it.next();

            if ( !consumer.init( this.repository ) )
            {
                throw new IllegalStateException( "Consumer [" + consumer.getName() +
                    "] is reporting that it is incompatible with the [" + repository.getId() + "] repository." );
            }
        }

        if ( SystemUtils.IS_OS_WINDOWS )
View Full Code Here

            BaseFile basefile = new BaseFile( repository.getBasedir(), file );

            Iterator itConsumers = this.consumers.iterator();
            while ( itConsumers.hasNext() )
            {
                Consumer consumer = (Consumer) itConsumers.next();

                if ( wantsFile( consumer, StringUtils.replace( basefile.getRelativePath(), "\\", "/" ) ) )
                {
                    try
                    {
                        log.debug( "Sending to consumer: " + consumer.getName() );
                        stats.filesConsumed++;
                        consumer.processFile( basefile );
                    }
                    catch ( Exception e )
                    {
                        /* Intentionally Catch all exceptions.
                         * So that the discoverer processing can continue.
                         */
                        log.error( "Consumer [" + consumer.getName() + "] had an error when processing file [" +
                            basefile.getAbsolutePath() + "]: " + e.getMessage(), e );
                    }
                }
                else
                {
                    log.debug(
                        "Skipping consumer " + consumer.getName() + " for file " + basefile.getRelativePath() );
                }
            }
        }
    }
View Full Code Here

        stats = new DiscovererStatistics( repository );

        Iterator it = this.consumers.iterator();
        while ( it.hasNext() )
        {
            Consumer consumer = (Consumer) it.next();

            if ( !consumer.init( this.repository ) )
            {
                throw new IllegalStateException( "Consumer [" + consumer.getName() +
                    "] is reporting that it is incompatible with the [" + repository.getId() + "] repository." );
            }
        }

        if ( SystemUtils.IS_OS_WINDOWS )
View Full Code Here

            BaseFile basefile = new BaseFile( repository.getBasedir(), file );

            Iterator itConsumers = this.consumers.iterator();
            while ( itConsumers.hasNext() )
            {
                Consumer consumer = (Consumer) itConsumers.next();

                if ( wantsFile( consumer, StringUtils.replace( basefile.getRelativePath(), "\\", "/" ) ) )
                {
                    try
                    {
                        getLogger().debug( "Sending to consumer: " + consumer.getName() );
                        stats.filesConsumed++;
                        consumer.processFile( basefile );
                    }
                    catch ( Exception e )
                    {
                        /* Intentionally Catch all exceptions.
                         * So that the discoverer processing can continue.
                         */
                        getLogger().error( "Consumer [" + consumer.getName() + "] had an error when processing file [" +
                            basefile.getAbsolutePath() + "]: " + e.getMessage(), e );
                    }
                }
                else
                {
                    getLogger().debug(
                        "Skipping consumer " + consumer.getName() + " for file " + basefile.getRelativePath() );
                }
            }
        }
    }
View Full Code Here

        }

        Iterator it = consumers.iterator();
        while ( it.hasNext() )
        {
            Consumer consumer = (Consumer) it.next();

            /* NOTE: Do not insert the consumer exclusion patterns here.
             * Exclusion patterns are handled by RepositoryScanner.wantsFile(Consumer, String)
             *
             * addUniqueElements( consumer.getExcludePatterns(), allExcludes );
             */
            addUniqueElements( consumer.getIncludePatterns(), allIncludes );
        }

        if ( extraFileInclusions != null )
        {
            allIncludes.addAll( extraFileInclusions );
View Full Code Here

        for ( Iterator it = consumerNames.iterator(); it.hasNext(); )
        {
            String name = (String) it.next();
            try
            {
                Consumer consumer = consumerFactory.createConsumer( name );
                consumers.add( consumer );
            }
            catch ( ConsumerException e )
            {
                getLogger().warn( e.getMessage(), e );
View Full Code Here

    {
        List filtered = new ArrayList();

        for ( Iterator it = consumers.iterator(); it.hasNext(); )
        {
            Consumer consumer = (Consumer) it.next();
            if ( consumer.init( repository ) )
            {
                // Approved!
                filtered.add( consumer );
            }
            else
            {
                getLogger().info( "Disabling consumer [" + consumer.getName() + "] for repository " + repository );
            }
        }

        return filtered;
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.common.consumers.Consumer

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.