*/
import junit.framework.TestCase;
-import net.sf.ehcache.CacheManager;
import org.apache.commons.io.FileUtils;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import java.io.File;
+import java.io.IOException;
import javax.inject.Inject;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import java.io.File;
-import java.io.IOException;
/**
* Integration test for connecting over a HTTP proxy.
proxyHandler = applicationContext.getBean( "repositoryProxyConnectors#test", RepositoryProxyConnectors.class );
- config =
- (MockConfiguration) applicationContext.getBean( "archivaConfiguration#mock", ArchivaConfiguration.class );
+ config = applicationContext.getBean( "archivaConfiguration#mock", ArchivaConfiguration.class );
+
+ // clear from previous tests - TODO the spring context should be initialised per test instead, or the config
+ // made a complete mock
+ config.getConfiguration().getProxyConnectors().clear();
// Setup source repository (using default layout)
String repoPath = "target/test-repository/managed/" + getName();
import org.apache.maven.archiva.configuration.ConfigurationListener;
import org.apache.maven.archiva.configuration.FileType;
import org.apache.maven.archiva.configuration.FileTypes;
-import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.configuration.RepositoryScanningConfiguration;
-import org.apache.maven.archiva.repository.ManagedRepositoryContent;
import org.codehaus.plexus.registry.Registry;
import org.codehaus.plexus.registry.RegistryException;
import org.codehaus.plexus.registry.RegistryListener;
import org.easymock.MockControl;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
-import javax.annotation.PostConstruct;
-import javax.inject.Inject;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import javax.annotation.PostConstruct;
/**
* MockConfiguration
* role-hint="mock"
*/
@Service( "archivaConfiguration#mock" )
-//Scope( "prototype" )
public class MockConfiguration
implements ArchivaConfiguration
{