Examples of toPath()


Examples of org.apache.archiva.repository.ManagedRepositoryContent.toPath()

            artifactReference.setClassifier( fileMetadata.getClassifier() );
            artifactReference.setType( packaging );

            ManagedRepositoryContent repository = repositoryFactory.getManagedRepositoryContent( repositoryId );

            String artifactPath = repository.toPath( artifactReference );

            int lastIndex = artifactPath.lastIndexOf( '/' );

            String path = artifactPath.substring( 0, lastIndex );
            File targetPath = new File( repoConfig.getLocation(), path );
View Full Code Here

Examples of org.apache.archiva.repository.ManagedRepositoryContent.toPath()

            artifactReference.setType(
                StringUtils.isEmpty( fileMetadata.getPackaging() ) ? packaging : fileMetadata.getPackaging() );

            ManagedRepositoryContent repository = repositoryFactory.getManagedRepositoryContent( repositoryId );

            String artifactPath = repository.toPath( artifactReference );

            int lastIndex = artifactPath.lastIndexOf( '/' );

            String path = artifactPath.substring( 0, lastIndex );
            File targetPath = new File( repoConfig.getLocation(), path );
View Full Code Here

Examples of org.apache.archiva.repository.ManagedRepositoryContent.toPath()

                            log.warn( "skip fail to find timestamped snapshot file: {}", e.getMessage() );
                        }
                    }
                }

                String path = managedRepositoryContent.toPath( archivaArtifact );

                file = connectors.fetchFromProxies( managedRepositoryContent, path );

                if ( file != null && file.exists() )
                {
View Full Code Here

Examples of org.apache.archiva.repository.ManagedRepositoryContent.toPath()

        {

            ManagedRepositoryContent sourceRepository =
                repositoryFactory.getManagedRepositoryContent( artifactTransferRequest.getRepositoryId() );

            String artifactSourcePath = sourceRepository.toPath( artifactReference );

            if ( StringUtils.isEmpty( artifactSourcePath ) )
            {
                log.error( "cannot find artifact " + artifactTransferRequest.toString() );
                throw new ArchivaRestServiceException( "cannot find artifact " + artifactTransferRequest.toString(),
View Full Code Here

Examples of org.apache.archiva.repository.RemoteRepositoryContent.toPath()

            }

            RemoteRepositoryContent targetRepository = connector.getTargetRepository();
            requestProperties.setProperty( "remoteRepositoryId", targetRepository.getId() );

            String targetPath = targetRepository.toPath( artifact );

            try
            {
                File downloadedFile =
                    transferFile( connector, targetRepository, targetPath, repository, localFile, requestProperties,
View Full Code Here

Examples of org.apache.maven.archiva.repository.ManagedRepositoryContent.toPath()

            artifactReference.setClassifier( classifier );
            artifactReference.setType( packaging );

            ManagedRepositoryContent repository = repositoryFactory.getManagedRepositoryContent( repositoryId );

            String artifactPath = repository.toPath( artifactReference );

            int lastIndex = artifactPath.lastIndexOf( '/' );

            File targetPath = new File( repoConfig.getLocation(), artifactPath.substring( 0, lastIndex ) );
View Full Code Here

Examples of org.apache.maven.archiva.repository.RemoteRepositoryContent.toPath()

        List<ProxyConnector> connectors = getProxyConnectors( repository );
        for ( ProxyConnector connector : connectors )
        {
            RemoteRepositoryContent targetRepository = connector.getTargetRepository();
            String targetPath = targetRepository.toPath( artifact );

            try
            {
                File downloadedFile = transferFile( connector, targetRepository, targetPath, localFile,
                                                    requestProperties );
View Full Code Here

Examples of org.apache.maven.archiva.repository.content.ManagedDefaultRepositoryContent.toPath()

            new ArchivaArtifact( "org.apache.archiva", "archiva-lucene-consumers", "1.2", null, "jar", "test-repo" );

        ManagedRepositoryContent repoContent = new ManagedDefaultRepositoryContent();
        repoContent.setRepository( repositoryConfig );

        File artifactFile = new File( repoContent.getRepoRoot(), repoContent.toPath( artifact ) );

        repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( repositoryConfig.getId() ),
                                            repoContent );

        repoFactoryControl.replay();
View Full Code Here

Examples of org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayout.toPath()

        {
            getLogger().warn( "Unable to determine layout of " + artifact + ": " + e.getMessage(), e );
            return null;
        }

        String path = layout.toPath( artifact );
        RepositoryURL url = new RepositoryURL( repoConfig.getUrl() );
        return new File( url.getPath(), path );
    }

    public String getDescription()
View Full Code Here

Examples of org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayout.toPath()

    private String toPath( ArchivaArtifact artifact )
    {
        try
        {
            BidirectionalRepositoryLayout layout = layoutFactory.getLayout( artifact );
            return layout.toPath( artifact );
        }
        catch ( LayoutException e )
        {
            getLogger().warn( "Unable to calculate path for artifact: " + artifact );
            return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.