Package org.apache.maven.archiva.consumers

Examples of org.apache.maven.archiva.consumers.ConsumerException


            updateVersionMetadata( artifact, path );
            updateProjectMetadata( artifact, path );
        }
        catch ( LayoutException e )
        {
            throw new ConsumerException( "Unable to convert to artifact reference: " + path, e );
        }
    }
View Full Code Here


            log.debug( "Queueing indexing task + '" + task.getName() + "' to add or update the artifact in the index." );
            scheduler.queueIndexingTask( task );
        }
        catch ( TaskQueueException e )
        {
            throw new ConsumerException( e.getMessage(), e );
        }       
    }
View Full Code Here

           repoContent =
                repoFactory.getManagedRepositoryContent( artifact.getModel().getRepositoryId() );
        }
        catch ( RepositoryException e )
        {
            throw new ConsumerException( "Can't run index cleanup consumer: " + e.getMessage() );
        }

        ManagedRepositoryConfiguration repository = repoContent.getRepository();
      
        try
        {
            File artifactFile = new File( repoContent.getRepoRoot(), repoContent.toPath( artifact ) );
           
            if ( !artifactFile.exists() )
            {
                ArtifactIndexingTask task =               
                        TaskCreator.createIndexingTask( repository.getId(), artifactFile, ArtifactIndexingTask.DELETE );
               
                log.debug( "Queueing indexing task '" + task.getName() + "' to remove the artifact from the index." );
                scheduler.queueIndexingTask( task );
            }
                  
        }
        catch ( TaskQueueException e )
        {
            throw new ConsumerException( e.getMessage() );
        }
    }
View Full Code Here

            }

        }
        catch ( LayoutException le )
        {
            throw new ConsumerException( le.getMessage() );
        }

        return true;
    }
View Full Code Here

        }
        catch ( ArchivaDatabaseException e )
        {
            String emsg = "Unable to save problem with artifact location to DB: " + e.getMessage();
            getLogger().warn( emsg, e );
            throw new ConsumerException( emsg, e );
        }
    }
View Full Code Here

        }
        catch ( ArchivaDatabaseException e )
        {
            String emsg = "Unable to save problem with artifact location to DB: " + e.getMessage();
            getLogger().warn( emsg, e );
            throw new ConsumerException( emsg, e );
        }
    }
View Full Code Here

    public void beginScan( ArchivaRepository repository )
        throws ConsumerException
    {
        if ( !repository.isManaged() )
        {
            throw new ConsumerException( "Consumer requires managed repository." );
        }

        this.repository = repository;
        this.repositoryDir = new File( repository.getUrl().getPath() );

        try
        {
            this.layout = layoutFactory.getLayout( repository.getModel().getLayoutName() );
        }
        catch ( LayoutException e )
        {
            throw new ConsumerException( e.getMessage(), e );
        }
    }
View Full Code Here

    public void beginScan( ArchivaRepository repository )
        throws ConsumerException
    {
        if ( !repository.isManaged() )
        {
            throw new ConsumerException( "Consumer requires managed repository." );
        }

        this.repository = repository;
        this.repositoryDir = new File( repository.getUrl().getPath() );
        this.index = indexFactory.createFileContentIndex( repository );

        try
        {
            this.repositoryLayout = layoutFactory.getLayout( this.repository.getLayoutType() );
        }
        catch ( LayoutException e )
        {
            throw new ConsumerException( "Unable to initialize consumer due to unknown repository layout: "
                + e.getMessage(), e );
        }
    }
View Full Code Here

    {
        BidirectionalRepositoryLayout repositoryLayout = null;

        if ( !repository.isManaged() )
        {
            throw new ConsumerException( "Consumer requires managed repository." );
        }

        this.repository = repository;

        try
        {
            repositoryLayout = layoutFactory.getLayout( repository.getLayoutType() );
        }
        catch ( LayoutException e )
        {
            throw new ConsumerException(
                "Unable to initialize consumer due to unknown repository layout: " + e.getMessage(), e );
        }

        RepositoryConfiguration repoConfig = configuration.getConfiguration().findRepositoryById( repository.getId() );
        if ( repoConfig.getDaysOlder() != 0 )
View Full Code Here

            repoPurge.process( path );
        }
        catch ( RepositoryPurgeException rpe )
        {
            throw new ConsumerException( rpe.getMessage() );
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.consumers.ConsumerException

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.