Package org.apache.maven.archiva.repository.layout

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


            ProxyConnector connector = (ProxyConnector) it.next();
            ArchivaRepository targetRepository = connector.getTargetRepository();
            try
            {
                BidirectionalRepositoryLayout targetLayout = layoutFactory.getLayout( targetRepository.getLayoutType() );
                String targetPath = targetLayout.toPath( metadata );

                File downloadedFile = transferFile( connector, targetRepository, targetPath, localFile,
                                                    requestProperties );

                if ( fileExists( downloadedFile ) )
View Full Code Here


        File localFile;
        try
        {
            BidirectionalRepositoryLayout sourceLayout = layoutFactory.getLayout( repository.getLayoutType() );
            String sourcePath = sourceLayout.toPath( metadata );
            localFile = new File( repository.getUrl().getPath(), sourcePath );
        }
        catch ( LayoutException e )
        {
            throw new ProxyException( "Unable to proxy due to bad source repository layout definition: "
View Full Code Here

            ProxyConnector connector = (ProxyConnector) it.next();
            ArchivaRepository targetRepository = connector.getTargetRepository();
            try
            {
                BidirectionalRepositoryLayout targetLayout = layoutFactory.getLayout( targetRepository.getLayoutType() );
                String targetPath = targetLayout.toPath( metadata );

                File downloadedFile = transferFile( connector, targetRepository, targetPath, localFile,
                                                    requestProperties );

                if ( fileExists( downloadedFile ) )
View Full Code Here

    private File toLocalFile( ArchivaRepository repository, ArtifactReference artifact )
        throws ProxyException
    {
        BidirectionalRepositoryLayout sourceLayout = getLayout( repository );
        String sourcePath = sourceLayout.toPath( artifact );
        return new File( repository.getUrl().getPath(), sourcePath );
    }

    private File toLocalFile( ArchivaRepository repository, ProjectReference metadata )
        throws ProxyException
View Full Code Here

    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 "";
View Full Code Here

    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

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

        return new File( repoConfig.getLocation(), layout.toPath( artifact ) );
    }

    public String getDescription()
    {
        return description;
View Full Code Here

    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

                if ( artifact == null )
                {
                    throw new IOException( "Not snapshot artifact found to reference in " + reference );
                }

                File artifactFile = new File( managedRepository.getUrl().getPath(), layout.toPath( artifact ) );

                if ( artifactFile.exists() )
                {
                    Date lastModified = new Date( artifactFile.lastModified() );
                    metadata.setLastUpdatedTimestamp( lastModified );
View Full Code Here

    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 "";
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.