Package org.apache.maven.archiva.indexer

Examples of org.apache.maven.archiva.indexer.RepositoryIndexException


                        }
                    }
                }
                catch ( IOException e )
                {
                    throw new RepositoryIndexException( "Error deleting document: " + e.getMessage(), e );
                }
                finally
                {
                    closeQuietly( indexReader );
                    closeQuietly( terms );
View Full Code Here


        }
        else if ( indexLocation.isDirectory() )
        {
            if ( indexLocation.listFiles().length > 1 )
            {
                throw new RepositoryIndexException( indexLocation + " is not a valid index directory." );
            }
            else
            {
                return false;
            }
        }
        else
        {
            throw new RepositoryIndexException( indexLocation + " is not a directory." );
        }
    }
View Full Code Here

            }
        }
        catch ( IOException e )
        {
            // write should compain if it can't be closed, data probably not persisted
            throw new RepositoryIndexException( e.getMessage(), e );
        }
    }
View Full Code Here

            }
            indexModifier.optimize();
        }
        catch ( IOException e )
        {
            throw new RepositoryIndexException( "Error updating index: " + e.getMessage(), e );
        }
        finally
        {
            closeQuietly( indexModifier );
        }
View Full Code Here

            }
            indexModifier.optimize();
        }
        catch ( IOException e )
        {
            throw new RepositoryIndexException( "Error updating index: " + e.getMessage(), e );
        }
        finally
        {
            closeQuietly( indexModifier );
        }
View Full Code Here

            indexWriter = new IndexWriter( indexLocation, indexHandlers.getAnalyzer(), !exists() );
            indexWriter.setMaxFieldLength( MAX_FIELD_LENGTH );
        }
        catch ( IOException e )
        {
            throw new RepositoryIndexException( "Unable to open index", e );
        }

        try
        {
            for ( Iterator i = records.iterator(); i.hasNext(); )
            {
                LuceneRepositoryContentRecord record = (LuceneRepositoryContentRecord) i.next();

                if ( record != null )
                {
                    Document document = indexHandlers.getConverter().convert( record );

                    indexWriter.addDocument( document );
                }
            }

            indexWriter.optimize();
        }
        catch ( IOException e )
        {
            throw new RepositoryIndexException( "Failed to add an index document", e );
        }
        finally
        {
            closeQuietly( indexWriter );
        }
View Full Code Here

                    }
                }
            }
            catch ( IOException e )
            {
                throw new RepositoryIndexException( "Error deleting document: " + e.getMessage(), e );
            }
            finally
            {
                closeQuietly( indexReader );
            }
View Full Code Here

                    }
                }
            }
            catch ( IOException e )
            {
                throw new RepositoryIndexException( "Error deleting document: " + e.getMessage(), e );
            }
            finally
            {
                closeQuietly( indexReader );
                closeQuietly( terms );
View Full Code Here

        }
        else if ( indexLocation.isDirectory() )
        {
            if ( indexLocation.listFiles().length > 1 )
            {
                throw new RepositoryIndexException( indexLocation + " is not a valid index directory." );
            }
            else
            {
                return false;
            }
        }
        else
        {
            throw new RepositoryIndexException( indexLocation + " is not a directory." );
        }
    }
View Full Code Here

            }
        }
        catch ( IOException e )
        {
            // write should compain if it can't be closed, data probably not persisted
            throw new RepositoryIndexException( e.getMessage(), e );
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.indexer.RepositoryIndexException

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.