Examples of BidirectionalRepositoryLayout


Examples of org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayout

        }

        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: "
                + e.getMessage(), e );
        }

        Properties requestProperties = new Properties();

        List connectors = getProxyConnectors( repository );
        Iterator it = connectors.iterator();
        while ( it.hasNext() )
        {
            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
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.