Package org.apache.maven.archiva.repository

Examples of org.apache.maven.archiva.repository.ContentNotFoundException


    {
        File groupDir = new File( repository.getLocation(), reference.getGroupId() );

        if ( !groupDir.exists() )
        {
            throw new ContentNotFoundException( "Unable to get versions using a non-existant groupId directory: "
                + groupDir.getAbsolutePath() );
        }

        if ( !groupDir.isDirectory() )
        {
            throw new ContentNotFoundException( "Unable to get versions using a non-directory: "
                + groupDir.getAbsolutePath() );
        }

        // First gather up the versions found as artifacts in the managed repository.
        File typeDirs[] = groupDir.listFiles();
View Full Code Here


        File artifactFile = toFile( reference );
        File repoDir = artifactFile.getParentFile();

        if ( !repoDir.exists() )
        {
            throw new ContentNotFoundException( "Unable to get related artifacts using a non-existant directory: "
                + repoDir.getAbsolutePath() );
        }

        if ( !repoDir.isDirectory() )
        {
            throw new ContentNotFoundException( "Unable to get related artifacts using a non-directory: "
                + repoDir.getAbsolutePath() );
        }

        Set<ArtifactReference> foundArtifacts = new HashSet<ArtifactReference>();
View Full Code Here

    {
        File groupDir = new File( repository.getLocation(), reference.getGroupId() );

        if ( !groupDir.exists() )
        {
            throw new ContentNotFoundException( "Unable to get versions using a non-existant groupId directory: "
                + groupDir.getAbsolutePath() );
        }

        if ( !groupDir.isDirectory() )
        {
            throw new ContentNotFoundException( "Unable to get versions using a non-directory: "
                + groupDir.getAbsolutePath() );
        }

        Set<String> foundVersions = new HashSet<String>();
View Full Code Here

    {
        File groupDir = new File( repository.getLocation(), reference.getGroupId() );

        if ( !groupDir.exists() )
        {
            throw new ContentNotFoundException( "Unable to get versions using a non-existant groupId directory: "
                + groupDir.getAbsolutePath() );
        }

        if ( !groupDir.isDirectory() )
        {
            throw new ContentNotFoundException( "Unable to get versions using a non-directory: "
                + groupDir.getAbsolutePath() );
        }

        Set<String> foundVersions = new HashSet<String>();
View Full Code Here

                // TODO: log this somewhere?
            }
        }
        else
        {
            throw new ContentNotFoundException( "Unable to delete non-existing project directory." );
        }
    }
View Full Code Here

        File artifactFile = toFile( reference );
        File repoDir = artifactFile.getParentFile();

        if ( !repoDir.exists() )
        {
            throw new ContentNotFoundException( "Unable to get related artifacts using a non-existant directory: "
                + repoDir.getAbsolutePath() );
        }

        if ( !repoDir.isDirectory() )
        {
            throw new ContentNotFoundException( "Unable to get related artifacts using a non-directory: "
                + repoDir.getAbsolutePath() );
        }

        Set<ArtifactReference> foundArtifacts = new HashSet<ArtifactReference>();
View Full Code Here

        File repoDir = new File( repository.getLocation(), path );

        if ( !repoDir.exists() )
        {
            throw new ContentNotFoundException( "Unable to get Versions on a non-existant directory: "
                + repoDir.getAbsolutePath() );
        }

        if ( !repoDir.isDirectory() )
        {
            throw new ContentNotFoundException( "Unable to get Versions on a non-directory: "
                + repoDir.getAbsolutePath() );
        }

        Set<String> foundVersions = new HashSet<String>();
        VersionedReference versionRef = new VersionedReference();
View Full Code Here

        File repoDir = new File( repository.getLocation(), path );

        if ( !repoDir.exists() )
        {
            throw new ContentNotFoundException( "Unable to get versions on a non-existant directory: "
                + repoDir.getAbsolutePath() );
        }

        if ( !repoDir.isDirectory() )
        {
            throw new ContentNotFoundException( "Unable to get versions on a non-directory: "
                + repoDir.getAbsolutePath() );
        }

        Set<String> foundVersions = new HashSet<String>();
View Full Code Here

            // proxied maven-metadata.xml files.
            Set<String> snapshotVersions = gatherSnapshotVersions( managedRepository, reference );

            if ( snapshotVersions.isEmpty() )
            {
                throw new ContentNotFoundException( "No snapshot versions found on reference ["
                    + VersionedReference.toKey( reference ) + "]." );
            }

            // sort the list to determine to aide in determining the Latest version.
            List<String> sortedVersions = new ArrayList<String>();
View Full Code Here

            int index = path.lastIndexOf( '/' );
            File targetPath = new File( repoConfig.getLocation(), path.substring( 0, index ) );

            if ( !targetPath.exists() )
            {
                throw new ContentNotFoundException( groupId + ":" + artifactId + ":" + version );
            }

            // delete from file system
            repository.deleteVersion( ref );
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.repository.ContentNotFoundException

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.