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:45 UTC
[james-project] 11/23: JAMES-3260 Builds up to
:apache-james-mailbox:apache-james-mailbox-lucene:compileJava
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 25569e740ea87f1c551b87feaac89feb5a90b5bc
Author: Eugen Stan <ie...@apache.org>
AuthorDate: Mon Jun 22 11:57:57 2020 +0300
JAMES-3260 Builds up to :apache-james-mailbox:apache-james-mailbox-lucene:compileJava
* Using 'java-libary' plugin more for api dependencies
* metrics-* projects use java-library
* added junit dependencies to metrics-*
* using openjpa enhancing plugin
---
backends-common/jpa/build.gradle | 16 +++++++-
core/build.gradle | 4 ++
mailbox/api/build.gradle | 3 ++
mailbox/cassandra/build.gradle | 5 ++-
mailbox/jpa/build.gradle | 58 ++++++++++++++++++++++++++++-
metrics/metrics-api/build.gradle | 13 +++++++
metrics/metrics-dropwizard/build.gradle | 15 +++++++-
metrics/metrics-logger/build.gradle | 15 +++++++-
metrics/metrics-tests/build.gradle | 16 +++++++-
server/container/lifecycle-api/build.gradle | 15 +++++++-
server/data/data-api/build.gradle | 13 ++++++-
server/data/data-jpa/build.gradle | 34 +++++++++++++++++
server/data/data-library/build.gradle | 17 ++++++++-
testing/base/build.gradle | 29 ++++++++++++---
14 files changed, 237 insertions(+), 16 deletions(-)
diff --git a/backends-common/jpa/build.gradle b/backends-common/jpa/build.gradle
index 63f326b..fe31de3 100644
--- a/backends-common/jpa/build.gradle
+++ b/backends-common/jpa/build.gradle
@@ -1,11 +1,21 @@
/*
* This file was generated by the Gradle 'init' task.
*/
+plugins {
+ id 'java-library'
+}
+
+configurations {
+ tests
+}
dependencies {
- implementation 'com.google.guava:guava:25.1-jre'
+ api 'org.apache.geronimo.specs:geronimo-jpa_2.2_spec:1.0'
implementation 'org.apache.openjpa:openjpa:3.1.0'
+
+ implementation 'com.google.guava:guava:25.1-jre'
implementation 'org.slf4j:slf4j-api:1.7.27'
+
testImplementation project(':testing-base')
testImplementation 'org.apache.derby:derby:10.14.2.0'
}
@@ -15,4 +25,8 @@ tasks.register('testsJar', Jar) {
from(sourceSets.test.output)
}
+artifacts {
+ tests testsJar
+}
+
publishing.publications.maven.artifact(testsJar)
diff --git a/core/build.gradle b/core/build.gradle
index d12464c..1cee37f 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -1,6 +1,9 @@
/*
* This file was generated by the Gradle 'init' task.
*/
+plugins {
+ id 'java-library'
+}
dependencies {
implementation 'com.github.fge:throwing-lambdas:0.5.0'
@@ -11,6 +14,7 @@ dependencies {
implementation 'commons-io:commons-io:2.6'
implementation 'org.reactivestreams:reactive-streams:1.0.3'
implementation 'org.slf4j:slf4j-api:1.7.27'
+
testImplementation project(':james-server:james-server-util')
testImplementation project(':testing-base')
diff --git a/mailbox/api/build.gradle b/mailbox/api/build.gradle
index d8ae3b4..4b0c816 100644
--- a/mailbox/api/build.gradle
+++ b/mailbox/api/build.gradle
@@ -1,6 +1,9 @@
/*
* This file was generated by the Gradle 'init' task.
*/
+plugins {
+ id 'java-library'
+}
configurations {
tests
diff --git a/mailbox/cassandra/build.gradle b/mailbox/cassandra/build.gradle
index 50edcac..bbd2398 100644
--- a/mailbox/cassandra/build.gradle
+++ b/mailbox/cassandra/build.gradle
@@ -1,13 +1,16 @@
/*
* This file was generated by the Gradle 'init' task.
*/
+plugins {
+ id 'java-library'
+}
dependencies {
implementation project(":james-core")
implementation project(":james-json")
implementation project(':james-backends-common:apache-james-backends-cassandra')
- implementation project(':apache-james-mailbox:apache-james-mailbox-api')
+ api project(':apache-james-mailbox:apache-james-mailbox-api')
implementation project(':apache-james-mailbox:apache-james-mailbox-store')
implementation project(':james-server:james-server-blob:blob-api')
implementation project(':james-server:james-server-task-api')
diff --git a/mailbox/jpa/build.gradle b/mailbox/jpa/build.gradle
index fb06227..4dc1dec 100644
--- a/mailbox/jpa/build.gradle
+++ b/mailbox/jpa/build.gradle
@@ -2,25 +2,79 @@
* This file was generated by the Gradle 'init' task.
*/
+buildscript {
+ repositories {
+ jcenter()
+ }
+
+ dependencies {
+ classpath 'com.radcortez.gradle:openjpa-gradle-plugin:3.1.0'
+ }
+}
+
+plugins {
+ id 'java-library'
+}
+
+apply plugin: 'openjpa'
+
dependencies {
+ implementation project(':james-core')
+
implementation project(':james-backends-common:apache-james-backends-jpa')
implementation project(':apache-james-mailbox:apache-james-mailbox-api')
implementation project(':apache-james-mailbox:apache-james-mailbox-store')
implementation project(':james-server:james-server-util')
+
+ implementation 'org.apache.openjpa:openjpa:3.1.0'
+ 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'
+ implementation 'com.github.fge:throwing-lambdas:0.5.0'
+ implementation 'commons-io:commons-io:2.6'
+ implementation 'org.apache.commons:commons-lang3:3.9'
implementation 'com.sun.mail:javax.mail:1.6.2'
+ implementation 'javax.inject:javax.inject:1'
implementation 'org.jasypt:jasypt:1.9.3'
implementation 'org.slf4j:slf4j-api:1.7.27'
- testImplementation project(':james-backends-common:apache-james-backends-jpa')
+
+ testImplementation 'org.apache.commons:commons-configuration2:2.7'
+ testImplementation project(':james-server:james-server-lifecycle-api')
+ testImplementation project(':james-server:james-server-data-library')
+ testImplementation project(path: ':james-backends-common:apache-james-backends-jpa', configuration: 'tests')
+
testImplementation project(':apache-james-mailbox:apache-james-mailbox-api')
+ testImplementation project(path: ':apache-james-mailbox:apache-james-mailbox-api', configuration: 'tests')
+
testImplementation project(':apache-james-mailbox:apache-james-mailbox-event-memory')
testImplementation project(':apache-james-mailbox:apache-james-mailbox-store')
+ testImplementation project(path: ':apache-james-mailbox:apache-james-mailbox-store', configuration: 'tests')
+
testImplementation project(':apache-james-mailbox:apache-james-mailbox-tools-quota-recompute')
- testImplementation project(':apache-james-mailbox:apache-james-mailbox-tools-quota-recompute')
+ testImplementation project(path: ':apache-james-mailbox:apache-james-mailbox-tools-quota-recompute', configuration: 'tests')
testImplementation project(':james-server:james-server-data-jpa')
testImplementation project(':metrics:metrics-tests')
testImplementation project(':testing-base')
+
testImplementation 'org.apache.derby:derby:10.14.2.0'
testImplementation 'org.mockito:mockito-core:3.0.0'
+ testImplementation 'org.assertj:assertj-core:3.12.2'
+
+ 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()
+}
+
+openjpa {
+ enhance {
+ addDefaultConstructor true
+ enforcePropertyRestrictions false
+ tmpClassLoader false
+ }
}
description = 'Apache James :: Mailbox :: JPA'
diff --git a/metrics/metrics-api/build.gradle b/metrics/metrics-api/build.gradle
index b0b07d6..eeab962 100644
--- a/metrics/metrics-api/build.gradle
+++ b/metrics/metrics-api/build.gradle
@@ -2,10 +2,23 @@
* This file was generated by the Gradle 'init' task.
*/
+plugins {
+ id 'java-library'
+}
+
dependencies {
implementation 'org.apache.commons:commons-lang3:3.9'
implementation 'org.reactivestreams:reactive-streams:1.0.3'
+
testImplementation project(':testing-base')
+
+ 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 :: Metrics :: API'
diff --git a/metrics/metrics-dropwizard/build.gradle b/metrics/metrics-dropwizard/build.gradle
index a816f30..28eb279 100644
--- a/metrics/metrics-dropwizard/build.gradle
+++ b/metrics/metrics-dropwizard/build.gradle
@@ -1,18 +1,31 @@
/*
* This file was generated by the Gradle 'init' task.
*/
+plugins {
+ id 'java-library'
+}
dependencies {
- implementation project(':metrics:metrics-api')
+ api project(':metrics:metrics-api')
implementation project(':james-server:james-server-lifecycle-api')
+
implementation 'io.dropwizard.metrics:metrics-core:4.1.0'
implementation 'io.dropwizard.metrics:metrics-jmx:4.1.0'
implementation 'io.dropwizard.metrics:metrics-jvm:4.1.0'
implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
implementation 'javax.annotation:javax.annotation-api:1.3.2'
implementation 'javax.inject:javax.inject:1'
+
testImplementation project(':metrics:metrics-api')
testImplementation project(':testing-base')
+
+ 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 :: Metrics :: Dropwizard'
diff --git a/metrics/metrics-logger/build.gradle b/metrics/metrics-logger/build.gradle
index f6a0c5a..300674e 100644
--- a/metrics/metrics-logger/build.gradle
+++ b/metrics/metrics-logger/build.gradle
@@ -1,14 +1,27 @@
/*
* This file was generated by the Gradle 'init' task.
*/
+plugins {
+ id 'java-library'
+}
dependencies {
- implementation project(':metrics:metrics-api')
+ api project(':metrics:metrics-api')
+
implementation 'com.google.guava:guava:25.1-jre'
implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
implementation 'org.slf4j:slf4j-api:1.7.27'
+
testImplementation project(':metrics:metrics-api')
testImplementation project(':testing-base')
+
+ 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 :: Metrics :: Logger'
diff --git a/metrics/metrics-tests/build.gradle b/metrics/metrics-tests/build.gradle
index 2c72c64..1ecb5fb 100644
--- a/metrics/metrics-tests/build.gradle
+++ b/metrics/metrics-tests/build.gradle
@@ -1,16 +1,30 @@
/*
* This file was generated by the Gradle 'init' task.
*/
+plugins {
+ id 'java-library'
+}
dependencies {
- implementation project(':metrics:metrics-api')
+ api project(':metrics:metrics-api')
+
implementation 'com.google.guava:guava:25.1-jre'
implementation 'com.github.steveash.guavate:guavate:1.0.0'
implementation 'io.projectreactor:reactor-core:3.3.4.RELEASE'
+
testImplementation project(':james-server:james-server-util')
testImplementation project(':metrics:metrics-api')
testImplementation project(':testing-base')
+
testImplementation 'org.awaitility:awaitility:3.1.6'
+
+ 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 :: Metrics :: Tests'
diff --git a/server/container/lifecycle-api/build.gradle b/server/container/lifecycle-api/build.gradle
index 5607b75..e027290 100644
--- a/server/container/lifecycle-api/build.gradle
+++ b/server/container/lifecycle-api/build.gradle
@@ -1,12 +1,25 @@
/*
* This file was generated by the Gradle 'init' task.
*/
-
+plugins {
+ id 'java-library'
+}
dependencies {
+
implementation 'com.google.guava:guava:25.1-jre'
implementation 'org.apache.commons:commons-configuration2:2.7'
implementation 'org.slf4j:slf4j-api:1.7.27'
+
testImplementation project(':testing-base')
+ testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.1.9'
+
+ 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 :: Server :: Lifecycle API'
diff --git a/server/data/data-api/build.gradle b/server/data/data-api/build.gradle
index 4efbdcf..e36594c 100644
--- a/server/data/data-api/build.gradle
+++ b/server/data/data-api/build.gradle
@@ -1,10 +1,13 @@
/*
* This file was generated by the Gradle 'init' task.
*/
+plugins {
+ id 'java-library'
+}
dependencies {
implementation project(':james-core')
- implementation project(':james-server:james-server-mailrepository-api')
+ api project(':james-server:james-server-mailrepository-api')
implementation 'org.apache.commons:commons-configuration2:2.7'
implementation 'com.github.steveash.guavate:guavate:1.0.0'
@@ -15,6 +18,14 @@ dependencies {
testImplementation project(':testing-base')
testImplementation 'org.slf4j:jcl-over-slf4j:1.7.27'
+
+ 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 :: Server :: Data :: API'
diff --git a/server/data/data-jpa/build.gradle b/server/data/data-jpa/build.gradle
index a975de6..d80bc13 100644
--- a/server/data/data-jpa/build.gradle
+++ b/server/data/data-jpa/build.gradle
@@ -2,26 +2,60 @@
* This file was generated by the Gradle 'init' task.
*/
+buildscript {
+ repositories {
+ jcenter()
+ }
+
+ dependencies {
+ classpath 'com.radcortez.gradle:openjpa-gradle-plugin:3.1.0'
+ }
+}
+
+plugins {
+ id 'java-library'
+}
+
+apply plugin: 'openjpa'
+
dependencies {
+ implementation project(':james-core')
implementation project(':james-backends-common:apache-james-backends-jpa')
implementation project(':james-server:james-server-data-api')
implementation project(':james-server:james-server-data-library')
implementation project(':james-server:james-server-dnsservice-api')
implementation project(':james-server:james-server-lifecycle-api')
+
+ 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'
+ implementation 'commons-io:commons-io:2.6'
implementation 'org.apache.commons:commons-configuration2:2.7'
+ implementation 'com.github.fge:throwing-lambdas:0.5.0'
+ implementation 'javax.annotation:javax.annotation-api:1.3.2'
+ implementation 'javax.inject:javax.inject:1'
implementation 'org.slf4j:jcl-over-slf4j:1.7.27'
implementation 'org.slf4j:log4j-over-slf4j:1.7.27'
implementation 'org.slf4j:slf4j-api:1.7.27'
+
testImplementation project(':james-backends-common:apache-james-backends-jpa')
testImplementation project(':james-server:james-server-data-api')
testImplementation project(':james-server:james-server-data-library')
testImplementation project(':james-server:james-server-dnsservice-test')
testImplementation project(':testing-base')
+
testImplementation 'org.apache.derby:derby:10.14.2.0'
testImplementation 'io.cucumber:cucumber-java:2.4.0'
testImplementation 'io.cucumber:cucumber-junit:2.4.0'
testImplementation 'io.cucumber:cucumber-picocontainer:2.4.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 :: Server :: Data :: JPA Persistence'
diff --git a/server/data/data-library/build.gradle b/server/data/data-library/build.gradle
index 93b951c..f8e915f 100644
--- a/server/data/data-library/build.gradle
+++ b/server/data/data-library/build.gradle
@@ -2,6 +2,10 @@
* This file was generated by the Gradle 'init' task.
*/
+plugins {
+ id 'java-library'
+}
+
dependencies {
implementation project(":james-core")
@@ -11,7 +15,7 @@ dependencies {
implementation project(':event-sourcing:event-sourcing-core')
implementation project(':event-sourcing:event-sourcing-event-store-api')
- implementation project(':james-server:james-server-data-api')
+ api project(':james-server:james-server-data-api')
implementation project(':james-server:james-server-dnsservice-api')
implementation project(':james-server:james-server-filesystem-api')
implementation project(':james-server:james-server-lifecycle-api')
@@ -38,6 +42,17 @@ dependencies {
testImplementation 'io.cucumber:cucumber-java:2.4.0'
testImplementation 'io.cucumber:cucumber-junit:2.4.0'
testImplementation 'org.mockito:mockito-core:3.0.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'
+
+ testCompileOnly 'junit:junit:4.13'
+ testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.5.1'
+}
+
+test {
+ useJUnitPlatform()
}
description = 'Apache James :: Server :: Data :: Library'
diff --git a/testing/base/build.gradle b/testing/base/build.gradle
index 1efd855..f819e4f 100644
--- a/testing/base/build.gradle
+++ b/testing/base/build.gradle
@@ -1,15 +1,32 @@
/*
* This file was generated by the Gradle 'init' task.
*/
+plugins {
+ id 'java-library'
+}
+
+/**
+ * TODO: This module does not make much sense with gradle and it's project configuration capabilities
+ * It does not have any classes, it's only used for dependencies.
+ *
+ * Gradle offers multiple options that we can use:
+ * https://docs.gradle.org/current/userguide/multi_project_builds.html
+ *
+ * - composite builds
+ * - sub-project configuration https://docs.gradle.org/current/userguide/multi_project_builds.html#sec:subproject_configuration
+ */
dependencies {
implementation 'ch.qos.logback:logback-classic:1.2.3'
- implementation 'nl.jqno.equalsverifier:equalsverifier:3.1.9'
- implementation 'org.assertj:assertj-core:3.12.2'
- implementation 'org.junit.jupiter:junit-jupiter-engine:5.5.1'
- implementation 'org.junit.jupiter:junit-jupiter-params:5.5.1'
- implementation 'org.junit.platform:junit-platform-launcher:1.5.1'
- implementation 'org.junit.vintage:junit-vintage-engine:5.5.1'
+
+ api 'nl.jqno.equalsverifier:equalsverifier:3.1.9'
+ api 'org.assertj:assertj-core:3.12.2'
+
+ api 'org.junit.jupiter:junit-jupiter-engine:5.5.1'
+ api 'org.junit.jupiter:junit-jupiter-params:5.5.1'
+ api 'org.junit.platform:junit-platform-launcher:1.5.1'
+
+ api 'org.junit.vintage:junit-vintage-engine:5.5.1'
}
description = 'Apache James :: Testing :: Base'
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org