aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-base/archiva-configuration
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2008-03-14 11:13:29 +0000
committerBrett Porter <brett@apache.org>2008-03-14 11:13:29 +0000
commitd410cff584423cd08d392b445bc4ed1ac8f850e1 (patch)
tree3fd9847eb114d3358c822d1516f156d045443d52 /archiva-base/archiva-configuration
parent0a545acdd7e43562e87dbf37233b2032b60674cd (diff)
downloadarchiva-d410cff584423cd08d392b445bc4ed1ac8f850e1.tar.gz
archiva-d410cff584423cd08d392b445bc4ed1ac8f850e1.zip
merge the archiva-spring branch
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@637056 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-base/archiva-configuration')
-rw-r--r--archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java2
-rw-r--r--archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java26
-rw-r--r--archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoaderTest.java16
3 files changed, 33 insertions, 11 deletions
diff --git a/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java b/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
index 4c9259a27..28ceeaa7b 100644
--- a/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
+++ b/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
@@ -102,11 +102,13 @@ public class DefaultArchivaConfiguration
/**
* @plexus.requirement role="org.apache.maven.archiva.policies.PreDownloadPolicy"
+ * @todo these don't strictly belong in here
*/
private Map<String, PreDownloadPolicy> prePolicies;
/**
* @plexus.requirement role="org.apache.maven.archiva.policies.PostDownloadPolicy"
+ * @todo these don't strictly belong in here
*/
private Map<String, PostDownloadPolicy> postPolicies;
diff --git a/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java b/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java
index ab6b80c38..d96965c98 100644
--- a/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java
+++ b/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java
@@ -19,24 +19,34 @@ package org.apache.maven.archiva.configuration;
* under the License.
*/
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
import org.apache.commons.io.FileUtils;
-import org.codehaus.plexus.PlexusTestCase;
import org.codehaus.plexus.registry.RegistryException;
+import org.codehaus.plexus.spring.PlexusInSpringTestCase;
import org.custommonkey.xmlunit.XMLAssert;
import org.easymock.MockControl;
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
/**
* Test the configuration store.
*
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
*/
public class ArchivaConfigurationTest
- extends PlexusTestCase
+ extends PlexusInSpringTestCase
{
+ /**
+ * {@inheritDoc}
+ * @see org.codehaus.plexus.spring.PlexusInSpringTestCase#getSpringConfigLocation()
+ */
+ protected String getSpringConfigLocation()
+ throws Exception
+ {
+ return "org/apache/maven/archiva/configuration/spring-context.xml";
+ }
+
public void testGetConfigurationFromRegistryWithASingleNamedConfigurationResource()
throws Exception
{
@@ -474,7 +484,7 @@ public class ArchivaConfigurationTest
(ArchivaConfiguration) lookup( ArchivaConfiguration.class.getName(), "test-not-allowed-to-write-to-user" );
Configuration config = archivaConfiguration.getConfiguration();
archivaConfiguration.save( config );
- // No Exception == test passes.
+ // No Exception == test passes.
// Expected Path is: Should not have thrown an exception.
}
@@ -538,7 +548,7 @@ public class ArchivaConfigurationTest
archivaConfiguration.save( configuration );
// Release existing
- release( archivaConfiguration );
+// FIXME spring equivalent ? release( archivaConfiguration );
// Reload.
archivaConfiguration =
diff --git a/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoaderTest.java b/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoaderTest.java
index db3049277..8bfc6e81d 100644
--- a/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoaderTest.java
+++ b/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoaderTest.java
@@ -19,22 +19,32 @@ package org.apache.maven.archiva.configuration;
* under the License.
*/
-import org.codehaus.plexus.PlexusTestCase;
-
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Map;
import java.util.Properties;
+import org.codehaus.plexus.spring.PlexusInSpringTestCase;
+
/**
* @author Edwin Punzalan
*/
public class MavenProxyPropertyLoaderTest
- extends PlexusTestCase
+ extends PlexusInSpringTestCase
{
private MavenProxyPropertyLoader loader;
+ /**
+ * {@inheritDoc}
+ * @see org.codehaus.plexus.spring.PlexusInSpringTestCase#getSpringConfigLocation()
+ */
+ protected String getSpringConfigLocation()
+ throws Exception
+ {
+ return "org/apache/maven/archiva/configuration/spring-context.xml";
+ }
+
public void testLoadValidMavenProxyConfiguration()
throws IOException, InvalidConfigurationException
{