Search in sources :

Example 6 with HashedLocationPathGenerator

use of org.commonjava.maven.galley.io.HashedLocationPathGenerator in project indy by Commonjava.

the class AutoProxDataManagerDecoratorTest method setup.

@Before
public final void setup() throws Exception {
    rootDir = temp.newFolder("indy.root");
    autoproxDataDir = new File(rootDir, "data/autoprox");
    autoproxDataDir.mkdirs();
    File cacheDir = temp.newFolder();
    FileCacheProvider cache = new FileCacheProvider(cacheDir, new HashedLocationPathGenerator(), new NoOpFileEventManager(), new NoOpTransferDecorator());
    galley = new GalleyMavenBuilder(cache).withEnabledTransports(new HttpClientTransport(new HttpImpl(new MemoryPasswordManager()))).build();
    final DataFileManager dataFiles = new DataFileManager(rootDir, new DataFileEventManager());
    ruleParser = new ScriptRuleParser(new ScriptEngine(dataFiles));
    final AutoProxConfig indyConfig = new AutoProxConfig(autoproxDataDir.getName(), true);
    catalog = new AutoProxCatalogManager(dataFiles, indyConfig, ruleParser);
    storeDataManager = new TestAutoProxyDataManager(catalog, galley.getTransferManager());
    storeDataManager.install();
    storeDataManager.clear(summary);
    storeQuery = storeDataManager.query().packageType(MAVEN_PKG_KEY);
    System.setProperty("baseUrl", http.getBaseUri());
}
Also used : FileCacheProvider(org.commonjava.maven.galley.cache.FileCacheProvider) NoOpTransferDecorator(org.commonjava.maven.galley.io.NoOpTransferDecorator) HashedLocationPathGenerator(org.commonjava.maven.galley.io.HashedLocationPathGenerator) AutoProxConfig(org.commonjava.indy.autoprox.conf.AutoProxConfig) DataFileEventManager(org.commonjava.indy.subsys.datafile.change.DataFileEventManager) MemoryPasswordManager(org.commonjava.maven.galley.auth.MemoryPasswordManager) HttpImpl(org.commonjava.maven.galley.transport.htcli.HttpImpl) ScriptEngine(org.commonjava.indy.subsys.template.ScriptEngine) NoOpFileEventManager(org.commonjava.maven.galley.event.NoOpFileEventManager) GalleyMavenBuilder(org.commonjava.maven.galley.maven.GalleyMavenBuilder) HttpClientTransport(org.commonjava.maven.galley.transport.htcli.HttpClientTransport) ScriptRuleParser(org.commonjava.indy.autoprox.util.ScriptRuleParser) DataFileManager(org.commonjava.indy.subsys.datafile.DataFileManager) TestAutoProxyDataManager(org.commonjava.indy.autoprox.fixture.TestAutoProxyDataManager) File(java.io.File) Before(org.junit.Before)

Aggregations

HashedLocationPathGenerator (org.commonjava.maven.galley.io.HashedLocationPathGenerator)6 NoOpFileEventManager (org.commonjava.maven.galley.event.NoOpFileEventManager)4 NoOpTransferDecorator (org.commonjava.maven.galley.io.NoOpTransferDecorator)4 Before (org.junit.Before)4 MemoryPasswordManager (org.commonjava.maven.galley.auth.MemoryPasswordManager)3 TransportManagerConfig (org.commonjava.maven.galley.config.TransportManagerConfig)3 MemoryNotFoundCache (org.commonjava.maven.galley.nfc.MemoryNotFoundCache)3 FileCacheProvider (org.commonjava.maven.galley.cache.FileCacheProvider)2 TestFileEventManager (org.commonjava.maven.galley.cache.testutil.TestFileEventManager)2 TestTransferDecorator (org.commonjava.maven.galley.cache.testutil.TestTransferDecorator)2 TransferManagerImpl (org.commonjava.maven.galley.internal.TransferManagerImpl)2 DownloadHandler (org.commonjava.maven.galley.internal.xfer.DownloadHandler)2 ExistenceHandler (org.commonjava.maven.galley.internal.xfer.ExistenceHandler)2 ListingHandler (org.commonjava.maven.galley.internal.xfer.ListingHandler)2 UploadHandler (org.commonjava.maven.galley.internal.xfer.UploadHandler)2 SpecialPathManagerImpl (org.commonjava.maven.galley.io.SpecialPathManagerImpl)2 FileEventManager (org.commonjava.maven.galley.spi.event.FileEventManager)2 PathGenerator (org.commonjava.maven.galley.spi.io.PathGenerator)2 TransferDecorator (org.commonjava.maven.galley.spi.io.TransferDecorator)2 TransportManagerImpl (org.commonjava.maven.galley.transport.TransportManagerImpl)2