aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-configuration
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-09-30 11:09:56 +0000
committerOlivier Lamy <olamy@apache.org>2011-09-30 11:09:56 +0000
commit1b443210882d1bf05d4c8c619a159d6b6fd61d25 (patch)
tree3afd17198f50c16d63af9bfcad9efdd754703444 /archiva-modules/archiva-base/archiva-configuration
parent21f14a45f0c2f511a82c055a1473252cf1cd80f2 (diff)
downloadarchiva-1b443210882d1bf05d4c8c619a159d6b6fd61d25.tar.gz
archiva-1b443210882d1bf05d4c8c619a159d6b6fd61d25.zip
[MRM-1527] remove http://download.java.net/maven/2/ from default remote repositories (now sync with central) .
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1177595 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-configuration')
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml22
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java43
2 files changed, 19 insertions, 46 deletions
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml b/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml
index 51b54f82f..5705f8460 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml
+++ b/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml
@@ -34,12 +34,6 @@
<url>http://repo1.maven.org/maven2</url>
<layout>default</layout>
</remoteRepository>
- <remoteRepository>
- <id>maven2-repository.dev.java.net</id>
- <name>Java.net Repository for Maven 2</name>
- <url>http://download.java.net/maven/2/</url>
- <layout>default</layout>
- </remoteRepository>
</remoteRepositories>
<proxyConnectors>
@@ -57,22 +51,6 @@
<whiteListPattern>**/*</whiteListPattern>
</whiteListPatterns>
</proxyConnector>
- <proxyConnector>
- <sourceRepoId>internal</sourceRepoId>
- <targetRepoId>maven2-repository.dev.java.net</targetRepoId>
- <proxyId/>
- <policies>
- <snapshots>disabled</snapshots>
- <releases>once</releases>
- <checksum>fix</checksum>
- <cache-failures>cached</cache-failures>
- </policies>
- <whiteListPatterns>
- <whiteListPattern>javax/**</whiteListPattern>
- <whiteListPattern>org/jvnet/**</whiteListPattern>
- <whiteListPattern>com/sun/**</whiteListPattern>
- </whiteListPatterns>
- </proxyConnector>
</proxyConnectors>
<legacyArtifactPaths>
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java
index 7c027290d..28bc6fcfb 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java
+++ b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java
@@ -76,15 +76,13 @@ public class ArchivaConfigurationTest
public void testGetConfigurationFromRegistryWithASingleNamedConfigurationResource()
throws Exception
{
- ArchivaConfiguration archivaConfiguration =
- (ArchivaConfiguration) lookup( ArchivaConfiguration.class, "test-configuration" );
+ ArchivaConfiguration archivaConfiguration = lookup( ArchivaConfiguration.class, "test-configuration" );
Configuration configuration = archivaConfiguration.getConfiguration();
- assertConfiguration( configuration );
+ assertConfiguration( configuration, 2, 2, 2 );
assertEquals( "check network proxies", 1, configuration.getNetworkProxies().size() );
- ManagedRepositoryConfiguration repository =
- (ManagedRepositoryConfiguration) configuration.getManagedRepositories().get( 0 );
+ ManagedRepositoryConfiguration repository = configuration.getManagedRepositories().get( 0 );
assertEquals( "check managed repositories", "${appserver.base}/repositories/internal",
repository.getLocation() );
@@ -102,7 +100,7 @@ public class ArchivaConfigurationTest
(ArchivaConfiguration) lookup( ArchivaConfiguration.class, "test-defaults" );
Configuration configuration = archivaConfiguration.getConfiguration();
- assertConfiguration( configuration );
+ assertConfiguration( configuration, 2, 1, 1 );
assertEquals( "check network proxies", 0, configuration.getNetworkProxies().size() );
ManagedRepositoryConfiguration repository =
@@ -139,10 +137,10 @@ public class ArchivaConfigurationTest
null );
ArchivaConfiguration archivaConfiguration =
- (ArchivaConfiguration) lookup( ArchivaConfiguration.class, "test-defaults-default-repo-location-exists" );
+ lookup( ArchivaConfiguration.class, "test-defaults-default-repo-location-exists" );
Configuration configuration = archivaConfiguration.getConfiguration();
- assertConfiguration( configuration );
+ assertConfiguration( configuration, 2, 1, 1 );
ManagedRepositoryConfiguration repository =
(ManagedRepositoryConfiguration) configuration.getManagedRepositories().get( 0 );
@@ -155,22 +153,23 @@ public class ArchivaConfigurationTest
private void assertConfiguration( Configuration configuration )
throws Exception
{
- assertConfiguration( configuration, 2 );
+ assertConfiguration( configuration, 2, 2, 1 );
}
/**
* Ensures that the provided configuration matches the details present in the archiva-default.xml file.
*/
- private void assertConfiguration( Configuration configuration, int managedExpected )
+ private void assertConfiguration( Configuration configuration, int managedExpected, int remoteExpected,
+ int proxyConnectorExpected )
throws Exception
{
FileTypes filetypes = lookup( FileTypes.class );
assertEquals( "check managed repositories: " + configuration.getManagedRepositories(), managedExpected,
configuration.getManagedRepositories().size() );
- assertEquals( "check remote repositories: " + configuration.getRemoteRepositories(), 2,
+ assertEquals( "check remote repositories: " + configuration.getRemoteRepositories(), remoteExpected,
configuration.getRemoteRepositories().size() );
- assertEquals( "check proxy connectors:" + configuration.getProxyConnectors(), 2,
+ assertEquals( "check proxy connectors:" + configuration.getProxyConnectors(), proxyConnectorExpected,
configuration.getProxyConnectors().size() );
RepositoryScanningConfiguration repoScanning = configuration.getRepositoryScanning();
@@ -196,8 +195,7 @@ public class ArchivaConfigurationTest
public void testGetConfigurationFromRegistryWithTwoConfigurationResources()
throws Exception
{
- ArchivaConfiguration archivaConfiguration =
- (ArchivaConfiguration) lookup( ArchivaConfiguration.class, "test-configuration-both" );
+ ArchivaConfiguration archivaConfiguration = lookup( ArchivaConfiguration.class, "test-configuration-both" );
Configuration configuration = archivaConfiguration.getConfiguration();
@@ -594,7 +592,7 @@ public class ArchivaConfigurationTest
// we just use the defaults when upgrading from 0.9 at this point.
Configuration configuration = archivaConfiguration.getConfiguration();
// test-upgrade-09 contains a managed with id: local so it's 3 managed
- assertConfiguration( configuration, 3 );
+ assertConfiguration( configuration, 3, 1, 1 );
assertEquals( "check network proxies", 0, configuration.getNetworkProxies().size() );
ManagedRepositoryConfiguration repository = configuration.getManagedRepositories().get( 0 );
@@ -625,7 +623,7 @@ public class ArchivaConfigurationTest
archivaConfiguration.reload();
Configuration configuration = archivaConfiguration.getConfiguration();
- assertConfiguration( configuration );
+ assertConfiguration( configuration, 2, 2, 2 );
assertEquals( "check network proxies", 1, configuration.getNetworkProxies().size() );
ManagedRepositoryConfiguration repository = configuration.getManagedRepositories().get( 0 );
@@ -668,11 +666,10 @@ public class ArchivaConfigurationTest
public void testArchivaV1()
throws Exception
{
- ArchivaConfiguration archivaConfiguration =
- (ArchivaConfiguration) lookup( ArchivaConfiguration.class, "test-archiva-v1" );
+ ArchivaConfiguration archivaConfiguration = lookup( ArchivaConfiguration.class, "test-archiva-v1" );
Configuration configuration = archivaConfiguration.getConfiguration();
- assertConfiguration( configuration );
+ assertConfiguration( configuration, 2, 2, 2 );
assertEquals( "check network proxies", 1, configuration.getNetworkProxies().size() );
assertEquals( "check managed repositories", 2, configuration.getManagedRepositories().size() );
@@ -843,17 +840,15 @@ public class ArchivaConfigurationTest
public void testGetConfigurationFixEmptyRemoteRepoUsernamePassword()
throws Exception
{
- ArchivaConfiguration archivaConfiguration =
- (ArchivaConfiguration) lookup( ArchivaConfiguration.class, "test-configuration" );
+ ArchivaConfiguration archivaConfiguration = lookup( ArchivaConfiguration.class, "test-configuration" );
archivaConfiguration.reload();
Configuration configuration = archivaConfiguration.getConfiguration();
- assertConfiguration( configuration );
+ assertConfiguration( configuration, 2, 2, 2 );
assertEquals( "check remote repositories", 2, configuration.getRemoteRepositories().size() );
RemoteRepositoryConfiguration repository =
- (RemoteRepositoryConfiguration) configuration.getRemoteRepositoriesAsMap().get(
- "maven2-repository.dev.java.net" );
+ configuration.getRemoteRepositoriesAsMap().get( "maven2-repository.dev.java.net" );
assertEquals( "remote repository.url", "https://maven2-repository.dev.java.net/nonav/repository",
repository.getUrl() );