You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ad...@apache.org on 2016/03/02 16:49:14 UTC

[1/5] james-project git commit: These simple tests ensure the docker rule allow to run a container for a test

Repository: james-project
Updated Branches:
  refs/heads/master dbbc58ee9 -> 7460ce879


These simple tests ensure the docker rule allow to run a container for a test

	It checks HTTP reachability on container IP and exposed port on host


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/d1a370c6
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/d1a370c6
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/d1a370c6

Branch: refs/heads/master
Commit: d1a370c68e817eff5e334a73c844c69129a4a588
Parents: dbbc58e
Author: Matthieu Baechler <ma...@gmail.com>
Authored: Thu Feb 11 17:49:23 2016 +0100
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Wed Mar 2 16:03:26 2016 +0100

----------------------------------------------------------------------
 .../protocols/jmap-integration-testing/pom.xml  | 11 +++++
 .../org/apache/james/jmap/ContainerTest.java    | 46 ++++++++++++++++++++
 2 files changed, 57 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/d1a370c6/server/protocols/jmap-integration-testing/pom.xml
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/pom.xml b/server/protocols/jmap-integration-testing/pom.xml
index b3ada4c..9afcc41 100644
--- a/server/protocols/jmap-integration-testing/pom.xml
+++ b/server/protocols/jmap-integration-testing/pom.xml
@@ -172,6 +172,12 @@
                     <type>test-jar</type>
                 </dependency>
                 <dependency>
+                    <groupId>com.google.guava</groupId>
+                    <artifactId>guava</artifactId>
+                    <version>18.0</version> <!--$NO-MVN-MAN-VER$-->
+                    <scope>test</scope>
+                </dependency>
+                <dependency>
                     <groupId>com.google.inject</groupId>
                     <artifactId>guice</artifactId>
                 </dependency>
@@ -207,6 +213,11 @@
                     <version>2.0.0.0</version>
                     <scope>test</scope>
                 </dependency>
+                <dependency>
+                    <groupId>org.testcontainers</groupId>
+                    <artifactId>testcontainers</artifactId>
+                    <version>1.0.2</version>
+                </dependency>
             </dependencies>
             <build>
                 <plugins>

http://git-wip-us.apache.org/repos/asf/james-project/blob/d1a370c6/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/ContainerTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/ContainerTest.java b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/ContainerTest.java
new file mode 100644
index 0000000..7a8c488
--- /dev/null
+++ b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/ContainerTest.java
@@ -0,0 +1,46 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+package org.apache.james.jmap;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.fluent.Request;
+import org.apache.http.client.fluent.Response;
+import org.apache.http.client.utils.URIBuilder;
+import org.junit.Rule;
+import org.junit.Test;
+import org.testcontainers.containers.GenericContainer;
+
+public class ContainerTest {
+
+    @Rule public GenericContainer container = new GenericContainer("nginx:1.7.1")
+            .withExposedPorts(80);
+
+    @Test
+    public void containerShouldBeReachableOnExposedPort() throws ClientProtocolException, IOException, URISyntaxException {
+        String containerIpAddress = container.getContainerIpAddress();
+        Integer containerPort = container.getMappedPort(80);
+        Response response = Request.Get(new URIBuilder().setScheme("http").setHost(containerIpAddress).setPort(containerPort).build()).execute();
+        assertThat(response.returnResponse().getStatusLine().getStatusCode()).isEqualTo(200);
+    }
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[5/5] james-project git commit: fix tika exclusions into server/pom.xml to prevent tika version downgrade

Posted by ad...@apache.org.
fix tika exclusions into server/pom.xml to prevent tika version downgrade


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/7460ce87
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/7460ce87
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/7460ce87

Branch: refs/heads/master
Commit: 7460ce879d68bbc7d18d9f93d0bb24d0c3ccc02a
Parents: 337a2bb
Author: Matthieu Baechler <ma...@linagora.com>
Authored: Fri Feb 19 16:58:09 2016 +0100
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Wed Mar 2 16:03:57 2016 +0100

----------------------------------------------------------------------
 server/pom.xml | 43 ++++++++++++++++++-------------------------
 1 file changed, 18 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/7460ce87/server/pom.xml
----------------------------------------------------------------------
diff --git a/server/pom.xml b/server/pom.xml
index a236a0e..a10084d 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -162,7 +162,6 @@
         <openjpa.version>2.2.1</openjpa.version>
         <geronimo-jpa-spec.version>1.1</geronimo-jpa-spec.version>
         <jcr.version>2.0</jcr.version>
-        <tika-parsers.version>1.2</tika-parsers.version>
         <xbean-spring.version>3.12</xbean-spring.version>
         <netty.version>3.10.5.Final</netty.version>
         <geronimo-annotation-spec.version>1.0.1</geronimo-annotation-spec.version>
@@ -613,6 +612,24 @@
                 <groupId>org.apache.james</groupId>
                 <artifactId>apache-james-mailbox-tika</artifactId>
                 <version>${mailbox.version}</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>org.apache.pdfbox</groupId>
+                        <artifactId>pdfbox</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.apache.poi</groupId>
+                        <artifactId>poi-ooxml</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.apache.poi</groupId>
+                        <artifactId>poi-scratchpad</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>edu.ucar</groupId>
+                        <artifactId>netcdf</artifactId>
+                    </exclusion>
+                </exclusions>
             </dependency>
             <dependency>
                 <groupId>org.apache.james</groupId>
@@ -1129,30 +1146,6 @@
             </dependency>
 
             <dependency>
-                <groupId>org.apache.tika</groupId>
-                <artifactId>tika-parsers</artifactId>
-                <version>${tika-parsers.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>org.apache.pdfbox</groupId>
-                        <artifactId>pdfbox</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>org.apache.poi</groupId>
-                        <artifactId>poi-ooxml</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>org.apache.poi</groupId>
-                        <artifactId>poi-scratchpad</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>edu.ucar</groupId>
-                        <artifactId>netcdf</artifactId>
-                    </exclusion>
-                </exclusions>
-            </dependency>
-
-            <dependency>
                 <groupId>org.apache.camel</groupId>
                 <artifactId>camel-core</artifactId>
                 <version>${camel.version}</version>


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[3/5] james-project git commit: upgrade tika to latest version to align bouncycastle versions

Posted by ad...@apache.org.
upgrade tika to latest version to align bouncycastle versions


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/7616871b
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/7616871b
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/7616871b

Branch: refs/heads/master
Commit: 7616871bbbb6f88eb3c3ad060778d8bab9cc1dad
Parents: d1a370c
Author: Matthieu Baechler <ma...@linagora.com>
Authored: Fri Feb 19 16:05:02 2016 +0100
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Wed Mar 2 16:03:27 2016 +0100

----------------------------------------------------------------------
 mailbox/tika/pom.xml                            |   4 +-
 .../tika/extractor/TikaTextExtractorTest.java   |   2 +-
 .../apache/james/mpt/smtp/utils/DockerRule.java | 112 -------------------
 3 files changed, 3 insertions(+), 115 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/7616871b/mailbox/tika/pom.xml
----------------------------------------------------------------------
diff --git a/mailbox/tika/pom.xml b/mailbox/tika/pom.xml
index c104c7f..2c8bf26 100644
--- a/mailbox/tika/pom.xml
+++ b/mailbox/tika/pom.xml
@@ -160,12 +160,12 @@
                 <dependency>
                     <groupId>org.apache.tika</groupId>
                     <artifactId>tika-core</artifactId>
-                    <version>1.7</version>
+                    <version>1.12</version>
                 </dependency>
                 <dependency>
                     <groupId>org.apache.tika</groupId>
                     <artifactId>tika-parsers</artifactId>
-                    <version>1.7</version>
+                    <version>1.12</version>
                 </dependency>
                 <dependency>
                     <groupId>junit</groupId>

http://git-wip-us.apache.org/repos/asf/james-project/blob/7616871b/mailbox/tika/src/test/java/org/apache/james/mailbox/tika/extractor/TikaTextExtractorTest.java
----------------------------------------------------------------------
diff --git a/mailbox/tika/src/test/java/org/apache/james/mailbox/tika/extractor/TikaTextExtractorTest.java b/mailbox/tika/src/test/java/org/apache/james/mailbox/tika/extractor/TikaTextExtractorTest.java
index 5808cbd..716c43f 100644
--- a/mailbox/tika/src/test/java/org/apache/james/mailbox/tika/extractor/TikaTextExtractorTest.java
+++ b/mailbox/tika/src/test/java/org/apache/james/mailbox/tika/extractor/TikaTextExtractorTest.java
@@ -73,7 +73,7 @@ public class TikaTextExtractorTest {
         InputStream inputStream = ClassLoader.getSystemResourceAsStream("documents/slides.pptx");
         assertThat(inputStream).isNotNull();
         assertThat(textExtractor.extractContent(inputStream, "application/vnd.openxmlformats-officedocument.presentationml.presentation", "slides.pptx").getTextualContent())
-            .isEqualTo("James is awesome\nIt manages attachments so well !\n");
+            .isEqualTo("James is awesome\nIt manages attachments so well !\n\n\n");
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/james-project/blob/7616871b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/utils/DockerRule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/utils/DockerRule.java b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/utils/DockerRule.java
deleted file mode 100644
index 42dde6b..0000000
--- a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/utils/DockerRule.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-package org.apache.james.mpt.smtp.utils;
-
-
-import java.util.Map;
-
-import org.junit.rules.ExternalResource;
-import org.junit.runner.Description;
-import org.junit.runners.model.Statement;
-
-import com.google.common.base.Throwables;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Maps;
-import com.spotify.docker.client.DefaultDockerClient;
-import com.spotify.docker.client.DockerClient;
-import com.spotify.docker.client.DockerException;
-import com.spotify.docker.client.messages.ContainerConfig;
-import com.spotify.docker.client.messages.ContainerCreation;
-import com.spotify.docker.client.messages.HostConfig;
-
-public class DockerRule extends ExternalResource {
-
-    public static final String DOCKER_SERVICE_URL = "unix:///var/run/docker.sock";
-    private final DockerClient dockerClient;
-    private final HostConfig hostConfig;
-    private ContainerCreation container;
-    private Map<String, String> portBindings;
-
-    public DockerRule(String imageName, String... cmd) throws DockerException, InterruptedException {
-        this(imageName, DOCKER_SERVICE_URL, cmd);
-    }
-
-    public DockerRule(String imageName, String dockerServiceUrl, String... cmd) throws DockerException, InterruptedException {
-        portBindings = Maps.newHashMap();
-
-        hostConfig = HostConfig.builder()
-                .publishAllPorts(true)
-                .build();
-
-        ContainerConfig containerConfig = ContainerConfig.builder()
-                .image(imageName)
-                .networkDisabled(false)
-                .cmd(cmd)
-                .hostConfig(hostConfig)
-                .build();
-
-        dockerClient = new DefaultDockerClient(dockerServiceUrl);
-
-        dockerClient.pull(imageName);
-        container = dockerClient.createContainer(containerConfig);
-    }
-
-    @Override
-    public Statement apply(Statement base, Description description) {
-        return super.apply(base, description);
-    }
-
-    @Override
-    protected void before() throws Throwable {
-        super.before();
-        dockerClient.startContainer(container.id());
-        portBindings.putAll(extractPortBindings());
-    }
-
-    public String getContainerIp() throws DockerException, InterruptedException {
-        return dockerClient.inspectContainer(container.id())
-                .networkSettings()
-                .ipAddress();
-    }
-    
-    private Map<String, String> extractPortBindings() throws DockerException,
-            InterruptedException {
-        return Maps.transformValues(
-                dockerClient.inspectContainer(container.id())
-                .networkSettings()
-                .ports(),
-                x -> Iterables.getOnlyElement(x).hostPort());
-    }
-
-    @Override
-    protected void after() {
-        super.after();
-        try {
-            dockerClient.killContainer(container.id());
-            dockerClient.removeContainer(container.id(), true);
-        } catch (DockerException | InterruptedException e) {
-            Throwables.propagate(e);
-        }
-    }
-
-    public Map<String, String> getPortBindings() {
-        return portBindings;
-    }
-
-} 
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[2/5] james-project git commit: upgrade bouncycastle to latest version

Posted by ad...@apache.org.
upgrade bouncycastle to latest version


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/904428c6
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/904428c6
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/904428c6

Branch: refs/heads/master
Commit: 904428c6453b72c817454856b2c590715fd11097
Parents: 7616871
Author: Matthieu Baechler <ma...@linagora.com>
Authored: Fri Feb 19 16:05:59 2016 +0100
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Wed Mar 2 16:03:27 2016 +0100

----------------------------------------------------------------------
 server/pom.xml                                  |  9 +++++++--
 server/protocols/jmap/pom.xml                   |  7 +++++--
 .../james/jmap/crypto/PublicKeyReader.java      | 20 +++++++++++---------
 3 files changed, 23 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/904428c6/server/pom.xml
----------------------------------------------------------------------
diff --git a/server/pom.xml b/server/pom.xml
index 7be6792..a236a0e 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -1409,8 +1409,13 @@
             </dependency>
             <dependency>
                 <groupId>org.bouncycastle</groupId>
-                <artifactId>bcprov-jdk16</artifactId>
-                <version>1.46</version>
+                <artifactId>bcprov-jdk15on</artifactId>
+                <version>1.52</version>
+            </dependency>
+            <dependency>
+                <groupId>org.bouncycastle</groupId>
+                <artifactId>bcpkix-jdk15on</artifactId>
+                <version>1.52</version>
             </dependency>
             <dependency>
                 <groupId>org.eclipse.jetty</groupId>

http://git-wip-us.apache.org/repos/asf/james-project/blob/904428c6/server/protocols/jmap/pom.xml
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/pom.xml b/server/protocols/jmap/pom.xml
index 13b1f4a..2f31da7 100644
--- a/server/protocols/jmap/pom.xml
+++ b/server/protocols/jmap/pom.xml
@@ -255,9 +255,12 @@
                 </dependency>
                 <dependency>
                     <groupId>org.bouncycastle</groupId>
-                    <artifactId>bcprov-jdk16</artifactId>
+                    <artifactId>bcprov-jdk15on</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>org.bouncycastle</groupId>
+                    <artifactId>bcpkix-jdk15on</artifactId>
                 </dependency>
-                
                 <dependency>
                     <groupId>org.apache.james</groupId>
                     <artifactId>apache-james-mailbox-store</artifactId>

http://git-wip-us.apache.org/repos/asf/james-project/blob/904428c6/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/PublicKeyReader.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/PublicKeyReader.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/PublicKeyReader.java
index 3eb3cf0..25f2ed8 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/PublicKeyReader.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/PublicKeyReader.java
@@ -20,10 +20,13 @@ package org.apache.james.jmap.crypto;
 
 import java.io.IOException;
 import java.io.StringReader;
-import java.security.interfaces.RSAPublicKey;
+import java.security.PublicKey;
 import java.util.Optional;
 
-import org.bouncycastle.openssl.PEMReader;
+import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
+import org.bouncycastle.openssl.PEMParser;
+import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter;
+import org.bouncycastle.util.io.pem.PemReader;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -31,21 +34,20 @@ public class PublicKeyReader {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(PublicKeyReader.class);
 
-    Optional<RSAPublicKey> fromPEM(Optional<String> pemKey) {
+    Optional<PublicKey> fromPEM(Optional<String> pemKey) {
 
         return pemKey
-                .map(k -> new PEMReader(new StringReader(k)))
+                .map(k -> new PEMParser(new PemReader(new StringReader(k))))
                 .flatMap(this::publicKeyFrom);
     }
 
-    private Optional<RSAPublicKey> publicKeyFrom(PEMReader reader) {
+    private Optional<PublicKey> publicKeyFrom(PEMParser reader) {
         try {
             Object readPEM = reader.readObject();
-            RSAPublicKey rsaPublicKey = null;
-            if (readPEM instanceof RSAPublicKey) {
-                rsaPublicKey = (RSAPublicKey) readPEM;
+            if (readPEM instanceof SubjectPublicKeyInfo) {
+                return Optional.of(new JcaPEMKeyConverter().getPublicKey((SubjectPublicKeyInfo) readPEM));
             }
-            return Optional.ofNullable(rsaPublicKey);
+            return Optional.empty();
         } catch (IOException e) {
             LOGGER.warn("Error when reading the PEM file", e);
             return Optional.empty();


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[4/5] james-project git commit: use testcontainers instead of home-made DockerRule

Posted by ad...@apache.org.
use testcontainers instead of home-made DockerRule


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/337a2bbc
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/337a2bbc
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/337a2bbc

Branch: refs/heads/master
Commit: 337a2bbc9487dafc959393e6adec54ff62bed973
Parents: 904428c
Author: Matthieu Baechler <ma...@linagora.com>
Authored: Fri Feb 19 16:06:30 2016 +0100
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Wed Mar 2 16:03:56 2016 +0100

----------------------------------------------------------------------
 mpt/impl/smtp/core/pom.xml                                |  8 ++++++--
 .../java/org/apache/james/mpt/smtp/ForwardSmtpTest.java   |  8 ++++----
 mpt/pom.xml                                               | 10 ++++++++++
 3 files changed, 20 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/337a2bbc/mpt/impl/smtp/core/pom.xml
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/core/pom.xml b/mpt/impl/smtp/core/pom.xml
index b1bd035..b3609f1 100644
--- a/mpt/impl/smtp/core/pom.xml
+++ b/mpt/impl/smtp/core/pom.xml
@@ -145,13 +145,17 @@
                     <artifactId>rest-assured</artifactId>
                 </dependency>
                 <dependency>
-                    <groupId>com.spotify</groupId>
-                    <artifactId>docker-client</artifactId>
+                    <groupId>javax.inject</groupId>
+                    <artifactId>javax.inject</artifactId>
                 </dependency>
                 <dependency>
                     <groupId>org.assertj</groupId>
                     <artifactId>assertj-core</artifactId>
                 </dependency>
+                <dependency>
+                    <groupId>org.testcontainers</groupId>
+                    <artifactId>testcontainers</artifactId>
+                </dependency>
             </dependencies>
             <build>
                 <plugins>

http://git-wip-us.apache.org/repos/asf/james-project/blob/337a2bbc/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
index faab9a0..ac7d2bd 100644
--- a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
+++ b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
@@ -31,13 +31,13 @@ import javax.inject.Inject;
 import org.apache.james.mpt.api.SmtpHostSystem;
 import org.apache.james.mpt.script.AbstractSimpleScriptedTestProtocol;
 import org.apache.james.mpt.smtp.dns.InMemoryDNSService;
-import org.apache.james.mpt.smtp.utils.DockerRule;
 import org.apache.james.rrt.api.RecipientRewriteTable;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
+import org.testcontainers.containers.GenericContainer;
 
 import com.google.common.base.Charsets;
 import com.google.common.collect.ImmutableList;
@@ -53,8 +53,8 @@ public class ForwardSmtpTest extends AbstractSimpleScriptedTestProtocol {
     public static final String PASSWORD = "secret";
 
     private final TemporaryFolder folder = new TemporaryFolder();
-    private final DockerRule fakeSmtp = new DockerRule("weave/rest-smtp-sink");
-
+    private final GenericContainer fakeSmtp = new GenericContainer("weave/rest-smtp-sink:latest");
+    
     @Rule
     public final RuleChain chain = RuleChain.outerRule(folder).around(fakeSmtp);
 
@@ -74,7 +74,7 @@ public class ForwardSmtpTest extends AbstractSimpleScriptedTestProtocol {
     @Before
     public void setUp() throws Exception {
         super.setUp();
-        InetAddress containerIp = InetAddresses.forString(fakeSmtp.getContainerIp());
+        InetAddress containerIp = InetAddresses.forString(fakeSmtp.getContainerInfo().getNetworkSettings().getIpAddress());
         dnsService.registerRecord("yopmail.com", new InetAddress[]{containerIp}, ImmutableList.of("yopmail.com"), ImmutableList.of());
         recipientRewriteTable.addAddressMapping(USER, DOMAIN, "ray@yopmail.com");
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/337a2bbc/mpt/pom.xml
----------------------------------------------------------------------
diff --git a/mpt/pom.xml b/mpt/pom.xml
index 7bddc85..a4e72f3 100644
--- a/mpt/pom.xml
+++ b/mpt/pom.xml
@@ -362,6 +362,11 @@
                 <version>${guice.version}</version>
             </dependency>
             <dependency>
+                <groupId>javax.inject</groupId>
+                <artifactId>javax.inject</artifactId>
+                <version>1</version>
+            </dependency>
+            <dependency>
                 <groupId>jmock</groupId>
                 <artifactId>jmock</artifactId>
                 <version>1.1.0</version>
@@ -423,6 +428,11 @@
                 <artifactId>slf4j-simple</artifactId>
                 <version>${slf4j.version}</version>
             </dependency>
+            <dependency>
+                <groupId>org.testcontainers</groupId>
+                <artifactId>testcontainers</artifactId>
+                <version>1.0.1</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
     <build>


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org