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 ie...@apache.org on 2020/06/30 20:51:49 UTC

[james-project] 15/23: JAMES-3260 We have compilation without tests

This is an automated email from the ASF dual-hosted git repository.

ieugen pushed a commit to branch JAMES-3260-gradle-poc
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit ebfc8f85dfcd1a7dbc3655d1df7a9ae828c5bd33
Author: Eugen Stan <ie...@apache.org>
AuthorDate: Wed Jun 24 11:11:59 2020 +0300

    JAMES-3260 We have compilation without tests
    
    ./gradlew clean build -x test
    
    * Migrated more projects
    * Using `api` gradle configuration for more dependencies
---
 backends-common/rabbitmq/build.gradle              | 14 ++--
 event-sourcing/event-sourcing-core/build.gradle    |  4 +-
 event-sourcing/event-store-api/build.gradle        |  2 +-
 event-sourcing/event-store-cassandra/build.gradle  | 12 ++-
 mailbox/cassandra/build.gradle                     | 12 +--
 mailbox/elasticsearch/build.gradle                 |  9 +--
 mailbox/event/event-cassandra/build.gradle         |  3 +-
 mailbox/event/event-memory/build.gradle            |  5 +-
 mailbox/event/event-rabbitmq/build.gradle          |  9 +--
 mailbox/lucene/build.gradle                        |  8 +-
 .../plugin/quota-mailing-cassandra/build.gradle    | 23 +++---
 mailbox/plugin/quota-mailing-memory/build.gradle   |  4 +-
 mailbox/plugin/quota-mailing/build.gradle          | 13 ++--
 .../plugin/quota-search-elasticsearch/build.gradle | 12 +--
 mailbox/plugin/quota-search-scanning/build.gradle  | 11 ++-
 mailbox/tools/quota-recompute/build.gradle         | 10 +--
 mpt/impl/imap-mailbox/core/build.gradle            | 31 ++++++--
 mpt/impl/managesieve/core/build.gradle             | 24 +++++-
 mpt/impl/smtp/core/build.gradle                    | 30 ++++++--
 protocols/managesieve/build.gradle                 |  5 +-
 server/blob/blob-common/build.gradle               |  2 +
 server/blob/blob-objectstorage/build.gradle        | 21 ++++-
 server/blob/blob-union/build.gradle                |  5 +-
 server/blob/mail-store/build.gradle                |  4 +
 server/container/guice/activemq/build.gradle       |  3 +-
 .../container/guice/blob-export-guice/build.gradle |  7 +-
 .../container/guice/blob-memory-guice/build.gradle |  3 +-
 .../guice/blob-objectstorage-guice/build.gradle    |  5 +-
 .../container/guice/cassandra-guice/build.gradle   | 90 +++++++++++-----------
 .../guice/cassandra-ldap-guice/build.gradle        | 10 ++-
 .../guice/cassandra-rabbitmq-guice/build.gradle    | 15 ++--
 .../cassandra-rabbitmq-ldap-guice/build.gradle     |  8 +-
 server/container/guice/guice-common/build.gradle   |  2 +
 .../container/guice/jpa-common-guice/build.gradle  |  8 +-
 server/container/guice/jpa-guice/build.gradle      | 50 ++++++------
 server/container/guice/rabbitmq/build.gradle       |  8 +-
 .../guice/testing/custom-mailets/build.gradle      |  8 +-
 server/data/data-jmap-cassandra/build.gradle       |  6 +-
 server/mailet/mock-smtp-server/build.gradle        | 36 ++++++++-
 .../mailrepository-cassandra/build.gradle          | 18 ++++-
 .../webadmin-integration-test-common/build.gradle  | 50 ++++++------
 .../webadmin/webadmin-cassandra-data/build.gradle  | 17 +++-
 .../webadmin/webadmin-cassandra/build.gradle       |  6 +-
 server/queue/queue-activemq/build.gradle           | 12 +--
 server/queue/queue-jms/build.gradle                | 16 ++--
 server/queue/queue-rabbitmq/build.gradle           | 25 +++---
 server/task/task-api/build.gradle                  |  1 -
 server/task/task-distributed/build.gradle          | 35 +++++++--
 48 files changed, 443 insertions(+), 269 deletions(-)

diff --git a/backends-common/rabbitmq/build.gradle b/backends-common/rabbitmq/build.gradle
index f074bc8..6fa8820 100644
--- a/backends-common/rabbitmq/build.gradle
+++ b/backends-common/rabbitmq/build.gradle
@@ -1,25 +1,29 @@
 /*
  * This file was generated by the Gradle 'init' task.
  */
+plugins {
+    id 'java-library'
+}
 
 configurations {
     tests
 }
 
 dependencies {
-    implementation project(':james-core')
-    implementation project(':james-server:james-server-lifecycle-api')
-    implementation project(':james-server:james-server-util')
+    api project(':james-core')
+    api project(':james-server:james-server-lifecycle-api')
+    api project(':james-server:james-server-util')
+
+    api 'com.rabbitmq:amqp-client:5.7.3'
+    api 'io.projectreactor.rabbitmq:reactor-rabbitmq:1.4.1.RELEASE'
 
     implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
     implementation 'com.github.fge:throwing-lambdas:0.5.0'
     implementation 'com.github.steveash.guavate:guavate:1.0.0'
     implementation 'com.google.guava:guava:25.1-jre'
-    implementation 'com.rabbitmq:amqp-client:5.7.3'
     implementation 'io.github.openfeign:feign-core:10.3.0'
     implementation 'io.github.openfeign:feign-jackson:10.3.0'
     implementation 'io.github.openfeign:feign-slf4j:10.3.0'
-    implementation 'io.projectreactor.rabbitmq:reactor-rabbitmq:1.4.1.RELEASE'
     implementation 'javax.annotation:javax.annotation-api:1.3.2'
     implementation 'javax.inject:javax.inject:1'
     implementation 'org.apache.commons:commons-configuration2:2.7'
diff --git a/event-sourcing/event-sourcing-core/build.gradle b/event-sourcing/event-sourcing-core/build.gradle
index dec24d5..2d33999 100644
--- a/event-sourcing/event-sourcing-core/build.gradle
+++ b/event-sourcing/event-sourcing-core/build.gradle
@@ -11,8 +11,8 @@ configurations {
 }
 
 dependencies {
-    implementation project(':event-sourcing:event-sourcing-event-store-api')
-    implementation project(':event-sourcing:event-sourcing-pojo')
+    api project(':event-sourcing:event-sourcing-event-store-api')
+    api project(':event-sourcing:event-sourcing-pojo')
 
     implementation 'com.github.steveash.guavate:guavate:1.0.0'
     implementation 'io.projectreactor:reactor-scala-extensions_2.13:0.5.1'
diff --git a/event-sourcing/event-store-api/build.gradle b/event-sourcing/event-store-api/build.gradle
index faccf7a..073c721 100644
--- a/event-sourcing/event-store-api/build.gradle
+++ b/event-sourcing/event-store-api/build.gradle
@@ -11,7 +11,7 @@ configurations {
 }
 
 dependencies {
-    implementation project(':event-sourcing:event-sourcing-pojo')
+    api project(':event-sourcing:event-sourcing-pojo')
 
     implementation 'com.github.steveash.guavate:guavate:1.0.0'
     implementation 'org.reactivestreams:reactive-streams:1.0.3'
diff --git a/event-sourcing/event-store-cassandra/build.gradle b/event-sourcing/event-store-cassandra/build.gradle
index 125f054..60f023d 100644
--- a/event-sourcing/event-store-cassandra/build.gradle
+++ b/event-sourcing/event-store-cassandra/build.gradle
@@ -12,13 +12,11 @@ configurations {
 }
 
 dependencies {
-    implementation project(':james-json')
-
-    implementation project(':james-backends-common:apache-james-backends-cassandra')
-    implementation project(':event-sourcing:event-sourcing-pojo')
-    implementation project(':event-sourcing:event-sourcing-event-store-api')
-
-    implementation project(':james-server:james-server-lifecycle-api')
+    api project(':event-sourcing:event-sourcing-pojo')
+    api project(':event-sourcing:event-sourcing-event-store-api')
+    api project(':james-json')
+    api project(':james-server:james-server-lifecycle-api')
+    api project(':james-backends-common:apache-james-backends-cassandra')
 
     implementation 'org.reactivestreams:reactive-streams:1.0.3'
     implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
diff --git a/mailbox/cassandra/build.gradle b/mailbox/cassandra/build.gradle
index d5fde7b..db7b0af 100644
--- a/mailbox/cassandra/build.gradle
+++ b/mailbox/cassandra/build.gradle
@@ -11,26 +11,22 @@ configurations {
 
 dependencies {
     api project(":james-core")
+    api project(":james-json")
     api project(':apache-james-mailbox:apache-james-mailbox-api')
     api project(':apache-james-mailbox:apache-james-mailbox-store')
+    api project(':james-backends-common:apache-james-backends-cassandra')
     api project(':james-server:james-server-task-api')
     api project(':james-server:james-server-blob:blob-api')
-
-    implementation project(":james-json")
-    implementation project(':james-backends-common:apache-james-backends-cassandra')
-    implementation project(':james-server:james-server-task-json')
-    implementation project(':james-server:james-server-util')
+    api project(':james-server:james-server-task-json')
+    api project(':james-server:james-server-util')
 
     implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
     implementation 'com.datastax.cassandra:cassandra-driver-core:3.7.2'
     implementation 'commons-io:commons-io:2.6'
-
     implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
     implementation 'com.github.fge:throwing-lambdas:0.5.0'
-
     implementation 'com.github.steveash.guavate:guavate:1.0.0'
     implementation 'com.google.guava:guava:25.1-jre'
-
     implementation 'com.sun.mail:javax.mail:1.6.2'
     implementation 'javax.inject:javax.inject:1'
     implementation 'org.slf4j:slf4j-api:1.7.27'
diff --git a/mailbox/elasticsearch/build.gradle b/mailbox/elasticsearch/build.gradle
index 7b99f12..4495e89 100644
--- a/mailbox/elasticsearch/build.gradle
+++ b/mailbox/elasticsearch/build.gradle
@@ -6,14 +6,14 @@ plugins {
 }
 
 dependencies {
-    api project(':james-core')
     api project(':apache-james-mailbox:apache-james-mailbox-api')
     api project(':apache-james-mailbox:apache-james-mailbox-store')
+    api project(':james-core')
+    api project(':james-server:james-server-util')
+    api project(':james-backends-common:apache-james-backends-es')
 
-    implementation project(':james-server:james-server-util')
-    implementation project(':james-backends-common:apache-james-backends-es')
+    api 'org.elasticsearch.client:elasticsearch-rest-high-level-client:6.4.3'
 
-    implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:6.4.3'
     implementation 'org.apache.commons:commons-configuration2:2.7'
     implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
     implementation 'org.reactivestreams:reactive-streams:1.0.3'
@@ -44,7 +44,6 @@ dependencies {
     testImplementation project(':metrics:metrics-api')
     testImplementation project(':metrics:metrics-tests')
 
-
     testImplementation 'net.javacrumbs.json-unit:json-unit-assertj:2.8.0'
     testImplementation 'org.awaitility:awaitility:3.1.6'
     testImplementation 'org.mockito:mockito-core:3.0.0'
diff --git a/mailbox/event/event-cassandra/build.gradle b/mailbox/event/event-cassandra/build.gradle
index 3b4408b..cefb27a 100644
--- a/mailbox/event/event-cassandra/build.gradle
+++ b/mailbox/event/event-cassandra/build.gradle
@@ -12,8 +12,7 @@ configurations {
 dependencies {
     api project(':apache-james-mailbox:apache-james-mailbox-api')
     api project(':apache-james-mailbox:apache-james-mailbox-event-json')
-
-    implementation project(':james-backends-common:apache-james-backends-cassandra')
+    api project(':james-backends-common:apache-james-backends-cassandra')
 
     implementation 'com.typesafe.play:play-json_2.13:2.8.1'
     implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
diff --git a/mailbox/event/event-memory/build.gradle b/mailbox/event/event-memory/build.gradle
index e69852d..b996cb5 100644
--- a/mailbox/event/event-memory/build.gradle
+++ b/mailbox/event/event-memory/build.gradle
@@ -6,12 +6,11 @@ plugins {
 }
 
 dependencies {
-    api project(":james-core")
     api project(':apache-james-mailbox:apache-james-mailbox-api')
+    api project(":james-core")
+    api project(':james-server:james-server-util')
     api project(':metrics:metrics-api')
 
-    implementation project(':james-server:james-server-util')
-
     implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
 
     testImplementation project(':apache-james-mailbox:apache-james-mailbox-api')
diff --git a/mailbox/event/event-rabbitmq/build.gradle b/mailbox/event/event-rabbitmq/build.gradle
index 10adcb4..bb8fc06 100644
--- a/mailbox/event/event-rabbitmq/build.gradle
+++ b/mailbox/event/event-rabbitmq/build.gradle
@@ -6,15 +6,14 @@ plugins {
 }
 
 dependencies {
-    api project(':james-core')
     api project(':apache-james-mailbox:apache-james-mailbox-api')
+    api project(':apache-james-mailbox:apache-james-mailbox-event-json')
+    api project(':james-core')
     api project(':james-server:james-server-lifecycle-api')
+    api project(':james-server:james-server-util')
+    api project(':james-backends-common:apache-james-backends-rabbitmq')
     api project(':metrics:metrics-api')
 
-    implementation project(':james-server:james-server-util')
-    implementation project(':james-backends-common:apache-james-backends-rabbitmq')
-    implementation project(':apache-james-mailbox:apache-james-mailbox-event-json')
-
     implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
     implementation 'io.projectreactor.rabbitmq:reactor-rabbitmq:1.4.1.RELEASE'
     implementation 'com.typesafe.play:play-json_2.13:2.8.1'
diff --git a/mailbox/lucene/build.gradle b/mailbox/lucene/build.gradle
index 887fd33..de973c1 100644
--- a/mailbox/lucene/build.gradle
+++ b/mailbox/lucene/build.gradle
@@ -10,14 +10,14 @@ dependencies {
     api project(':apache-james-mailbox:apache-james-mailbox-api')
     api project(':apache-james-mailbox:apache-james-mailbox-store')
 
+    api 'org.apache.lucene:lucene-core:3.6.2'
+    api 'org.apache.lucene:lucene-analyzers:3.6.2'
+    api 'org.apache.lucene:lucene-smartcn:3.6.2'
+
     implementation 'org.apache.james:apache-mime4j-core:0.8.3'
     implementation 'org.apache.james:apache-mime4j-dom:0.8.3'
     implementation 'com.sun.mail:javax.mail:1.6.2'
-    implementation 'org.apache.lucene:lucene-analyzers:3.6.2'
-    implementation 'org.apache.lucene:lucene-core:3.6.2'
-    implementation 'org.apache.lucene:lucene-smartcn:3.6.2'
     implementation 'org.slf4j:slf4j-api:1.7.27'
-
     implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
     implementation 'com.github.steveash.guavate:guavate:1.0.0'
     implementation 'com.google.guava:guava:25.1-jre'
diff --git a/mailbox/plugin/quota-mailing-cassandra/build.gradle b/mailbox/plugin/quota-mailing-cassandra/build.gradle
index bb9436d..7e19373 100644
--- a/mailbox/plugin/quota-mailing-cassandra/build.gradle
+++ b/mailbox/plugin/quota-mailing-cassandra/build.gradle
@@ -5,17 +5,18 @@ plugins {
     id 'java-library'
 }
 
-dependencies {
-    implementation project(":james-core")
-    implementation project(":james-json")
-
-    implementation project(':james-backends-common:apache-james-backends-cassandra')
+configurations {
+    tests
+}
 
+dependencies {
     api project(':apache-james-mailbox:apache-james-mailbox-api')
-    implementation project(':apache-james-mailbox:apache-james-mailbox-quota-mailing')
-
-    implementation project(':event-sourcing:event-sourcing-pojo')
-    implementation project(':event-sourcing:event-sourcing-event-store-cassandra')
+    api project(':apache-james-mailbox:apache-james-mailbox-quota-mailing')
+    api project(':event-sourcing:event-sourcing-pojo')
+    api project(':event-sourcing:event-sourcing-event-store-cassandra')
+    api project(":james-core")
+    api project(":james-json")
+    api project(':james-backends-common:apache-james-backends-cassandra')
 
     implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
     implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.9'
@@ -53,4 +54,8 @@ tasks.register('testsJar', Jar) {
     from(sourceSets.test.output)
 }
 
+artifacts {
+    tests testsJar
+}
+
 publishing.publications.maven.artifact(testsJar)
diff --git a/mailbox/plugin/quota-mailing-memory/build.gradle b/mailbox/plugin/quota-mailing-memory/build.gradle
index 471a57c..676bf31 100644
--- a/mailbox/plugin/quota-mailing-memory/build.gradle
+++ b/mailbox/plugin/quota-mailing-memory/build.gradle
@@ -6,8 +6,8 @@ plugins {
 }
 
 dependencies {
-    implementation project(':apache-james-mailbox:apache-james-mailbox-quota-mailing')
-    implementation project(':event-sourcing:event-sourcing-event-store-memory')
+    api project(':apache-james-mailbox:apache-james-mailbox-quota-mailing')
+    api project(':event-sourcing:event-sourcing-event-store-memory')
 
     testImplementation project(path: ':apache-james-mailbox:apache-james-mailbox-api', configuration: 'tests')
     testImplementation project(path: ':apache-james-mailbox:apache-james-mailbox-quota-mailing', configuration: 'tests')
diff --git a/mailbox/plugin/quota-mailing/build.gradle b/mailbox/plugin/quota-mailing/build.gradle
index 494ea96..071f72e 100644
--- a/mailbox/plugin/quota-mailing/build.gradle
+++ b/mailbox/plugin/quota-mailing/build.gradle
@@ -10,16 +10,15 @@ configurations {
 }
 
 dependencies {
-    api project(":james-core")
+    api project(':apache-james-mailbox:apache-james-mailbox-api')
     api project(':apache-mailet:apache-mailet-api')
+    api project(':event-sourcing:event-sourcing-pojo')
+    api project(':event-sourcing:event-sourcing-core')
+    api project(':event-sourcing:event-sourcing-event-store-api')
+    api project(":james-core")
     api project(':james-server:james-server-data-api')
     api project(':james-server:james-server-filesystem-api')
-    api project(':apache-james-mailbox:apache-james-mailbox-api')
-    api project(':event-sourcing:event-sourcing-event-store-api')
-
-    implementation project(':james-server:james-server-util')
-    implementation project(':event-sourcing:event-sourcing-pojo')
-    implementation project(':event-sourcing:event-sourcing-core')
+    api project(':james-server:james-server-util')
 
     implementation 'com.github.spullara.mustache.java:compiler:0.9.6'
     implementation 'javax.inject:javax.inject:1'
diff --git a/mailbox/plugin/quota-search-elasticsearch/build.gradle b/mailbox/plugin/quota-search-elasticsearch/build.gradle
index 4a16668..a81609c 100644
--- a/mailbox/plugin/quota-search-elasticsearch/build.gradle
+++ b/mailbox/plugin/quota-search-elasticsearch/build.gradle
@@ -6,14 +6,14 @@ plugins {
 }
 
 dependencies {
-    implementation project(':james-core')
-
-    implementation project(':james-backends-common:apache-james-backends-es')
     api project(':apache-james-mailbox:apache-james-mailbox-api')
-    implementation project(':apache-james-mailbox:apache-james-mailbox-quota-search')
-    implementation project(':james-server:james-server-data-api')
+    api project(':apache-james-mailbox:apache-james-mailbox-quota-search')
+    api project(':james-core')
+    api project(':james-backends-common:apache-james-backends-es')
+    api project(':james-server:james-server-data-api')
 
-    implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:6.4.3'
+    api 'org.elasticsearch.client:elasticsearch-rest-high-level-client:6.4.3'
+    
     implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
     implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.9'
 
diff --git a/mailbox/plugin/quota-search-scanning/build.gradle b/mailbox/plugin/quota-search-scanning/build.gradle
index 88fbac9..0f04928 100644
--- a/mailbox/plugin/quota-search-scanning/build.gradle
+++ b/mailbox/plugin/quota-search-scanning/build.gradle
@@ -6,12 +6,11 @@ plugins {
 }
 
 dependencies {
-    implementation project(':james-core')
-
-    implementation project(':apache-james-mailbox:apache-james-mailbox-quota-search')
-    implementation project(':james-server:james-server-data-api')
-    implementation project(':james-server:james-server-data-library')
-    implementation project(':james-server:james-server-util')
+    api project(':apache-james-mailbox:apache-james-mailbox-quota-search')
+    api project(':james-core')
+    api project(':james-server:james-server-data-api')
+    api project(':james-server:james-server-data-library')
+    api project(':james-server:james-server-util')
 
     implementation 'com.github.steveash.guavate:guavate:1.0.0'
     implementation 'com.google.guava:guava:25.1-jre'
diff --git a/mailbox/tools/quota-recompute/build.gradle b/mailbox/tools/quota-recompute/build.gradle
index 562abcd..6027fc7 100644
--- a/mailbox/tools/quota-recompute/build.gradle
+++ b/mailbox/tools/quota-recompute/build.gradle
@@ -10,16 +10,14 @@ configurations {
 }
 
 dependencies {
-    api project(":james-core")
-
     api project(':apache-james-mailbox:apache-james-mailbox-api')
     api project(':apache-james-mailbox:apache-james-mailbox-store')
+    api project(":james-core")
+    api project(":james-json")
     api project(':james-server:james-server-data-api')
     api project(':james-server:james-server-task-api')
-
-    implementation project(":james-json")
-    implementation project(':james-server:james-server-util')
-    implementation project(':james-server:james-server-task-json')
+    api project(':james-server:james-server-util')
+    api project(':james-server:james-server-task-json')
 
     implementation 'com.fasterxml.jackson.core:jackson-annotations:2.9.9'
     implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
diff --git a/mpt/impl/imap-mailbox/core/build.gradle b/mpt/impl/imap-mailbox/core/build.gradle
index 276173f..b2ae47a 100644
--- a/mpt/impl/imap-mailbox/core/build.gradle
+++ b/mpt/impl/imap-mailbox/core/build.gradle
@@ -1,17 +1,34 @@
 /*
  * This file was generated by the Gradle 'init' task.
  */
+plugins {
+    id 'java-library'
+}
+
+configurations {
+    tests
+}
 
 dependencies {
-    implementation project(':apache-james-mailbox:apache-james-mailbox-api')
-    implementation project(':apache-james-mpt:apache-james-mpt-core')
-    implementation project(':james-server:james-server-data-memory')
-    implementation project(':james-server:james-server-mailbox-adapter')
-    implementation project(':metrics:metrics-logger')
-    implementation project(':testing-base')
-    implementation project(':protocols:protocols-imap')
+    api project(':apache-james-mailbox:apache-james-mailbox-api')
+    api project(':apache-james-mpt:apache-james-mpt-core')
+    api project(':james-server:james-server-data-memory')
+    api project(':james-server:james-server-mailbox-adapter')
+    api project(':metrics:metrics-logger')
+    api project(':protocols:protocols-imap')
+
     implementation 'org.slf4j:jcl-over-slf4j:1.7.25'
     implementation 'org.slf4j:slf4j-api:1.7.25'
+    implementation 'org.apache.commons:commons-configuration2:2.7'
+    implementation 'junit:junit:4.13'
+
+    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.1'
+    testImplementation 'org.junit.jupiter:junit-jupiter-params:5.5.1'
+    testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.5.1'
+}
+
+test {
+    useJUnitPlatform()
 }
 
 description = 'Apache James MPT Imap Mailbox Core'
diff --git a/mpt/impl/managesieve/core/build.gradle b/mpt/impl/managesieve/core/build.gradle
index 2bfa864..e457b51 100644
--- a/mpt/impl/managesieve/core/build.gradle
+++ b/mpt/impl/managesieve/core/build.gradle
@@ -1,16 +1,32 @@
 /*
  * This file was generated by the Gradle 'init' task.
  */
+plugins {
+    id 'java-library'
+}
+
+configurations {
+    tests
+}
 
 dependencies {
-    implementation project(':apache-james-mpt:apache-james-mpt-core')
-    implementation project(':james-server:james-server-data-api')
+    api project(':apache-james-mpt:apache-james-mpt-core')
+    api project(':james-server:james-server-data-api')
+    api project(':protocols:protocols-managesieve')
+
+    implementation 'commons-io:commons-io:2.6'
     implementation 'org.junit.jupiter:junit-jupiter-engine:5.5.1'
     implementation 'org.junit.platform:junit-platform-launcher:1.5.1'
     implementation 'org.junit.vintage:junit-vintage-engine:5.5.1'
-    implementation project(':protocols:protocols-managesieve')
     implementation 'org.testcontainers:testcontainers:1.12.0'
-    testImplementation project(':testing-base')
+
+    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.1'
+    testImplementation 'org.junit.jupiter:junit-jupiter-params:5.5.1'
+    testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.5.1'
+}
+
+test {
+    useJUnitPlatform()
 }
 
 description = 'Apache James MPT ManageSieve Core'
diff --git a/mpt/impl/smtp/core/build.gradle b/mpt/impl/smtp/core/build.gradle
index c220959..3add5c5 100644
--- a/mpt/impl/smtp/core/build.gradle
+++ b/mpt/impl/smtp/core/build.gradle
@@ -1,19 +1,37 @@
 /*
  * This file was generated by the Gradle 'init' task.
  */
+plugins {
+    id 'java-library'
+}
+
+configurations {
+    tests
+}
 
 dependencies {
-    implementation project(':apache-james-mpt:apache-james-mpt-core')
-    implementation project(':james-server:james-server-dnsservice-api')
-    implementation project(':james-server:james-server-dnsservice-test')
-    implementation project(':james-server:james-server-guice:james-server-guice-common')
-    implementation project(':james-server:james-server-guice:james-server-guice-smtp')
-    implementation project(':james-server:james-server-testing')
+    api project(':apache-james-mpt:apache-james-mpt-core')
+    api project(':james-server:james-server-dnsservice-api')
+    api project(':james-server:james-server-dnsservice-test')
+    api project(':james-server:james-server-guice:james-server-guice-common')
+    api project(':james-server:james-server-guice:james-server-guice-smtp')
+    api project(':james-server:james-server-testing')
+
     implementation 'io.rest-assured:rest-assured:4.0.0'
+    implementation 'com.google.inject:guice:4.2.2'
+    implementation 'org.awaitility:awaitility:3.1.6'
     implementation 'org.testcontainers:testcontainers:1.12.0'
 
+    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.1'
+    testImplementation 'org.junit.jupiter:junit-jupiter-params:5.5.1'
+    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.5.1'
 }
 
+test {
+    useJUnitPlatform()
+}
+
+
 description = 'Apache James MPT SMTP Core'
 
 tasks.register('testsJar', Jar) {
diff --git a/protocols/managesieve/build.gradle b/protocols/managesieve/build.gradle
index f60899f..3457496 100644
--- a/protocols/managesieve/build.gradle
+++ b/protocols/managesieve/build.gradle
@@ -10,16 +10,15 @@ configurations {
 }
 
 dependencies {
+    api project(':james-core')
     api project(':james-server:james-server-data-api')
 
-    implementation project(':james-core')
-    implementation 'org.apache.james:apache-jsieve-core:0.7'
+    api 'org.apache.james:apache-jsieve-core:0.7'
 
     implementation 'com.google.guava:guava:25.1-jre'
     implementation 'commons-io:commons-io:2.6'
     implementation 'javax.annotation:javax.annotation-api:1.3.2'
     implementation 'javax.inject:javax.inject:1'
-    testImplementation project(':testing-base')
 
     testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.1'
     testImplementation 'org.junit.jupiter:junit-jupiter-params:5.5.1'
diff --git a/server/blob/blob-common/build.gradle b/server/blob/blob-common/build.gradle
index 036315a..c434d19 100644
--- a/server/blob/blob-common/build.gradle
+++ b/server/blob/blob-common/build.gradle
@@ -11,7 +11,9 @@ configurations {
 
 dependencies {
     api project(':james-server:james-server-blob:blob-api')
+
     implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
+    implementation 'org.apache.commons:commons-lang3:3.9'
 
     testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.1'
     testImplementation 'org.junit.jupiter:junit-jupiter-params:5.5.1'
diff --git a/server/blob/blob-objectstorage/build.gradle b/server/blob/blob-objectstorage/build.gradle
index c5b2828..fe8d912 100644
--- a/server/blob/blob-objectstorage/build.gradle
+++ b/server/blob/blob-objectstorage/build.gradle
@@ -1,18 +1,31 @@
 /*
  * This file was generated by the Gradle 'init' task.
  */
+plugins {
+    id 'java-library'
+}
+
+configurations {
+    tests
+}
 
 dependencies {
-    implementation project(':james-server:james-server-blob:blob-api')
-    implementation project(':james-server:james-server-util')
+    api project(':james-server:james-server-blob:blob-api')
+    api project(':james-server:james-server-util')
+
+    implementation 'commons-io:commons-io:2.6'
+    implementation 'com.github.fge:throwing-lambdas:0.5.0'
     implementation 'com.amazonaws:aws-java-sdk-s3:1.11.608'
     implementation 'com.google.crypto.tink:tink:1.2.2'
     implementation 'com.google.guava:guava:25.1-jre'
+    implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
+    implementation 'org.apache.commons:commons-lang3:3.9'
     implementation 'org.apache.jclouds.api:openstack-swift:2.1.2'
     implementation 'org.apache.jclouds.api:s3:2.1.2'
     implementation 'org.apache.jclouds.driver:jclouds-slf4j:2.1.2'
     implementation 'org.slf4j:jcl-over-slf4j:1.7.27'
     implementation 'org.slf4j:slf4j-api:1.7.27'
+
     testImplementation project(':james-server:james-server-blob:blob-api')
     testImplementation project(':metrics:metrics-tests')
     testImplementation project(':james-server:james-server-testing')
@@ -29,4 +42,8 @@ tasks.register('testsJar', Jar) {
     from(sourceSets.test.output)
 }
 
+artifacts {
+    tests testsJar
+}
+
 publishing.publications.maven.artifact(testsJar)
diff --git a/server/blob/blob-union/build.gradle b/server/blob/blob-union/build.gradle
index 2715fda..fca76df 100644
--- a/server/blob/blob-union/build.gradle
+++ b/server/blob/blob-union/build.gradle
@@ -11,9 +11,12 @@ configurations {
 
 dependencies {
     api project(':james-server:james-server-blob:blob-api')
-    implementation project(':james-server:james-server-util')
+    api project(':james-server:james-server-util')
 
+    implementation 'com.google.guava:guava:25.1-jre'
+    implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
     implementation 'org.apache.commons:commons-configuration2:2.7'
+    implementation 'org.slf4j:jcl-over-slf4j:1.7.27'
 
     testImplementation project(':james-server:james-server-blob:blob-api')
     testImplementation project(':james-server:james-server-blob:blob-memory')
diff --git a/server/blob/mail-store/build.gradle b/server/blob/mail-store/build.gradle
index 0b991d2..d918861 100644
--- a/server/blob/mail-store/build.gradle
+++ b/server/blob/mail-store/build.gradle
@@ -14,7 +14,11 @@ dependencies {
     implementation project(':james-server:james-server-blob:blob-common')
     implementation project(':james-server:james-server-util')
 
+    implementation 'org.apache.commons:commons-lang3:3.9'
     implementation 'com.google.guava:guava:25.1-jre'
+    implementation 'commons-io:commons-io:2.6'
+    implementation 'com.sun.mail:javax.mail:1.6.2'
+    implementation 'javax.inject:javax.inject:1'
 
     testImplementation project(':james-server:james-server-blob:blob-memory')
     testImplementation project(':james-core')
diff --git a/server/container/guice/activemq/build.gradle b/server/container/guice/activemq/build.gradle
index 1f49b9e..82a9864 100644
--- a/server/container/guice/activemq/build.gradle
+++ b/server/container/guice/activemq/build.gradle
@@ -10,7 +10,8 @@ configurations {
 }
 
 dependencies {
-    implementation project(':james-server:james-server-queue-activemq')
+    api project(':james-server:james-server-queue-activemq')
+
     implementation 'com.google.inject:guice:4.2.2'
 
     testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.1'
diff --git a/server/container/guice/blob-export-guice/build.gradle b/server/container/guice/blob-export-guice/build.gradle
index d71f449..dd3fdb0 100644
--- a/server/container/guice/blob-export-guice/build.gradle
+++ b/server/container/guice/blob-export-guice/build.gradle
@@ -12,10 +12,9 @@ configurations {
 dependencies {
     api project(':james-server:james-server-guice:blob-api-guice')
     api project(':james-server:james-server-blob:blob-export-api')
-
-    implementation project(':third-party:apache-james-linshare')
-    implementation project(':james-server:james-server-blob:blob-export-file')
-    implementation project(':james-server:james-server-guice:james-server-guice-configuration')
+    api project(':james-server:james-server-blob:blob-export-file')
+    api project(':james-server:james-server-guice:james-server-guice-configuration')
+    api project(':third-party:apache-james-linshare')
 
     implementation 'org.apache.commons:commons-configuration2:2.7'
     implementation 'com.github.steveash.guavate:guavate:1.0.0'
diff --git a/server/container/guice/blob-memory-guice/build.gradle b/server/container/guice/blob-memory-guice/build.gradle
index 60aee86..d8529bd 100644
--- a/server/container/guice/blob-memory-guice/build.gradle
+++ b/server/container/guice/blob-memory-guice/build.gradle
@@ -11,8 +11,7 @@ configurations {
 
 dependencies {
     api project(':james-server:james-server-blob:blob-api')
-
-    implementation project(':james-server:james-server-blob:blob-memory')
+    api project(':james-server:james-server-blob:blob-memory')
 
     implementation 'com.google.inject:guice:4.2.2'
 
diff --git a/server/container/guice/blob-objectstorage-guice/build.gradle b/server/container/guice/blob-objectstorage-guice/build.gradle
index 3eb954b..64ce392 100644
--- a/server/container/guice/blob-objectstorage-guice/build.gradle
+++ b/server/container/guice/blob-objectstorage-guice/build.gradle
@@ -11,9 +11,10 @@ configurations {
 
 dependencies {
     api project(':james-server:james-server-guice:blob-api-guice')
+    api project(':james-server:james-server-blob:blob-objectstorage')
+    api project(':james-server:james-server-guice:james-server-guice-configuration')
 
-    implementation project(':james-server:james-server-blob:blob-objectstorage')
-    implementation project(':james-server:james-server-guice:james-server-guice-configuration')
+    implementation 'com.google.inject:guice:4.2.2'
 
     testImplementation project(':james-server:james-server-blob:blob-objectstorage')
     testImplementation project(':james-server:james-server-guice:james-server-guice-common')
diff --git a/server/container/guice/cassandra-guice/build.gradle b/server/container/guice/cassandra-guice/build.gradle
index 434382b..907e2df 100644
--- a/server/container/guice/cassandra-guice/build.gradle
+++ b/server/container/guice/cassandra-guice/build.gradle
@@ -10,52 +10,56 @@ configurations {
 }
 
 dependencies {
-    implementation project(':apache-james-mailbox:apache-james-mailbox-cassandra')
-    implementation project(':apache-james-mailbox:apache-james-mailbox-deleted-messages-vault-cassandra')
-    implementation project(':apache-james-mailbox:apache-james-mailbox-elasticsearch')
-    implementation project(':apache-james-mailbox:apache-james-mailbox-event-cassandra')
-    implementation project(':james-server:james-server-guice:james-server-mailbox-plugin-deleted-messages-vault-guice')
-    implementation project(':apache-james-mailbox:apache-james-mailbox-quota-search-elasticsearch')
-    implementation project(':apache-james-mailbox:apache-james-mailbox-tika')
-    implementation project(':apache-mailet:apache-mailet-icalendar')
-    implementation project(':james-server:james-server-guice:blob-api-guice')
-    implementation project(':james-server:james-server-blob:blob-cassandra')
-    implementation project(':james-server:james-server-guice:blob-export-guice')
-    implementation project(':event-sourcing:event-sourcing-event-store-cassandra')
-    implementation project(':james-server:james-server-data-cassandra')
-    implementation project(':james-server:james-server-data-jmap-cassandra')
-    implementation project(':james-server:james-server-guice:james-server-guice-activemq')
-    implementation project(':james-server:james-server-guice:james-server-guice-common')
-    implementation project(':james-server:james-server-guice:james-server-guice-mailet')
-    implementation project(':james-server:james-server-guice:james-server-guice-es-resporter')
-    implementation project(':james-server:james-server-guice:james-server-guice-imap')
-    implementation project(':james-server:james-server-guice:james-server-guice-jmap')
-    implementation project(':james-server:james-server-guice:james-server-guice-jmx')
-    implementation project(':james-server:james-server-guice:james-server-guice-lmtp')
-    implementation project(':james-server:james-server-guice:james-server-guice-mailbox')
-    implementation project(':james-server:james-server-guice:james-server-guice-mailbox-plugin-spamassassin')
-    implementation project(':james-server:james-server-guice:james-server-guice-managedsieve')
-    implementation project(':james-server:james-server-guice:james-server-guice-pop')
-    implementation project(':james-server:james-server-guice:james-server-guice-rabbitmq')
-    implementation project(':james-server:james-server-guice:james-server-guice-smtp')
-    implementation project(':james-server:james-server-guice:james-server-guice-webadmin')
-    implementation project(':james-server:james-server-guice:james-server-guice-webadmin-data')
-    implementation project(':james-server:james-server-webadmin-cassandra')
-    implementation project(':james-server:james-server-webadmin-cassandra-data')
-    implementation project(':james-server:james-server-guice:james-server-guice-webadmin-jmap')
-    implementation project(':james-server:james-server-guice:james-server-guice-webadmin-mailbox')
-    implementation project(':james-server:james-server-guice:james-server-guice-webadmin-mailqueue')
-    implementation project(':james-server:james-server-guice:james-server-guice-webadmin-mailrepository')
-    implementation project(':james-server:james-server-guice:james-server-guice-webadmin-swagger')
-    implementation project(':james-server:james-server-mailbox-adapter')
-    implementation project(':james-server:james-server-mailets')
-    implementation project(':james-server:james-server-mailrepository-cassandra')
-    implementation project(':james-server:james-server-util')
-    implementation project(':james-server:metrics-es-reporter')
-    implementation project(':apache-james-mailbox:quota-mailing-cassandra')
+    api project(':apache-james-mailbox:apache-james-mailbox-cassandra')
+    api project(':apache-james-mailbox:apache-james-mailbox-deleted-messages-vault-cassandra')
+    api project(':apache-james-mailbox:apache-james-mailbox-elasticsearch')
+    api project(':apache-james-mailbox:apache-james-mailbox-event-cassandra')
+    api project(':apache-james-mailbox:apache-james-mailbox-tika')
+    api project(':apache-james-mailbox:apache-james-mailbox-quota-search-elasticsearch')
+    api project(':apache-james-mailbox:quota-mailing-cassandra')
+    api project(':apache-mailet:apache-mailet-icalendar')
+    api project(':event-sourcing:event-sourcing-event-store-cassandra')
+    api project(':james-server:james-server-guice:james-server-mailbox-plugin-deleted-messages-vault-guice')
+    api project(':james-server:james-server-guice:blob-api-guice')
+    api project(':james-server:james-server-blob:blob-cassandra')
+    api project(':james-server:james-server-guice:blob-export-guice')
+    api project(':james-server:james-server-data-cassandra')
+    api project(':james-server:james-server-data-jmap-cassandra')
+    api project(':james-server:james-server-guice:james-server-guice-activemq')
+    api project(':james-server:james-server-guice:james-server-guice-common')
+    api project(':james-server:james-server-guice:james-server-guice-mailet')
+    api project(':james-server:james-server-guice:james-server-guice-es-resporter')
+    api project(':james-server:james-server-guice:james-server-guice-imap')
+    api project(':james-server:james-server-guice:james-server-guice-jmap')
+    api project(':james-server:james-server-guice:james-server-guice-jmx')
+    api project(':james-server:james-server-guice:james-server-guice-lmtp')
+    api project(':james-server:james-server-guice:james-server-guice-mailbox')
+    api project(':james-server:james-server-guice:james-server-guice-mailbox-plugin-spamassassin')
+    api project(':james-server:james-server-guice:james-server-guice-managedsieve')
+    api project(':james-server:james-server-guice:james-server-guice-pop')
+    api project(':james-server:james-server-guice:james-server-guice-rabbitmq')
+    api project(':james-server:james-server-guice:james-server-guice-smtp')
+    api project(':james-server:james-server-guice:james-server-guice-webadmin')
+    api project(':james-server:james-server-guice:james-server-guice-webadmin-data')
+    api project(':james-server:james-server-webadmin-cassandra')
+    api project(':james-server:james-server-webadmin-cassandra-data')
+    api project(':james-server:james-server-guice:james-server-guice-webadmin-jmap')
+    api project(':james-server:james-server-guice:james-server-guice-webadmin-mailbox')
+    api project(':james-server:james-server-guice:james-server-guice-webadmin-mailqueue')
+    api project(':james-server:james-server-guice:james-server-guice-webadmin-mailrepository')
+    api project(':james-server:james-server-guice:james-server-guice-webadmin-swagger')
+    api project(':james-server:james-server-mailbox-adapter')
+    api project(':james-server:james-server-mailets')
+    api project(':james-server:james-server-mailrepository-cassandra')
+    api project(':james-server:james-server-util')
+    api project(':james-server:metrics-es-reporter')
 
     implementation 'ch.qos.logback:logback-classic:1.2.3'
     implementation 'com.linagora:logback-elasticsearch-appender:1.8.0'
+    implementation 'com.google.inject:guice:4.2.2'
+    implementation 'com.github.fge:throwing-lambdas:0.5.0'
+    implementation 'com.google.inject:guice:4.2.2'
+    implementation 'com.datastax.cassandra:cassandra-driver-core:3.7.2'
     implementation 'org.awaitility:awaitility:3.1.6'
 
     testImplementation project(':james-backends-common:apache-james-backends-cassandra')
diff --git a/server/container/guice/cassandra-ldap-guice/build.gradle b/server/container/guice/cassandra-ldap-guice/build.gradle
index 356b05d..76ead41 100644
--- a/server/container/guice/cassandra-ldap-guice/build.gradle
+++ b/server/container/guice/cassandra-ldap-guice/build.gradle
@@ -10,10 +10,12 @@ configurations {
 }
 
 dependencies {
-    implementation project(':apache-james-mailbox:apache-james-mailbox-cassandra')
-    implementation project(':james-server:james-server-guice:james-server-cassandra-guice')
-    implementation project(':james-server:james-server-data-ldap')
-    implementation project(':james-server:james-server-guice:james-server-guice-common')
+    api project(':apache-james-mailbox:apache-james-mailbox-cassandra')
+    api project(':james-server:james-server-guice:james-server-cassandra-guice')
+    api project(':james-server:james-server-data-ldap')
+    api project(':james-server:james-server-guice:james-server-guice-common')
+
+    implementation 'com.google.inject:guice:4.2.2'
 
     testImplementation project(':james-backends-common:apache-james-backends-cassandra')
     testImplementation project(':james-backends-common:apache-james-backends-es')
diff --git a/server/container/guice/cassandra-rabbitmq-guice/build.gradle b/server/container/guice/cassandra-rabbitmq-guice/build.gradle
index fd09b51..1a93697 100644
--- a/server/container/guice/cassandra-rabbitmq-guice/build.gradle
+++ b/server/container/guice/cassandra-rabbitmq-guice/build.gradle
@@ -10,12 +10,15 @@ configurations {
 }
 
 dependencies {
-    implementation project(':apache-james-mailbox:apache-james-mailbox-event-rabbitmq')
-    implementation project(':apache-james-mailbox:apache-james-mailbox-tools-quota-recompute')
-    implementation project(':james-server:james-server-guice:blob-objectstorage-guice')
-    implementation project(':james-server:james-server-blob:blob-union')
-    implementation project(':james-server:james-server-guice:james-server-cassandra-guice')
-    implementation project(':james-server:james-server-task-distributed')
+    api project(':apache-james-mailbox:apache-james-mailbox-event-rabbitmq')
+    api project(':apache-james-mailbox:apache-james-mailbox-tools-quota-recompute')
+    api project(':james-server:james-server-guice:blob-objectstorage-guice')
+    api project(':james-server:james-server-blob:blob-union')
+    api project(':james-server:james-server-guice:james-server-cassandra-guice')
+    api project(':james-server:james-server-task-distributed')
+
+    implementation 'com.github.fge:throwing-lambdas:0.5.0'
+    implementation 'com.google.inject:guice:4.2.2'
 
     testImplementation project(':james-backends-common:apache-james-backends-cassandra')
     testImplementation project(':james-backends-common:apache-james-backends-es')
diff --git a/server/container/guice/cassandra-rabbitmq-ldap-guice/build.gradle b/server/container/guice/cassandra-rabbitmq-ldap-guice/build.gradle
index 60e0184..d4bc4cd 100644
--- a/server/container/guice/cassandra-rabbitmq-ldap-guice/build.gradle
+++ b/server/container/guice/cassandra-rabbitmq-ldap-guice/build.gradle
@@ -10,9 +10,11 @@ configurations {
 }
 
 dependencies {
-    implementation project(':james-server:james-server-guice:james-server-cassandra-ldap-guice')
-    implementation project(':james-server:james-server-guice:james-server-cassandra-rabbitmq-guice')
-    implementation project(':james-server:james-server-guice:james-server-guice-rabbitmq')
+    api project(':james-server:james-server-guice:james-server-cassandra-ldap-guice')
+    api project(':james-server:james-server-guice:james-server-cassandra-rabbitmq-guice')
+    api project(':james-server:james-server-guice:james-server-guice-rabbitmq')
+
+    implementation 'com.google.inject:guice:4.2.2'
 
     testImplementation project(':james-backends-common:apache-james-backends-cassandra')
     testImplementation project(':james-backends-common:apache-james-backends-es')
diff --git a/server/container/guice/guice-common/build.gradle b/server/container/guice/guice-common/build.gradle
index 18c0324..8334d02 100644
--- a/server/container/guice/guice-common/build.gradle
+++ b/server/container/guice/guice-common/build.gradle
@@ -33,6 +33,8 @@ dependencies {
     api project(':metrics:metrics-api')
     api project(':metrics:metrics-dropwizard')
 
+    api 'com.google.inject:guice:4.2.2'
+
     implementation 'io.dropwizard.metrics:metrics-core:4.1.0'
     implementation 'com.github.steveash.guavate:guavate:1.0.0'
     implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
diff --git a/server/container/guice/jpa-common-guice/build.gradle b/server/container/guice/jpa-common-guice/build.gradle
index a345ad8..827a825 100644
--- a/server/container/guice/jpa-common-guice/build.gradle
+++ b/server/container/guice/jpa-common-guice/build.gradle
@@ -10,9 +10,11 @@ configurations {
 }
 
 dependencies {
-    implementation project(':james-server:james-server-data-file')
-    implementation project(':james-server:james-server-data-jpa')
-    implementation project(':james-server:james-server-guice:james-server-guice-common')
+    api project(':james-server:james-server-data-file')
+    api project(':james-server:james-server-data-jpa')
+    api project(':james-server:james-server-guice:james-server-guice-common')
+
+    implementation 'com.google.inject:guice:4.2.2'
 
     testImplementation 'org.apache.derby:derby:10.14.2.0'
 
diff --git a/server/container/guice/jpa-guice/build.gradle b/server/container/guice/jpa-guice/build.gradle
index ff96f21..16d890e 100644
--- a/server/container/guice/jpa-guice/build.gradle
+++ b/server/container/guice/jpa-guice/build.gradle
@@ -10,31 +10,31 @@ configurations {
 }
 
 dependencies {
-    implementation project(':apache-james-mailbox:apache-james-mailbox-jpa')
-    implementation project(':apache-james-mailbox:apache-james-mailbox-quota-search-scanning')
-    implementation project(':apache-james-mailbox:apache-james-mailbox-lucene')
-    implementation project(':james-server:james-server-data-jpa')
-    implementation project(':james-server:james-server-guice:james-server-guice-activemq')
-    implementation project(':james-server:james-server-guice:james-server-guice-common')
-    implementation project(':james-server:james-server-guice:james-server-guice-mailbox')
-    implementation project(':james-server:james-server-guice:james-server-guice-es-resporter')
-    implementation project(':james-server:james-server-guice:james-server-guice-imap')
-    implementation project(':james-server:james-server-guice:james-server-guice-jmx')
-    implementation project(':james-server:james-server-guice:james-server-guice-lmtp')
-    implementation project(':james-server:james-server-guice:james-server-guice-mailbox-plugin-spamassassin')
-    implementation project(':james-server:james-server-guice:james-server-guice-managedsieve')
-    implementation project(':james-server:james-server-guice:james-server-guice-pop')
-    implementation project(':james-server:james-server-guice:james-server-guice-smtp')
-    implementation project(':james-server:james-server-guice:james-server-guice-sieve-jpa')
-    implementation project(':james-server:james-server-guice:james-server-guice-webadmin')
-    implementation project(':james-server:james-server-guice:james-server-guice-webadmin-data')
-    implementation project(':james-server:james-server-guice:james-server-guice-webadmin-mailbox')
-    implementation project(':james-server:james-server-guice:james-server-guice-webadmin-mailqueue')
-    implementation project(':james-server:james-server-guice:james-server-guice-webadmin-mailrepository')
-    implementation project(':james-server:james-server-guice:james-server-guice-webadmin-swagger')
-    implementation project(':james-server:james-server-guice:james-server-jpa-common-guice')
-    implementation project(':james-server:james-server-mailbox-adapter')
-    implementation project(':james-server:james-server-mailets')
+    api project(':apache-james-mailbox:apache-james-mailbox-jpa')
+    api project(':apache-james-mailbox:apache-james-mailbox-quota-search-scanning')
+    api project(':apache-james-mailbox:apache-james-mailbox-lucene')
+    api project(':james-server:james-server-data-jpa')
+    api project(':james-server:james-server-guice:james-server-guice-activemq')
+    api project(':james-server:james-server-guice:james-server-guice-common')
+    api project(':james-server:james-server-guice:james-server-guice-mailbox')
+    api project(':james-server:james-server-guice:james-server-guice-es-resporter')
+    api project(':james-server:james-server-guice:james-server-guice-imap')
+    api project(':james-server:james-server-guice:james-server-guice-jmx')
+    api project(':james-server:james-server-guice:james-server-guice-lmtp')
+    api project(':james-server:james-server-guice:james-server-guice-mailbox-plugin-spamassassin')
+    api project(':james-server:james-server-guice:james-server-guice-managedsieve')
+    api project(':james-server:james-server-guice:james-server-guice-pop')
+    api project(':james-server:james-server-guice:james-server-guice-smtp')
+    api project(':james-server:james-server-guice:james-server-guice-sieve-jpa')
+    api project(':james-server:james-server-guice:james-server-guice-webadmin')
+    api project(':james-server:james-server-guice:james-server-guice-webadmin-data')
+    api project(':james-server:james-server-guice:james-server-guice-webadmin-mailbox')
+    api project(':james-server:james-server-guice:james-server-guice-webadmin-mailqueue')
+    api project(':james-server:james-server-guice:james-server-guice-webadmin-mailrepository')
+    api project(':james-server:james-server-guice:james-server-guice-webadmin-swagger')
+    api project(':james-server:james-server-guice:james-server-jpa-common-guice')
+    api project(':james-server:james-server-mailbox-adapter')
+    api project(':james-server:james-server-mailets')
 
     implementation 'ch.qos.logback:logback-classic:1.2.3'
     implementation 'com.linagora:logback-elasticsearch-appender:1.8.0'
diff --git a/server/container/guice/rabbitmq/build.gradle b/server/container/guice/rabbitmq/build.gradle
index 285d174..6679721 100644
--- a/server/container/guice/rabbitmq/build.gradle
+++ b/server/container/guice/rabbitmq/build.gradle
@@ -10,10 +10,10 @@ configurations {
 }
 
 dependencies {
-    implementation project(':james-backends-common:apache-james-backends-rabbitmq')
-    implementation project(':james-server:james-server-guice:james-server-guice-configuration')
-    implementation project(':james-server:james-server-queue-api')
-    implementation project(':james-server:james-server-queue-rabbitmq')
+    api project(':james-backends-common:apache-james-backends-rabbitmq')
+    api project(':james-server:james-server-guice:james-server-guice-configuration')
+    api project(':james-server:james-server-queue-api')
+    api project(':james-server:james-server-queue-rabbitmq')
 
     implementation 'com.google.inject:guice:4.2.2'
 
diff --git a/server/container/guice/testing/custom-mailets/build.gradle b/server/container/guice/testing/custom-mailets/build.gradle
index 364d771..23df4c5 100644
--- a/server/container/guice/testing/custom-mailets/build.gradle
+++ b/server/container/guice/testing/custom-mailets/build.gradle
@@ -10,10 +10,12 @@ configurations {
 }
 
 dependencies {
-    implementation project(':apache-mailet:apache-mailet-api')
-    implementation project(':apache-mailet:apache-mailet-base')
+    api project(':apache-mailet:apache-mailet-api')
+    api project(':apache-mailet:apache-mailet-base')
+    api project(':james-server:james-server-guice:james-server-guice-testing:james-server-guice-custom-mailets-dependency')
 
-    implementation project(':james-server:james-server-guice:james-server-guice-testing:james-server-guice-custom-mailets-dependency')
+    implementation 'com.sun.mail:javax.mail:1.6.2'
+    implementation 'javax.inject:javax.inject:1'
 
     testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.1'
     testImplementation 'org.junit.jupiter:junit-jupiter-params:5.5.1'
diff --git a/server/data/data-jmap-cassandra/build.gradle b/server/data/data-jmap-cassandra/build.gradle
index 0c350fc..3b77c12 100644
--- a/server/data/data-jmap-cassandra/build.gradle
+++ b/server/data/data-jmap-cassandra/build.gradle
@@ -10,11 +10,16 @@ configurations {
 }
 
 dependencies {
+    implementation project(':james-json')
     implementation project(':james-backends-common:apache-james-backends-cassandra')
     implementation project(':apache-james-mailbox:apache-james-mailbox-cassandra')
     implementation project(':event-sourcing:event-sourcing-event-store-cassandra')
     implementation project(':james-server:james-server-data-jmap')
 
+    implementation 'org.scala-lang:scala-library:2.13.1'
+    implementation 'com.fasterxml.jackson.core:jackson-annotations:2.9.9'
+    implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
+    implementation 'com.datastax.cassandra:cassandra-driver-core:3.7.2'
     implementation 'com.google.guava:guava:25.1-jre'
     implementation 'javax.inject:javax.inject:1'
     implementation 'org.slf4j:slf4j-api:1.7.27'
@@ -26,7 +31,6 @@ dependencies {
     testImplementation project(':james-server:james-server-data-jmap')
     testImplementation project(':metrics:metrics-tests')
 
-
     testImplementation 'net.javacrumbs.json-unit:json-unit-assertj:2.8.0'
     testImplementation 'org.awaitility:awaitility:3.1.6'
     testImplementation 'org.mockito:mockito-core:3.0.0'
diff --git a/server/mailet/mock-smtp-server/build.gradle b/server/mailet/mock-smtp-server/build.gradle
index f967e74..b9e8f40 100644
--- a/server/mailet/mock-smtp-server/build.gradle
+++ b/server/mailet/mock-smtp-server/build.gradle
@@ -1,16 +1,25 @@
 /*
  * This file was generated by the Gradle 'init' task.
  */
+plugins {
+    id 'java-library'
+}
+
+configurations {
+    tests
+}
 
 dependencies {
-    implementation project(':james-core')
-    implementation project(':james-server:james-server-util')
-    implementation project(':james-server:james-server-testing')
-    implementation project(':testing-base')
+    api project(':james-core')
+    api project(':james-server:james-server-util')
+    api project(':james-server:james-server-testing')
+
     implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
     implementation 'com.fasterxml.jackson.datatype:jackson-datatype-guava:2.9.9'
     implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.9'
+    implementation 'com.github.steveash.guavate:guavate:1.0.0'
     implementation 'com.google.guava:guava:25.1-jre'
+    implementation 'commons-io:commons-io:2.6'
     implementation 'io.github.openfeign:feign-core:10.3.0'
     implementation 'io.github.openfeign:feign-jackson:10.3.0'
     implementation 'io.github.openfeign:feign-slf4j:10.3.0'
@@ -18,9 +27,23 @@ dependencies {
     implementation 'org.slf4j:jcl-over-slf4j:1.7.27'
     implementation 'org.slf4j:slf4j-api:1.7.27'
     implementation 'org.subethamail:subethasmtp:3.1.7'
+
     testImplementation 'io.rest-assured:rest-assured:4.0.0'
     testImplementation 'net.javacrumbs.json-unit:json-unit-assertj:2.8.0'
     testImplementation 'org.awaitility:awaitility:3.1.6'
+
+    implementation 'org.testcontainers:testcontainers:1.12.0'
+    implementation 'junit:junit:4.13'
+    implementation 'org.junit.jupiter:junit-jupiter-api:5.5.1'
+    testImplementation 'org.junit.jupiter:junit-jupiter-params:5.5.1'
+
+// TODO: Move test helpers to java-test-fixtures and change this back to runtimeOnly
+    //    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.5.1'
+    testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.5.1'
+}
+
+test {
+    useJUnitPlatform()
 }
 
 description = 'Apache James :: Server :: Mailet :: Mock SMTP Server'
@@ -30,4 +53,9 @@ tasks.register('testsJar', Jar) {
     from(sourceSets.test.output)
 }
 
+artifacts {
+    tests testsJar
+}
+
 publishing.publications.maven.artifact(testsJar)
+
diff --git a/server/mailrepository/mailrepository-cassandra/build.gradle b/server/mailrepository/mailrepository-cassandra/build.gradle
index 743880b..9df5f62 100644
--- a/server/mailrepository/mailrepository-cassandra/build.gradle
+++ b/server/mailrepository/mailrepository-cassandra/build.gradle
@@ -10,10 +10,22 @@ configurations {
 }
 
 dependencies {
-    implementation project(':james-backends-common:apache-james-backends-cassandra')
-    implementation project(':james-server:james-server-blob:james-server-mail-store')
-    implementation project(':james-server:james-server-core')
     api project(':james-server:james-server-mailrepository-api')
+    api project(':james-server:james-server-blob:blob-common')
+    api project(':james-backends-common:apache-james-backends-cassandra')
+    api project(':james-server:james-server-blob:james-server-mail-store')
+    api project(':james-server:james-server-core')
+
+    implementation project(':james-server:james-server-util')
+
+    implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
+    implementation 'com.datastax.cassandra:cassandra-driver-core:3.7.2'
+    implementation 'com.github.fge:throwing-lambdas:0.5.0'
+    implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
+    implementation 'com.github.steveash.guavate:guavate:1.0.0'
+    implementation 'com.google.guava:guava:25.1-jre'
+    implementation 'com.sun.mail:javax.mail:1.6.2'
+    implementation 'javax.inject:javax.inject:1'
 
     testImplementation project(':james-backends-common:apache-james-backends-cassandra')
     testImplementation project(':james-server:james-server-blob:blob-cassandra')
diff --git a/server/protocols/webadmin-integration-test/webadmin-integration-test-common/build.gradle b/server/protocols/webadmin-integration-test/webadmin-integration-test-common/build.gradle
index 5811bc9..b832b37 100644
--- a/server/protocols/webadmin-integration-test/webadmin-integration-test-common/build.gradle
+++ b/server/protocols/webadmin-integration-test/webadmin-integration-test-common/build.gradle
@@ -10,34 +10,36 @@ configurations {
 }
 
 dependencies {
-    implementation project(':james-backends-common:apache-james-backends-es')
-    implementation project(':third-party:apache-james-linshare')
-    implementation project(':apache-james-mailbox:apache-james-mailbox-memory')
-    implementation project(':apache-james-mailbox:apache-james-mailbox-scanning-search')
-    implementation project(':apache-james-mailbox:backup')
-    implementation project(':james-server:james-server-guice:blob-export-guice')
-    implementation project(':james-server:james-server-guice:james-server-guice-common')
-    implementation project(':james-server:james-server-guice:james-server-guice-jmap')
-    implementation project(':james-server:james-server-guice:james-server-guice-imap')
-    implementation project(':james-server:james-server-guice:james-server-guice-jmap')
-    implementation project(':james-server:james-server-guice:james-server-guice-mailbox')
-    implementation project(':james-server:james-server-guice:james-server-guice-webadmin')
-    implementation project(':james-server:james-server-guice:james-server-mailbox-plugin-deleted-messages-vault-guice')
-    implementation project(':james-server:james-server-testing')
-    implementation project(':james-server:james-server-webadmin-core')
-    implementation project(':james-server:james-server-webadmin-data')
-    implementation project(':james-server:james-server-webadmin-mailbox')
-    implementation project(':james-server:james-server-webadmin-mailqueue')
-    implementation project(':james-server:james-server-webadmin-mailrepository')
-    implementation project(':james-server:james-server-webadmin-swagger')
-
+    api project(path: ':apache-james-mailbox:backup', configuration: 'tests')
+    api project(':apache-james-mailbox:apache-james-mailbox-memory')
+    api project(':apache-james-mailbox:apache-james-mailbox-scanning-search')
+    api project(':james-backends-common:apache-james-backends-es')
+    api project(':james-server:james-server-guice:blob-export-guice')
+    api project(path: ':james-server:james-server-guice:james-server-guice-common', configuration: 'tests')
+    api project(':james-server:james-server-guice:james-server-guice-jmap')
+    api project(':james-server:james-server-guice:james-server-guice-imap')
+    api project(':james-server:james-server-guice:james-server-guice-jmap')
+    api project(':james-server:james-server-guice:james-server-guice-mailbox')
+    api project(':james-server:james-server-guice:james-server-guice-webadmin')
+    api project(':james-server:james-server-guice:james-server-mailbox-plugin-deleted-messages-vault-guice')
+    api project(':james-server:james-server-testing')
+    api project(path: ':james-server:james-server-webadmin-core', configuration: 'tests')
+    api project(':james-server:james-server-webadmin-data')
+    api project(':james-server:james-server-webadmin-mailbox')
+    api project(':james-server:james-server-webadmin-mailqueue')
+    api project(':james-server:james-server-webadmin-mailrepository')
+    api project(':james-server:james-server-webadmin-swagger')
+    api project(path: ':third-party:apache-james-linshare', configuration: 'tests')
+
+    implementation 'org.awaitility:awaitility:3.1.6'
     implementation 'io.rest-assured:rest-assured:4.0.0'
     implementation 'org.hamcrest:java-hamcrest:2.0.0.0'
     implementation 'org.testcontainers:testcontainers:1.12.0'
+    implementation 'org.assertj:assertj-core:3.12.2'
+    implementation 'org.junit.jupiter:junit-jupiter-api:5.5.1'
+    implementation 'org.junit.jupiter:junit-jupiter-params:5.5.1'
 
-    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.1'
-    testImplementation 'org.junit.jupiter:junit-jupiter-params:5.5.1'
-    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.5.1'
+    testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.5.1'
 }
 
 test {
diff --git a/server/protocols/webadmin/webadmin-cassandra-data/build.gradle b/server/protocols/webadmin/webadmin-cassandra-data/build.gradle
index 8e9b58f..c027c01 100644
--- a/server/protocols/webadmin/webadmin-cassandra-data/build.gradle
+++ b/server/protocols/webadmin/webadmin-cassandra-data/build.gradle
@@ -10,15 +10,20 @@ configurations {
 }
 
 dependencies {
-    implementation project(':james-backends-common:apache-james-backends-cassandra')
-    implementation project(':james-server:james-server-data-cassandra')
-    implementation project(':james-server:james-server-task-json')
-    implementation project(':james-server:james-server-webadmin-core')
+    api project(':james-backends-common:apache-james-backends-cassandra')
+    api project(':james-server:james-server-data-cassandra')
+    api project(':james-server:james-server-task-json')
+    api project(':james-server:james-server-webadmin-core')
+
+    implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
+    implementation 'javax.inject:javax.inject:1'
+
     testImplementation project(':james-backends-common:apache-james-backends-cassandra')
     testImplementation project(':james-server:james-server-task-memory')
     testImplementation project(':james-server:james-server-webadmin-core')
     testImplementation project(':metrics:metrics-tests')
     testImplementation project(':testing-base')
+
     testImplementation 'io.rest-assured:rest-assured:4.0.0'
     testImplementation 'net.javacrumbs.json-unit:json-unit-assertj:2.8.0'
     testImplementation 'org.mockito:mockito-core:3.0.0'
@@ -41,4 +46,8 @@ tasks.register('testsJar', Jar) {
     from(sourceSets.test.output)
 }
 
+artifacts {
+    tests testsJar
+}
+
 publishing.publications.maven.artifact(testsJar)
diff --git a/server/protocols/webadmin/webadmin-cassandra/build.gradle b/server/protocols/webadmin/webadmin-cassandra/build.gradle
index a44f293..3de36cd 100644
--- a/server/protocols/webadmin/webadmin-cassandra/build.gradle
+++ b/server/protocols/webadmin/webadmin-cassandra/build.gradle
@@ -10,9 +10,11 @@ configurations {
 }
 
 dependencies {
-    implementation project(':apache-james-mailbox:apache-james-mailbox-cassandra')
-    implementation project(':james-server:james-server-webadmin-core')
+    api project(':apache-james-mailbox:apache-james-mailbox-cassandra')
+    api project(':james-server:james-server-webadmin-core')
 
+    implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
+    implementation 'com.google.guava:guava:25.1-jre'
     implementation 'javax.inject:javax.inject:1'
     implementation 'org.slf4j:slf4j-api:1.7.27'
 
diff --git a/server/queue/queue-activemq/build.gradle b/server/queue/queue-activemq/build.gradle
index a2218cd..def6368 100644
--- a/server/queue/queue-activemq/build.gradle
+++ b/server/queue/queue-activemq/build.gradle
@@ -13,10 +13,13 @@ dependencies {
     api project(':apache-mailet:apache-mailet-api')
     api project(':james-server:james-server-filesystem-api')
     api project(':james-server:james-server-queue-api')
+    api project(':james-server:james-server-core')
+    api project(':james-server:james-server-queue-jms')
+    api project(':metrics:metrics-api')
 
-    implementation project(':james-server:james-server-core')
-    implementation project(':james-server:james-server-queue-jms')
-    implementation project(':metrics:metrics-api')
+    api 'org.apache.activemq:activemq-broker:5.15.9'
+    api 'org.apache.activemq:activemq-kahadb-store:5.15.9'
+    api 'org.apache.activemq:artemis-jms-client:2.9.0'
 
     implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
     implementation 'org.reactivestreams:reactive-streams:1.0.3'
@@ -25,9 +28,6 @@ dependencies {
     implementation 'com.sun.mail:javax.mail:1.6.2'
     implementation 'javax.annotation:javax.annotation-api:1.3.2'
     implementation 'javax.inject:javax.inject:1'
-    implementation 'org.apache.activemq:activemq-broker:5.15.9'
-    implementation 'org.apache.activemq:activemq-kahadb-store:5.15.9'
-    implementation 'org.apache.activemq:artemis-jms-client:2.9.0'
     implementation 'org.slf4j:slf4j-api:1.7.27'
 
     testImplementation project(':james-server:james-server-queue-api')
diff --git a/server/queue/queue-jms/build.gradle b/server/queue/queue-jms/build.gradle
index 0bffbde..6e02fad 100644
--- a/server/queue/queue-jms/build.gradle
+++ b/server/queue/queue-jms/build.gradle
@@ -10,13 +10,15 @@ configurations {
 }
 
 dependencies {
-    implementation project(':james-core')
-    implementation project(':apache-mailet:apache-mailet-api')
-    implementation project(':james-server:james-server-core')
-    implementation project(':james-server:james-server-lifecycle-api')
-    implementation project(':james-server:james-server-queue-api')
-    implementation project(':metrics:metrics-api')
-    implementation project(':james-server:james-server-util')
+    api project(':apache-mailet:apache-mailet-api')
+    api project(':james-core')
+    api project(':james-server:james-server-core')
+    api project(':james-server:james-server-lifecycle-api')
+    api project(':james-server:james-server-queue-api')
+    api project(':james-server:james-server-util')
+    api project(':metrics:metrics-api')
+
+    api 'org.apache.geronimo.specs:geronimo-jms_2.0_spec:1.0-alpha-2'
 
     implementation 'com.github.fge:throwing-lambdas:0.5.0'
     implementation 'com.github.steveash.guavate:guavate:1.0.0'
diff --git a/server/queue/queue-rabbitmq/build.gradle b/server/queue/queue-rabbitmq/build.gradle
index 155f9ea..e1970b6 100644
--- a/server/queue/queue-rabbitmq/build.gradle
+++ b/server/queue/queue-rabbitmq/build.gradle
@@ -10,29 +10,34 @@ configurations {
 }
 
 dependencies {
-    api project(':metrics:metrics-api')
+    api project(':event-sourcing:event-sourcing-core')
+    api project(':event-sourcing:event-sourcing-event-store-cassandra')
+    api project(':event-sourcing:event-sourcing-pojo')
     api project(':james-server:james-server-blob:blob-api')
+    api project(':james-server:james-server-blob:blob-common')
     api project(':james-server:james-server-queue-api')
-
-    implementation project(':james-backends-common:apache-james-backends-rabbitmq')
-    implementation project(':james-backends-common:apache-james-backends-cassandra')
-    implementation project(':event-sourcing:event-sourcing-core')
-    implementation project(':event-sourcing:event-sourcing-event-store-cassandra')
-    implementation project(':event-sourcing:event-sourcing-pojo')
-    implementation project(':james-server:james-server-core')
-    implementation project(':james-server:james-server-blob:james-server-mail-store')
-    implementation project(':james-server:james-server-util')
+    api project(':james-backends-common:apache-james-backends-rabbitmq')
+    api project(':james-backends-common:apache-james-backends-cassandra')
+    api project(':james-server:james-server-core')
+    api project(':james-server:james-server-blob:james-server-mail-store')
+    api project(':james-server:james-server-util')
+    api project(':metrics:metrics-api')
 
     implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
     implementation 'com.fasterxml.jackson.datatype:jackson-datatype-guava:2.9.9'
     implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.9'
     implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9'
+    implementation 'com.datastax.cassandra:cassandra-driver-core:3.7.2'
     implementation 'com.github.fge:throwing-lambdas:0.5.0'
     implementation 'com.github.steveash.guavate:guavate:1.0.0'
     implementation 'com.google.guava:guava:25.1-jre'
+    implementation 'com.sun.mail:javax.mail:1.6.2'
     implementation 'com.rabbitmq:amqp-client:5.7.3'
     implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
+    implementation 'io.projectreactor.rabbitmq:reactor-rabbitmq:1.4.1.RELEASE'
     implementation 'javax.inject:javax.inject:1'
+    implementation 'org.apache.commons:commons-configuration2:2.7'
+    implementation 'org.scala-lang:scala-library:2.13.1'
     implementation 'org.slf4j:slf4j-api:1.7.27'
 
     testImplementation project(':james-backends-common:apache-james-backends-rabbitmq')
diff --git a/server/task/task-api/build.gradle b/server/task/task-api/build.gradle
index 04bb3d3..3e97f55 100644
--- a/server/task/task-api/build.gradle
+++ b/server/task/task-api/build.gradle
@@ -18,7 +18,6 @@ dependencies {
     implementation 'org.scala-lang.modules:scala-java8-compat_2.13:0.9.0'
     implementation 'org.slf4j:slf4j-api:1.7.27'
 
-
     testImplementation 'com.github.fge:throwing-lambdas:0.5.0'
     testImplementation 'org.awaitility:awaitility:3.1.6'
     testImplementation 'org.mockito:mockito-core:3.0.0'
diff --git a/server/task/task-distributed/build.gradle b/server/task/task-distributed/build.gradle
index c01ef5a..415b4be 100644
--- a/server/task/task-distributed/build.gradle
+++ b/server/task/task-distributed/build.gradle
@@ -3,20 +3,32 @@
  */
 plugins {
     id 'java-library'
+    id 'scala'
 }
 
 dependencies {
-    implementation project(':james-backends-common:apache-james-backends-cassandra')
-    implementation project(':james-backends-common:apache-james-backends-rabbitmq')
-    implementation project(':event-sourcing:event-sourcing-event-store-cassandra')
-    implementation project(':james-json')
+    api project(':event-sourcing:event-sourcing-core')
+    api project(':event-sourcing:event-sourcing-event-store-cassandra')
+    api project(':james-json')
+    api project(':james-backends-common:apache-james-backends-cassandra')
+    api project(':james-backends-common:apache-james-backends-rabbitmq')
     api project(':james-server:james-server-lifecycle-api')
-    implementation project(':james-server:james-server-task-json')
-    implementation project(':james-server:james-server-task-memory')
+    api project(':james-server:james-server-task-json')
+    api project(':james-server:james-server-task-memory')
+    api project(':james-server:james-server-util')
 
+    implementation 'com.rabbitmq:amqp-client:5.7.3'
     implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
+    implementation 'com.datastax.cassandra:cassandra-driver-core:3.7.2'
+    implementation 'com.github.steveash.guavate:guavate:1.0.0'
+    implementation 'com.google.guava:guava:25.1-jre'
+    implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
+    implementation 'io.projectreactor.rabbitmq:reactor-rabbitmq:1.4.1.RELEASE'
+    implementation 'javax.annotation:javax.annotation-api:1.3.2'
+    implementation 'javax.inject:javax.inject:1'
     implementation 'org.scala-lang:scala-library:2.13.1'
     implementation 'org.scala-lang.modules:scala-java8-compat_2.13:0.9.0'
+    implementation 'org.slf4j:slf4j-api:1.7.27'
 
     testImplementation project(':james-backends-common:apache-james-backends-cassandra')
     testImplementation project(':james-backends-common:apache-james-backends-rabbitmq')
@@ -42,6 +54,17 @@ test {
     useJUnitPlatform()
 }
 
+// https://stackoverflow.com/questions/23261075/compiling-scala-before-alongside-java-with-gradle
+sourceSets {
+    main {
+        scala {
+            srcDirs = ['src/main/scala', 'src/main/java']
+        }
+        java {
+            srcDirs = []
+        }
+    }
+}
 
 description = 'Apache James :: Server :: Task :: Distributed'
 


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