connector.setProxyId( proxyConfig.getProxyId() );
connector.setPolicies( proxyConfig.getPolicies() );
connector.setOrder( proxyConfig.getOrder() );
+ connector.setDisabled( proxyConfig.isDisabled() );
// Copy any blacklist patterns.
List<String> blacklist = new ArrayList<String>();
}
}
- protected void saveConnector( String sourceRepoId, String targetRepoId )
+ protected void saveConnector( String sourceRepoId, String targetRepoId, boolean disabled )
{
saveConnector( sourceRepoId, targetRepoId, ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, disabled );
}
protected void saveConnector( String sourceRepoId, String targetRepoId, String checksumPolicy, String releasePolicy,
- String snapshotPolicy, String cacheFailuresPolicy )
+ String snapshotPolicy, String cacheFailuresPolicy, boolean disabled )
{
saveConnector( sourceRepoId, targetRepoId, checksumPolicy, releasePolicy, snapshotPolicy, cacheFailuresPolicy,
- PropagateErrorsDownloadPolicy.QUEUE );
+ PropagateErrorsDownloadPolicy.QUEUE, disabled );
}
protected void saveConnector( String sourceRepoId, String targetRepoId, String checksumPolicy, String releasePolicy,
- String snapshotPolicy, String cacheFailuresPolicy, String errorPolicy )
+ String snapshotPolicy, String cacheFailuresPolicy, String errorPolicy, boolean disabled )
{
saveConnector( sourceRepoId, targetRepoId, checksumPolicy, releasePolicy, snapshotPolicy, cacheFailuresPolicy,
- errorPolicy, PropagateErrorsOnUpdateDownloadPolicy.NOT_PRESENT );
+ errorPolicy, PropagateErrorsOnUpdateDownloadPolicy.NOT_PRESENT, disabled );
}
protected void saveConnector( String sourceRepoId, String targetRepoId, String checksumPolicy, String releasePolicy,
String snapshotPolicy, String cacheFailuresPolicy, String errorPolicy,
- String errorOnUpdatePolicy )
+ String errorOnUpdatePolicy, boolean disabled )
{
ProxyConnectorConfiguration connectorConfig = new ProxyConnectorConfiguration();
connectorConfig.setSourceRepoId( sourceRepoId );
connectorConfig.addPolicy( ProxyConnectorConfiguration.POLICY_CACHE_FAILURES, cacheFailuresPolicy );
connectorConfig.addPolicy( ProxyConnectorConfiguration.POLICY_PROPAGATE_ERRORS, errorPolicy );
connectorConfig.addPolicy( ProxyConnectorConfiguration.POLICY_PROPAGATE_ERRORS_ON_UPDATE, errorOnUpdatePolicy );
+ connectorConfig.setDisabled(disabled);
int count = config.getConfiguration().getProxyConnectors().size();
config.getConfiguration().addProxyConnector( connectorConfig );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "badproxied1", ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.YES );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.YES, false );
saveConnector( ID_DEFAULT_MANAGED, "badproxied2", ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.YES );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.YES, false );
wagonMock.get( path, new File( expectedFile.getParentFile(), expectedFile.getName() + ".tmp" ) );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "badproxied1", ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
saveConnector( ID_DEFAULT_MANAGED, "badproxied2", ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
wagonMock.get( path, new File( expectedFile.getParentFile(), expectedFile.getName() + ".tmp" ) );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.YES );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.YES, false );
saveConnector( ID_DEFAULT_MANAGED, "proxied2", ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.YES );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.YES, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
public class ChecksumTransferTest
extends AbstractProxyTestCase
{
+ public void testGetChecksumWhenConnectorIsDisabled()
+ throws Exception
+ {
+ String path = "org/apache/maven/test/get-checksum-both-right/1.0/get-checksum-both-right-1.0.jar";
+ setupTestableManagedRepository( path );
+
+ File expectedFile = new File( managedDefaultDir, path );
+ ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
+
+ FileUtils.deleteDirectory( expectedFile.getParentFile() );
+ assertFalse( expectedFile.exists() );
+
+ // Configure Connector (usually done within archiva.xml configuration)
+ saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS,
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, true );
+
+ File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
+
+ assertNull(downloadedFile);
+ }
+
public void testGetChecksumBothCorrect()
throws Exception
{
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.FAIL, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.FAIL, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.FAIL, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.FAIL, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "badproxied", ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
wagonMock.get( path, new File( expectedFile.getAbsolutePath() + ".tmp" ) );
wagonMockControl.setMatcher(customWagonGetMatcher);
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO , false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FAIL, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO , false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO , false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
File expectedFile = setupRepositoriesWithLocalFileNotPresent( path );
createMockedProxyConnector( ID_MOCKED_PROXIED1, NAME_MOCKED_PROXIED1, PropagateErrorsDownloadPolicy.STOP );
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2 );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, false );
simulateGetError( path, expectedFile, createTransferException() );
String path = PATH_IN_BOTH_REMOTES_NOT_LOCAL;
File expectedFile = setupRepositoriesWithLocalFileNotPresent( path );
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1 );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false );
createMockedProxyConnector( ID_MOCKED_PROXIED2, NAME_MOCKED_PROXIED2, PropagateErrorsDownloadPolicy.STOP );
createMockedProxyConnector( ID_MOCKED_PROXIED1, NAME_MOCKED_PROXIED1, PropagateErrorsDownloadPolicy.STOP );
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2 );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, false );
simulateGetError( path, expectedFile, createResourceNotFoundException() );
createMockedProxyConnector( ID_MOCKED_PROXIED1, NAME_MOCKED_PROXIED1, PropagateErrorsDownloadPolicy.STOP );
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2 );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, false );
simulateGetError( path, expectedFile, createTransferException() );
String path = PATH_IN_BOTH_REMOTES_NOT_LOCAL;
File expectedFile = setupRepositoriesWithLocalFileNotPresent( path );
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1 );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false );
createMockedProxyConnector( ID_MOCKED_PROXIED2, NAME_MOCKED_PROXIED2, PropagateErrorsDownloadPolicy.QUEUE );
createMockedProxyConnector( ID_MOCKED_PROXIED1, NAME_MOCKED_PROXIED1, PropagateErrorsDownloadPolicy.QUEUE );
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2 );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, false );
simulateGetError( path, expectedFile, createResourceNotFoundException() );
createMockedProxyConnector( ID_MOCKED_PROXIED1, NAME_MOCKED_PROXIED1, PropagateErrorsDownloadPolicy.IGNORE );
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2 );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, false );
simulateGetError( path, expectedFile, createTransferException() );
String path = PATH_IN_BOTH_REMOTES_NOT_LOCAL;
File expectedFile = setupRepositoriesWithLocalFileNotPresent( path );
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1 );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false );
createMockedProxyConnector( ID_MOCKED_PROXIED2, NAME_MOCKED_PROXIED2, PropagateErrorsDownloadPolicy.IGNORE );
{
saveRemoteRepositoryConfig( id, name, "test://bad.machine.com/repo/", "default" );
saveConnector( ID_DEFAULT_MANAGED, id, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS, SnapshotsPolicy.ALWAYS,
- CachedFailuresPolicy.NO, errorPolicy );
+ CachedFailuresPolicy.NO, errorPolicy, false );
}
private void createMockedProxyConnector( String id, String name, String errorPolicy, String errorOnUpdatePolicy )
{
saveRemoteRepositoryConfig( id, name, "test://bad.machine.com/repo/", "default" );
saveConnector( ID_DEFAULT_MANAGED, id, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS, SnapshotsPolicy.ALWAYS,
- CachedFailuresPolicy.NO, errorPolicy, errorOnUpdatePolicy );
+ CachedFailuresPolicy.NO, errorPolicy, errorOnUpdatePolicy, false );
}
private File setupRepositoriesWithLocalFileNotPresent( String path )
public class ManagedDefaultTransferTest
extends AbstractProxyTestCase
{
+ public void testGetDefaultLayoutNotPresentConnectorOffline()
+ throws Exception
+ {
+ String path = "org/apache/maven/test/get-default-layout/1.0/get-default-layout-1.0.jar";
+ setupTestableManagedRepository( path );
+
+ File expectedFile = new File( managedDefaultDir, path );
+ ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
+
+ // Ensure file isn't present first.
+ assertNotExistsInManagedDefaultRepo( expectedFile );
+
+ // Configure Connector (usually done within archiva.xml configuration)
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ONCE, SnapshotsPolicy.ONCE,
+ CachedFailuresPolicy.NO, true );
+
+ // Attempt the proxy fetch.
+ File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
+ assertNull("File should not have been downloaded", downloadedFile);
+ }
+
public void testGetDefaultLayoutNotPresent()
throws Exception
{
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ONCE, SnapshotsPolicy.ONCE,
- CachedFailuresPolicy.NO );
+ CachedFailuresPolicy.NO, false );
// Attempt the proxy fetch.
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ONCE, SnapshotsPolicy.ONCE,
- CachedFailuresPolicy.NO );
+ CachedFailuresPolicy.NO, false );
// Attempt the proxy fetch.
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, path );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ONCE, SnapshotsPolicy.ONCE,
- CachedFailuresPolicy.NO );
+ CachedFailuresPolicy.NO, false );
// Attempt the proxy fetch.
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ONCE, SnapshotsPolicy.ONCE,
- CachedFailuresPolicy.NO );
+ CachedFailuresPolicy.NO, false );
// Attempt the proxy fetch.
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, path );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
// Attempt the proxy fetch.
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
// Attempt the proxy fetch.
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.DAILY, SnapshotsPolicy.DAILY,
- CachedFailuresPolicy.NO );
+ CachedFailuresPolicy.NO, false );
// Attempt the proxy fetch.
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
assertNotExistsInManagedDefaultRepo( expectedFile );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1 );
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2 );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1 , false );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2 , false );
// Attempt the proxy fetch.
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
assertNotExistsInManagedDefaultRepo( expectedFile );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1 );
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2 );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, false );
// Attempt the proxy fetch.
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
assertNotExistsInManagedDefaultRepo( expectedFile );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1 );
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2 );
- saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, false );
+ saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED, false );
// Attempt the proxy fetch.
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
wagonMockControl.replay();
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, "badproxied" );
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2 );
+ saveConnector( ID_DEFAULT_MANAGED, "badproxied", false );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, false );
// Attempt the proxy fetch.
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
saveRemoteRepositoryConfig( "badproxied2", "Bad Proxied 2", "test://dead.machine.com/repo/", "default" );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, "badproxied1" );
- saveConnector( ID_DEFAULT_MANAGED, "badproxied2" );
+ saveConnector( ID_DEFAULT_MANAGED, "badproxied1", false );
+ saveConnector( ID_DEFAULT_MANAGED, "badproxied2", false );
File tmpFile = new File( expectedFile.getParentFile(), expectedFile.getName() + ".tmp" );
wagonMock.get( path, tmpFile );
assertTrue( expectedFile.exists() );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED );
+ saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
assertTrue( expectedFile.exists() );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED );
+ saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
assertNotExistsInManagedDefaultRepo( expectedFile );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED );
+ saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED, false);
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
assertNotExistsInManagedDefaultRepo( expectedFile );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED );
+ saveConnector( ID_DEFAULT_MANAGED, ID_LEGACY_PROXIED, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
assertNotExistsInManagedLegacyRepo( expectedFile );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_LEGACY_MANAGED, ID_PROXIED1 );
+ saveConnector( ID_LEGACY_MANAGED, ID_PROXIED1, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedLegacyRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_LEGACY_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedLegacyRepository, artifact );
assertNotExistsInManagedLegacyRepo( expectedFile );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_LEGACY_MANAGED, ID_LEGACY_PROXIED );
+ saveConnector( ID_LEGACY_MANAGED, ID_LEGACY_PROXIED, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedLegacyRepository, artifact );
ArtifactReference artifact = managedLegacyRepository.toArtifactReference( path );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_LEGACY_MANAGED, ID_LEGACY_PROXIED );
+ saveConnector( ID_LEGACY_MANAGED, ID_LEGACY_PROXIED, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedLegacyRepository, artifact );
assertTrue( expectedFile.exists() );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_LEGACY_MANAGED, ID_LEGACY_PROXIED );
+ saveConnector( ID_LEGACY_MANAGED, ID_LEGACY_PROXIED, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedLegacyRepository, artifact );
assertTrue( expectedFile.exists() );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_LEGACY_MANAGED, ID_PROXIED1 );
+ saveConnector( ID_LEGACY_MANAGED, ID_PROXIED1, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedLegacyRepository, artifact );
assertNotExistsInManagedLegacyRepo( expectedFile );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_LEGACY_MANAGED, ID_LEGACY_PROXIED );
+ saveConnector( ID_LEGACY_MANAGED, ID_LEGACY_PROXIED, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedLegacyRepository, artifact );
assertNotExistsInManagedLegacyRepo( expectedFile );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_LEGACY_MANAGED, ID_PROXIED1 );
+ saveConnector( ID_LEGACY_MANAGED, ID_PROXIED1, false );
File downloadedFile = proxyHandler.fetchFromProxies( managedLegacyRepository, artifact );
* @plexus.requirement
*/
private MetadataTools metadataTools;
+
+ public void testGetProjectMetadataProxiedNotLocalOnRemoteConnectoDisabled()
+ throws Exception
+ {
+ // New project metadata that does not exist locally but exists on remote.
+ String requestedResource = "org/apache/maven/test/get-found-in-proxy/maven-metadata.xml";
+ setupTestableManagedRepository( requestedResource );
+
+ // Configure Connector (usually done within archiva.xml configuration)
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, true);
+
+ assertResourceNotFound( requestedResource );
+ assertNoRepoMetadata( ID_PROXIED1, requestedResource );
+
+ File expectedFile = new File( managedDefaultDir, requestedResource );
+
+ ProjectReference metadata = createProjectReference( requestedResource );
+
+ File downloadedFile = proxyHandler.fetchMetatadaFromProxies( managedDefaultRepository, managedDefaultRepository.toMetadataPath(metadata) );
+
+ assertNull( "Should not have downloaded a file.", downloadedFile );
+ assertNoTempFiles( expectedFile );
+ }
// TODO: same test for other fetch* methods
public void testFetchFromTwoProxiesWhenFirstConnectionFails()
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, "badproxied1", ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
assertResourceNotFound( requestedResource );
assertNoRepoMetadata( "badproxied1", requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
assertResourceNotFound( requestedResource );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
assertResourceNotFound( requestedResource );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertResourceNotFound( requestedResource );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertProjectMetadataContents( requestedResource, new String[] { "1.0" }, null, null );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertProjectMetadataContents( requestedResource, new String[] { "1.0-beta-2" }, null, null );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertProjectMetadataContents( requestedResource, new String[] { "1.0.8", "1.0.22" }, null, null );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertResourceNotFound( requestedResource );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertResourceNotFound( requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertReleaseMetadataContents( requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertReleaseMetadataContents( requestedResource );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertReleaseMetadataContents( requestedResource );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertResourceNotFound( requestedResource );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertNoMetadata( requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertResourceNotFound( requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertSnapshotMetadataContents( requestedResource, "20070822", "021008", 3 );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertResourceExists( requestedResource );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertSnapshotMetadataContents( requestedResource, "20050831", "101112", 1 );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
assertResourceNotFound( requestedResource );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false);
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
assertResourceNotFound( requestedResource );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
assertResourceNotFound( requestedResource );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
assertGroupMetadataContents( requestedResource, new String[] { "plugin1" } );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
assertGroupMetadataContents( requestedResource, new String[] { "plugin5" } );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
assertGroupMetadataContents( requestedResource, new String[] { "plugin6", "plugin7" } );
assertNoRepoMetadata( ID_PROXIED1, requestedResource );
assertFalse( expectedFile.exists() );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1);
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false);
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
assertNotDownloaded( downloadedFile );
assertFalse( expectedFile.exists() );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1);
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false);
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
expectedFile.setLastModified( getPastDate().getTime() );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1);
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false);
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1 );
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false );
// Attempt to download.
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
proxiedFile.setLastModified( getFutureDate().getTime() );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1);
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false);
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1);
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false);
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
// Configure Connector (usually done within archiva.xml configuration)
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.YES );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.YES , false);
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS,
- SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.YES );
+ SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.YES , false);
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
assertFalse( expectedFile.exists() );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1);
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false);
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
expectedFile.setLastModified( getPastDate().getTime() );
// Configure Connector (usually done within archiva.xml configuration)
- saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1);
+ saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false);
File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );