Search in sources :

Example 1 with MavenProxySlice

use of com.artipie.maven.http.MavenProxySlice in project maven-adapter by artipie.

the class MavenProxyIT method setUp.

@BeforeEach
void setUp() throws Exception {
    final JettyClientSlices slices = new JettyClientSlices();
    slices.start();
    this.storage = new InMemoryStorage();
    this.server = new VertxSliceServer(MavenProxyIT.VERTX, new LoggingSlice(new MavenProxySlice(slices, URI.create("https://repo.maven.apache.org/maven2"), Authenticator.ANONYMOUS, new FromStorageCache(this.storage))));
    this.port = this.server.start();
    Testcontainers.exposeHostPorts(this.port);
    this.cntn = new GenericContainer<>("maven:3.6.3-jdk-11").withCommand("tail", "-f", "/dev/null").withWorkingDirectory("/home/").withFileSystemBind(this.tmp.toString(), "/home");
    this.cntn.start();
}
Also used : InMemoryStorage(com.artipie.asto.memory.InMemoryStorage) VertxSliceServer(com.artipie.vertx.VertxSliceServer) FromStorageCache(com.artipie.asto.cache.FromStorageCache) JettyClientSlices(com.artipie.http.client.jetty.JettyClientSlices) GenericContainer(org.testcontainers.containers.GenericContainer) MavenProxySlice(com.artipie.maven.http.MavenProxySlice) LoggingSlice(com.artipie.http.slice.LoggingSlice) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

FromStorageCache (com.artipie.asto.cache.FromStorageCache)1 InMemoryStorage (com.artipie.asto.memory.InMemoryStorage)1 JettyClientSlices (com.artipie.http.client.jetty.JettyClientSlices)1 LoggingSlice (com.artipie.http.slice.LoggingSlice)1 MavenProxySlice (com.artipie.maven.http.MavenProxySlice)1 VertxSliceServer (com.artipie.vertx.VertxSliceServer)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 GenericContainer (org.testcontainers.containers.GenericContainer)1