Search in sources :

Example 6 with Transport

use of org.commonjava.maven.galley.spi.transport.Transport in project galley by Commonjava.

the class CoreFixture method initMissingComponents.

public void initMissingComponents() throws Exception {
    if (coreBuilder == null) {
        initGalley();
    }
    final List<Transport> transports = coreBuilder.getEnabledTransports();
    if (transports == null || transports.isEmpty()) {
        System.out.println("Initializing test transport implicitly");
        initTestTransport();
    }
    coreBuilder.initMissingComponents();
    if (temp != null && cacheDir == null) {
        cacheDir = temp.newFolder("cache");
    }
    Logger logger = LoggerFactory.getLogger(getClass());
    logger.debug("Initializing FileCacheProvider with:\n  Cache directory: {}\n  PathGenerator: {}\n  FileEventManager: {}\n  TransferDecorator: {}", cacheDir, coreBuilder.getPathGenerator(), coreBuilder.getFileEvents(), coreBuilder.getTransferDecorator());
    coreBuilder.withCache(new FileCacheProvider(cacheDir, coreBuilder.getPathGenerator(), coreBuilder.getFileEvents(), coreBuilder.getTransferDecorator()));
}
Also used : FileCacheProvider(org.commonjava.maven.galley.cache.FileCacheProvider) Transport(org.commonjava.maven.galley.spi.transport.Transport) TestTransport(org.commonjava.maven.galley.testing.core.transport.TestTransport) Logger(org.slf4j.Logger)

Example 7 with Transport

use of org.commonjava.maven.galley.spi.transport.Transport in project galley by Commonjava.

the class GalleyMavenFixture method withExtraTransports.

public GalleyMavenFixture withExtraTransports(final Transport... transports) {
    checkInitialized();
    this.extraTransports = transports;
    for (final Transport transport : transports) {
        mavenBuilder.withAdditionalTransport(transport);
    }
    return this;
}
Also used : TestTransport(org.commonjava.maven.galley.testing.core.transport.TestTransport) Transport(org.commonjava.maven.galley.spi.transport.Transport)

Aggregations

Transport (org.commonjava.maven.galley.spi.transport.Transport)7 TestTransport (org.commonjava.maven.galley.testing.core.transport.TestTransport)3 ArrayList (java.util.ArrayList)2 TransferException (org.commonjava.maven.galley.TransferException)2 Logger (org.slf4j.Logger)2 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 OutputStream (java.io.OutputStream)1 HashSet (java.util.HashSet)1 PostConstruct (javax.annotation.PostConstruct)1 JoinString (org.commonjava.maven.atlas.ident.util.JoinString)1 FileCacheProvider (org.commonjava.maven.galley.cache.FileCacheProvider)1 ConcreteResource (org.commonjava.maven.galley.model.ConcreteResource)1 ListingResult (org.commonjava.maven.galley.model.ListingResult)1 Location (org.commonjava.maven.galley.model.Location)1 SimpleLocation (org.commonjava.maven.galley.model.SimpleLocation)1 SpecialPathInfo (org.commonjava.maven.galley.model.SpecialPathInfo)1 Transfer (org.commonjava.maven.galley.model.Transfer)1 TransferDecorator (org.commonjava.maven.galley.spi.io.TransferDecorator)1