Package org.apache.archiva.repository

Examples of org.apache.archiva.repository.ContentNotFoundException


            path = path.substring( 0, index );
            File targetPath = new File( repoConfig.getLocation(), path );

            if ( !targetPath.exists() )
            {
                throw new ContentNotFoundException(
                    artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getVersion() );
            }

            // TODO: this should be in the storage mechanism so that it is all tied together
            // delete from file system
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

        {
            FileUtils.deleteQuietly( projectDir );
        }
        else
        {
            throw new ContentNotFoundException( "Unable to delete non-existing project directory: " + projectDir );
        }
    }
View Full Code Here

        {
            FileUtils.deleteQuietly( filePath );
        }
        else
        {
            throw new ContentNotFoundException( "Unable to delete non-existing project artifact: " + filePath );
        }
    }
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

    {
        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

TOP

Related Classes of org.apache.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.