archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdu...@apache.org
Subject svn commit: r687001 - in /archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src: main/java/org/apache/maven/archiva/proxy/ test/java/org/apache/maven/archiva/proxy/
Date Tue, 19 Aug 2008 09:12:45 GMT
Author: jdumay
Date: Tue Aug 19 02:12:41 2008
New Revision: 687001

URL: http://svn.apache.org/viewvc?rev=687001&view=rev
Log:
MRM-541 - convenient way to take Archiva proxies "offline"


Modified:
    archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java
    archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java
    archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/CacheFailuresTransferTest.java
    archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ChecksumTransferTest.java
    archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ErrorHandlingTest.java
    archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ManagedDefaultTransferTest.java
    archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ManagedLegacyTransferTest.java
    archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java
    archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/SnapshotTransferTest.java

Modified: archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java?rev=687001&r1=687000&r2=687001&view=diff
==============================================================================
--- archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java (original)
+++ archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java Tue Aug 19 02:12:41 2008
@@ -1076,6 +1076,7 @@
                     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>();

Modified: archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java?rev=687001&r1=687000&r2=687001&view=diff
==============================================================================
--- archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java (original)
+++ archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java Tue Aug 19 02:12:41 2008
@@ -338,29 +338,29 @@
         }
     }
 
-    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 );
@@ -371,6 +371,7 @@
         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 );

Modified: archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/CacheFailuresTransferTest.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/CacheFailuresTransferTest.java?rev=687001&r1=687000&r2=687001&view=diff
==============================================================================
--- archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/CacheFailuresTransferTest.java (original)
+++ archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/CacheFailuresTransferTest.java Tue Aug 19 02:12:41 2008
@@ -60,9 +60,9 @@
 
         // 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" ) );
 
@@ -103,9 +103,9 @@
 
         // 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" ) );
 
@@ -153,9 +153,9 @@
 
         // 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 );
 

Modified: archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ChecksumTransferTest.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ChecksumTransferTest.java?rev=687001&r1=687000&r2=687001&view=diff
==============================================================================
--- archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ChecksumTransferTest.java (original)
+++ archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ChecksumTransferTest.java Tue Aug 19 02:12:41 2008
@@ -39,6 +39,27 @@
 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
     {
@@ -53,7 +74,7 @@
 
         // 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 );
 
@@ -78,7 +99,7 @@
 
         // 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 );
 
@@ -103,7 +124,7 @@
 
         // 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 );
 
@@ -127,7 +148,7 @@
 
         // 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 );
 
@@ -151,7 +172,7 @@
 
         // 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 );
 
@@ -175,7 +196,7 @@
 
         // 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 );
 
@@ -197,7 +218,7 @@
 
         // 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 );
 
@@ -222,7 +243,7 @@
 
         // 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 );
 
@@ -244,7 +265,7 @@
 
         // 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 );
 
@@ -269,7 +290,7 @@
 
         // 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 );
 
@@ -291,7 +312,7 @@
 
         // 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 );
 
@@ -316,7 +337,7 @@
 
         // 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 );
 
@@ -341,7 +362,7 @@
 
         // 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 );
 
@@ -366,7 +387,7 @@
 
         // 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 );
 
@@ -394,7 +415,7 @@
 
         // 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);
@@ -440,7 +461,7 @@
 
         // 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 );
 
@@ -466,7 +487,7 @@
 
         // 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 );
 
@@ -493,7 +514,7 @@
 
         // 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 );
 

Modified: archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ErrorHandlingTest.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ErrorHandlingTest.java?rev=687001&r1=687000&r2=687001&view=diff
==============================================================================
--- archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ErrorHandlingTest.java (original)
+++ archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ErrorHandlingTest.java Tue Aug 19 02:12:41 2008
@@ -63,7 +63,7 @@
         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() );
 
@@ -92,7 +92,7 @@
         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 );
 
@@ -107,7 +107,7 @@
 
         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() );
 
@@ -122,7 +122,7 @@
 
         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() );
 
@@ -135,7 +135,7 @@
         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 );
 
@@ -201,7 +201,7 @@
 
         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() );
 
@@ -216,7 +216,7 @@
 
         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() );
 
@@ -229,7 +229,7 @@
         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 );
 
@@ -499,14 +499,14 @@
     {
         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 )

Modified: archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ManagedDefaultTransferTest.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ManagedDefaultTransferTest.java?rev=687001&r1=687000&r2=687001&view=diff
==============================================================================
--- archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ManagedDefaultTransferTest.java (original)
+++ archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ManagedDefaultTransferTest.java Tue Aug 19 02:12:41 2008
@@ -40,6 +40,27 @@
 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
     {
@@ -54,7 +75,7 @@
 
         // 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 );
@@ -77,7 +98,7 @@
 
         // 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 );
@@ -111,7 +132,7 @@
 
         // 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 );
@@ -144,7 +165,7 @@
 
         // 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 );
@@ -189,7 +210,7 @@
 
         // 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 );
@@ -233,7 +254,7 @@
 
         // 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 );
@@ -264,7 +285,7 @@
 
         // 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 );
@@ -286,8 +307,8 @@
         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 );
@@ -316,8 +337,8 @@
         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 );
@@ -339,9 +360,9 @@
         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 );
@@ -371,8 +392,8 @@
         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 );
@@ -400,8 +421,8 @@
         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 );
@@ -446,7 +467,7 @@
         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 );
 
@@ -473,7 +494,7 @@
         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 );
 
@@ -495,7 +516,7 @@
         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 );
 
@@ -517,7 +538,7 @@
         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 );
 

Modified: archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ManagedLegacyTransferTest.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ManagedLegacyTransferTest.java?rev=687001&r1=687000&r2=687001&view=diff
==============================================================================
--- archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ManagedLegacyTransferTest.java (original)
+++ archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/ManagedLegacyTransferTest.java Tue Aug 19 02:12:41 2008
@@ -51,7 +51,7 @@
         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 );
 
@@ -80,7 +80,7 @@
 
         // 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 );
 
@@ -102,7 +102,7 @@
         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 );
 
@@ -127,7 +127,7 @@
         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 );
 
@@ -149,7 +149,7 @@
         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 );
 
@@ -171,7 +171,7 @@
         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 );
 
@@ -193,7 +193,7 @@
         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 );
 
@@ -215,7 +215,7 @@
         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 );
 

Modified: archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java?rev=687001&r1=687000&r2=687001&view=diff
==============================================================================
--- archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java (original)
+++ archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java Tue Aug 19 02:12:41 2008
@@ -95,6 +95,30 @@
      * @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()
@@ -108,9 +132,9 @@
 
         // 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 );
@@ -185,9 +209,9 @@
 
         // 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 );
@@ -211,9 +235,9 @@
 
         // 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 );
@@ -237,7 +261,7 @@
 
         // 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 );
@@ -259,9 +283,9 @@
 
         // 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 );
@@ -285,9 +309,9 @@
 
         // 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 );
@@ -313,7 +337,7 @@
 
         // 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 );
@@ -386,9 +410,9 @@
 
         // 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 );
@@ -416,7 +440,7 @@
 
         // 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 );
 
@@ -443,7 +467,7 @@
 
         // 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 );
 
@@ -470,7 +494,7 @@
 
         // 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 );
 
@@ -496,9 +520,9 @@
 
         // 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 );
@@ -527,7 +551,7 @@
 
         // 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 );
@@ -578,9 +602,9 @@
 
         // 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 );
@@ -603,7 +627,7 @@
 
         // 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 );
 
@@ -624,7 +648,7 @@
 
         // 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 );
 
@@ -644,9 +668,9 @@
 
         // 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 );
@@ -669,9 +693,9 @@
 
         // 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 );
@@ -695,7 +719,7 @@
 
         // 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 );
@@ -751,9 +775,9 @@
 
         // 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 );
@@ -777,9 +801,9 @@
 
         // 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 );
@@ -803,7 +827,7 @@
 
         // 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 );
@@ -825,9 +849,9 @@
 
         // 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 );
@@ -851,9 +875,9 @@
 
         // 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 );
@@ -879,7 +903,7 @@
 
         // 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 );

Modified: archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/SnapshotTransferTest.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/SnapshotTransferTest.java?rev=687001&r1=687000&r2=687001&view=diff
==============================================================================
--- archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/SnapshotTransferTest.java (original)
+++ archiva/branches/MRM-541/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/SnapshotTransferTest.java Tue Aug 19 02:12:41 2008
@@ -50,7 +50,7 @@
         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 );
@@ -70,7 +70,7 @@
         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 );
 
@@ -92,7 +92,7 @@
         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 );
 
@@ -115,7 +115,7 @@
         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 );
@@ -207,7 +207,7 @@
         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 );
 
@@ -230,7 +230,7 @@
         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 );
 
@@ -253,9 +253,9 @@
 
         // 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 );
 
@@ -277,7 +277,7 @@
         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 );
 
@@ -303,7 +303,7 @@
         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 );
 



Mime
View raw message