archivaConfiguration.save( config );
}
private Configuration createInitialConfiguration()
{
Configuration config = new Configuration();
ManagedRepositoryConfiguration managedRepo = new ManagedRepositoryConfiguration();
managedRepo.setId( CORPORATE );
managedRepo.setLayout( "${java.io.tmpdir}/archiva-test/managed-repo" );
managedRepo.setReleases( true );
config.addManagedRepository( managedRepo );
RemoteRepositoryConfiguration remoteRepo = new RemoteRepositoryConfiguration();
remoteRepo.setId( CENTRAL );
remoteRepo.setUrl( "http://repo1.maven.org/maven2/" );
config.addRemoteRepository( remoteRepo );
remoteRepo = new RemoteRepositoryConfiguration();
remoteRepo.setId( JAVAX );
remoteRepo.setUrl( "http://download.java.net/maven/2/" );
config.addRemoteRepository( remoteRepo );
ProxyConnectorConfiguration connector = new ProxyConnectorConfiguration();
connector.setSourceRepoId( CORPORATE );
connector.setTargetRepoId( CENTRAL );
config.addProxyConnector( connector );
connector = new ProxyConnectorConfiguration();
connector.setSourceRepoId( CORPORATE );
connector.setTargetRepoId( JAVAX );
config.addProxyConnector( connector );
return config;
}