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 );
            }
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

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

            }
            indexModifier.optimize();
        }
        catch ( IOException e )
        {
            throw new RepositoryIndexException( "Error updating index: " + e.getMessage(), e );
        }
        finally
        {
            closeQuietly( indexModifier );
            lastUpdatedTime = System.currentTimeMillis();
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

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

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

                if ( record != null )
                {
                    Document document = converter.convert( record );
                    document.add(
                        new Field( FLD_PK, record.getPrimaryKey(), Field.Store.NO, Field.Index.UN_TOKENIZED ) );

                    indexWriter.addDocument( document );
                }
            }

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

            ZipEntry entry = zipFile.getEntry( name );
            xpp3Dom = Xpp3DomBuilder.build( new InputStreamReader( zipFile.getInputStream( entry ) ) );
        }
        catch ( ZipException e )
        {
            throw new RepositoryIndexException( "Unable to read plugin metadata: " + e.getMessage(), e );
        }
        catch ( IOException e )
        {
            throw new RepositoryIndexException( "Unable to read plugin metadata: " + e.getMessage(), e );
        }
        catch ( XmlPullParserException e )
        {
            throw new RepositoryIndexException( "Unable to read plugin metadata: " + e.getMessage(), e );
        }
        finally
        {
            closeQuietly( zipFile );
        }
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.