Search in sources :

Example 1 with MavenMetadataMerger

use of org.commonjava.indy.pkg.maven.content.group.MavenMetadataMerger in project indy by Commonjava.

the class MavenMetadataGeneratorTest method setup.

@Before
public void setup() throws Exception {
    stores = new MemoryStoreDataManager(true);
    final LocationExpander locations = new IndyLocationExpander(stores);
    final DefaultIndyConfiguration config = new DefaultIndyConfiguration();
    config.setNotFoundCacheTimeoutSeconds(1);
    final ExpiringMemoryNotFoundCache nfc = new ExpiringMemoryNotFoundCache(config);
    WeftExecutorService rescanService = new PoolWeftExecutorService("test-rescan-executor", (ThreadPoolExecutor) Executors.newCachedThreadPool(), 2, 10f, false, null, null);
    final DownloadManager downloads = new DefaultDownloadManager(stores, fixture.getTransferManager(), locations, null, nfc, rescanService);
    final XMLInfrastructure xml = new XMLInfrastructure();
    final TypeMapper types = new StandardTypeMapper();
    final MavenMetadataMerger merger = new MavenMetadataMerger();
    final GroupMergeHelper helper = new GroupMergeHelper(downloads);
    WeftExecutorService contentAccessService = new PoolWeftExecutorService("test-content-access-executor", (ThreadPoolExecutor) Executors.newCachedThreadPool(), 2, 10f, false, null, null);
    DefaultDirectContentAccess contentAccess = new DefaultDirectContentAccess(downloads, contentAccessService);
    WeftExecutorService mdService = new PoolWeftExecutorService("test-md-executor", (ThreadPoolExecutor) Executors.newCachedThreadPool(), 2, 10f, false, null, null);
    generator = new MavenMetadataGenerator(contentAccess, stores, xml, types, merger, helper, new MemoryNotFoundCache(), mdService);
    metadataReader = new MavenMetadataReader(xml, locations, fixture.getArtifactMetadataManager(), fixture.getXPathManager());
}
Also used : StandardTypeMapper(org.commonjava.maven.galley.maven.internal.type.StandardTypeMapper) TypeMapper(org.commonjava.maven.galley.maven.spi.type.TypeMapper) PoolWeftExecutorService(org.commonjava.cdi.util.weft.PoolWeftExecutorService) ExpiringMemoryNotFoundCache(org.commonjava.indy.core.inject.ExpiringMemoryNotFoundCache) MemoryNotFoundCache(org.commonjava.maven.galley.nfc.MemoryNotFoundCache) ExpiringMemoryNotFoundCache(org.commonjava.indy.core.inject.ExpiringMemoryNotFoundCache) DownloadManager(org.commonjava.indy.content.DownloadManager) DefaultDownloadManager(org.commonjava.indy.core.content.DefaultDownloadManager) WeftExecutorService(org.commonjava.cdi.util.weft.WeftExecutorService) PoolWeftExecutorService(org.commonjava.cdi.util.weft.PoolWeftExecutorService) LocationExpander(org.commonjava.maven.galley.spi.transport.LocationExpander) IndyLocationExpander(org.commonjava.indy.content.IndyLocationExpander) MavenMetadataMerger(org.commonjava.indy.pkg.maven.content.group.MavenMetadataMerger) MemoryStoreDataManager(org.commonjava.indy.mem.data.MemoryStoreDataManager) IndyLocationExpander(org.commonjava.indy.content.IndyLocationExpander) XMLInfrastructure(org.commonjava.maven.galley.maven.parse.XMLInfrastructure) DefaultDownloadManager(org.commonjava.indy.core.content.DefaultDownloadManager) MavenMetadataReader(org.commonjava.maven.galley.maven.parse.MavenMetadataReader) DefaultDirectContentAccess(org.commonjava.indy.core.content.DefaultDirectContentAccess) DefaultIndyConfiguration(org.commonjava.indy.conf.DefaultIndyConfiguration) StandardTypeMapper(org.commonjava.maven.galley.maven.internal.type.StandardTypeMapper) GroupMergeHelper(org.commonjava.indy.core.content.group.GroupMergeHelper) Before(org.junit.Before)

Aggregations

PoolWeftExecutorService (org.commonjava.cdi.util.weft.PoolWeftExecutorService)1 WeftExecutorService (org.commonjava.cdi.util.weft.WeftExecutorService)1 DefaultIndyConfiguration (org.commonjava.indy.conf.DefaultIndyConfiguration)1 DownloadManager (org.commonjava.indy.content.DownloadManager)1 IndyLocationExpander (org.commonjava.indy.content.IndyLocationExpander)1 DefaultDirectContentAccess (org.commonjava.indy.core.content.DefaultDirectContentAccess)1 DefaultDownloadManager (org.commonjava.indy.core.content.DefaultDownloadManager)1 GroupMergeHelper (org.commonjava.indy.core.content.group.GroupMergeHelper)1 ExpiringMemoryNotFoundCache (org.commonjava.indy.core.inject.ExpiringMemoryNotFoundCache)1 MemoryStoreDataManager (org.commonjava.indy.mem.data.MemoryStoreDataManager)1 MavenMetadataMerger (org.commonjava.indy.pkg.maven.content.group.MavenMetadataMerger)1 StandardTypeMapper (org.commonjava.maven.galley.maven.internal.type.StandardTypeMapper)1 MavenMetadataReader (org.commonjava.maven.galley.maven.parse.MavenMetadataReader)1 XMLInfrastructure (org.commonjava.maven.galley.maven.parse.XMLInfrastructure)1 TypeMapper (org.commonjava.maven.galley.maven.spi.type.TypeMapper)1 MemoryNotFoundCache (org.commonjava.maven.galley.nfc.MemoryNotFoundCache)1 LocationExpander (org.commonjava.maven.galley.spi.transport.LocationExpander)1 Before (org.junit.Before)1