@@ -51,19 +51,6 @@ public interface RemoteRepositoryContent extends RepositoryContent | |||
*/ | |||
RemoteRepository getRepository(); | |||
/** | |||
* <p> | |||
* Convenience method to get the repository url. | |||
* </p> | |||
* | |||
* <p> | |||
* Equivalent to calling <code>new RepositoryURL( this.getRepository().getUrl() )</code> | |||
* </p> | |||
* | |||
* @return the repository url. | |||
*/ | |||
RepositoryURL getURL(); | |||
/** | |||
* Set the repository configuration to associate with this | |||
* repository content. |
@@ -19,7 +19,6 @@ package org.apache.archiva.repository.mock; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.model.RepositoryURL; | |||
import org.apache.archiva.repository.LayoutException; | |||
import org.apache.archiva.repository.RemoteRepository; | |||
import org.apache.archiva.repository.RemoteRepositoryContent; | |||
@@ -46,12 +45,6 @@ public class RemoteRepositoryContentMock implements RemoteRepositoryContent | |||
return null; | |||
} | |||
@Override | |||
public RepositoryURL getURL( ) | |||
{ | |||
return null; | |||
} | |||
@Override | |||
public void setRepository( RemoteRepository repo ) | |||
{ |
@@ -19,7 +19,6 @@ package org.apache.archiva.proxy.maven; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.model.RepositoryURL; | |||
import org.apache.archiva.proxy.DefaultRepositoryProxyHandler; | |||
import org.apache.archiva.proxy.NotFoundException; | |||
import org.apache.archiva.proxy.NotModifiedException; | |||
@@ -27,7 +26,10 @@ import org.apache.archiva.proxy.ProxyException; | |||
import org.apache.archiva.proxy.model.NetworkProxy; | |||
import org.apache.archiva.proxy.model.ProxyConnector; | |||
import org.apache.archiva.proxy.model.RepositoryProxyHandler; | |||
import org.apache.archiva.repository.*; | |||
import org.apache.archiva.repository.ManagedRepository; | |||
import org.apache.archiva.repository.RemoteRepository; | |||
import org.apache.archiva.repository.RepositoryCredentials; | |||
import org.apache.archiva.repository.RepositoryType; | |||
import org.apache.archiva.repository.base.PasswordCredentials; | |||
import org.apache.archiva.repository.storage.StorageAsset; | |||
import org.apache.commons.lang3.StringUtils; | |||
@@ -45,6 +47,7 @@ import org.springframework.stereotype.Service; | |||
import javax.inject.Inject; | |||
import java.io.IOException; | |||
import java.net.URI; | |||
import java.nio.file.Files; | |||
import java.nio.file.Path; | |||
import java.util.ArrayList; | |||
@@ -116,14 +119,15 @@ public class MavenRepositoryProxyHandler extends DefaultRepositoryProxyHandler { | |||
* @throws ProxyException | |||
* @throws NotModifiedException | |||
*/ | |||
@Override | |||
protected void transferResources( ProxyConnector connector, RemoteRepository remoteRepository, | |||
StorageAsset tmpResource, StorageAsset[] checksumFiles, String url, String remotePath, StorageAsset resource, | |||
Path workingDirectory, ManagedRepository repository ) | |||
throws ProxyException, NotModifiedException { | |||
Wagon wagon = null; | |||
try { | |||
RepositoryURL repoUrl = remoteRepository.getContent().getURL(); | |||
String protocol = repoUrl.getProtocol(); | |||
URI repoUrl = remoteRepository.getLocation( ); | |||
String protocol = repoUrl.getScheme( ); | |||
NetworkProxy networkProxy = null; | |||
String proxyId = connector.getProxyId(); | |||
if (StringUtils.isNotBlank(proxyId)) { |
@@ -20,7 +20,6 @@ package org.apache.archiva.repository.mock; | |||
*/ | |||
import org.apache.archiva.common.utils.VersionUtil; | |||
import org.apache.archiva.model.RepositoryURL; | |||
import org.apache.archiva.repository.LayoutException; | |||
import org.apache.archiva.repository.RemoteRepository; | |||
import org.apache.archiva.repository.RemoteRepositoryContent; | |||
@@ -52,12 +51,6 @@ public class RemoteRepositoryContentMock implements RemoteRepositoryContent | |||
return repository; | |||
} | |||
@Override | |||
public RepositoryURL getURL( ) | |||
{ | |||
return new RepositoryURL(repository.getLocation().toString()); | |||
} | |||
@Override | |||
public void setRepository( RemoteRepository repo ) | |||
{ |
@@ -18,7 +18,6 @@ package org.apache.archiva.repository.maven.content; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.model.RepositoryURL; | |||
import org.apache.archiva.repository.RemoteRepository; | |||
import org.apache.archiva.repository.RemoteRepositoryContent; | |||
@@ -48,20 +47,6 @@ public class RemoteDefaultRepositoryContent | |||
return repository; | |||
} | |||
@Override | |||
public RepositoryURL getURL( ) | |||
{ | |||
try | |||
{ | |||
return new RepositoryURL( repository.getLocation( ).toString( ) ); | |||
} | |||
catch ( Exception e ) | |||
{ | |||
log.error( "Could not convert location url {}", repository.getLocation( ) ); | |||
return new RepositoryURL( "" ); | |||
} | |||
} | |||
@Override | |||
public void setRepository( RemoteRepository repository ) | |||
{ |