int port = repo.server.getConnectors()[0].getLocalPort();
repo.url = "http://localhost:" + port + repo.context;
- System.out.println( "Remote HTTP Server started on " + repo.url );
+ log.info( "Remote HTTP Server started on " + repo.url );
repo.config = createRemoteRepository( repo.id, "Testable [" + repo.id + "] Remote Repo", repo.url );
remoteCentral = createServer( "central" );
assertServerSetupCorrectly( remoteCentral );
+
+ RemoteRepositoryConfiguration remoteRepositoryConfiguration =
+ archivaConfiguration.getConfiguration().getRemoteRepositoriesAsMap().get( remoteCentral.id );
+ if ( remoteRepositoryConfiguration != null )
+ {
+ archivaConfiguration.getConfiguration().removeRemoteRepository( remoteRepositoryConfiguration );
+ }
+
archivaConfiguration.getConfiguration().addRemoteRepository( remoteCentral.config );
setupCleanRepo( remoteCentral.root );
}
remoteSnapshots = createServer( "snapshots" );
assertServerSetupCorrectly( remoteSnapshots );
+ RemoteRepositoryConfiguration remoteRepositoryConfiguration =
+ archivaConfiguration.getConfiguration().getRemoteRepositoriesAsMap().get( remoteSnapshots.id );
+ if ( remoteRepositoryConfiguration != null )
+ {
+ archivaConfiguration.getConfiguration().removeRemoteRepository( remoteRepositoryConfiguration );
+ }
archivaConfiguration.getConfiguration().addRemoteRepository( remoteSnapshots.config );
setupCleanRepo( remoteSnapshots.root );
}
import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@Inject
protected ApplicationContext applicationContext;
+ protected Logger log = LoggerFactory.getLogger( getClass() );
+
protected void saveConfiguration()
throws Exception
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
+ <context-param>
+ <param-name>contextClass</param-name>
+ <param-value>org.codehaus.redback.components.springutils.CachingWebApplicationContext</param-value>
+ </context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>