From 103daac477665cf12d2d4c4f878c8fa10a1f217f Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Wed, 3 Jan 2024 20:14:36 +0100 Subject: [PATCH 01/21] [ISSUE #4700] Remove logging backends from runtime deps This PR removes all the logging backends from the Maven artifacts. As explained in #4700 libraries should only depend on logging APIs, not logging implementations the same way web applications depend on the Servlet API, not its implementations. The logging backends are added to the `dist` folder to be included in the TAR binary distribution. --- build.gradle | 290 ++++++++++-------- eventmesh-common/build.gradle | 6 +- .../eventmesh-connector-pravega/build.gradle | 5 - .../eventmesh-connector-pulsar/build.gradle | 11 +- .../eventmesh-connector-rabbitmq/build.gradle | 5 - .../eventmesh-connector-rocketmq/build.gradle | 27 +- .../gradle.properties | 3 +- .../eventmesh-connector-slack/build.gradle | 8 +- .../eventmesh-connector-spring/build.gradle | 14 +- .../eventmesh-connector-wechat/build.gradle | 8 +- .../eventmesh-connector-wecom/build.gradle | 8 +- eventmesh-examples/build.gradle | 7 +- .../eventmesh-openconnect-java/build.gradle | 8 +- .../build.gradle | 8 +- .../build.gradle | 6 +- .../eventmesh-storage-kafka/build.gradle | 4 - .../eventmesh-storage-pulsar/build.gradle | 5 - .../eventmesh-storage-rabbitmq/build.gradle | 5 - .../eventmesh-storage-redis/build.gradle | 4 - .../eventmesh-storage-rocketmq/build.gradle | 30 +- .../gradle.properties | 1 - 21 files changed, 224 insertions(+), 239 deletions(-) diff --git a/build.gradle b/build.gradle index c8b371cf95..53d3dcf5c2 100644 --- a/build.gradle +++ b/build.gradle @@ -17,8 +17,6 @@ import java.util.concurrent.TimeUnit - - buildscript { repositories { mavenLocal() @@ -49,6 +47,18 @@ if(JavaVersion.current().isJava8()){ } } +def log4jVersion = '2.22.1' + +configurations { + distOnly +} + +dependencies { + distOnly "org.apache.logging.log4j:log4j-core:${log4jVersion}" + distOnly "org.apache.logging.log4j:log4j-jul:${log4jVersion}" + distOnly "org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}" +} + allprojects { apply plugin: 'java' apply plugin: "eclipse" @@ -94,6 +104,31 @@ allprojects { .exclude('**/org/apache/eventmesh/connector/openfunction/client/CallbackServiceGrpc**') .exclude('**/org/apache/eventmesh/connector/jdbc/antlr**') + configurations { + runtimeClasspath { + // Log4j API implementations + exclude group: 'org.apache.logging.log4j', module: 'log4j-core' + exclude group: 'org.apache.logging.log4j', module: 'log4j-to-jul' + exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j' + // SLF4J implementations + exclude group: 'ch.qos.logback', module: 'logback-classic' + exclude group: 'org.slf4j', module: 'slf4j-jdk14' + exclude group: 'org.slf4j', module: 'slf4j-log4j12' + exclude group: 'org.slf4j', module: 'slf4j-nop' + exclude group: 'org.slf4j', module: 'slf4j-reload4j' + exclude group: 'org.slf4j', module: 'slf4j-simple' + exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl' + exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j2-impl' + // JUL implementations + exclude group: 'org.apache.logging.log4j', module: 'log4j-jul' + exclude group: 'org.slf4j', module: 'jul-to-slf4j' + // Log4j 1.x and replacements + exclude group: 'log4j', module: 'log4j' + exclude group: 'org.slf4j', module: 'log4j-over-slf4j' + exclude group: 'org.apache.logging.log4j', module: 'log4j-1.2-api' + } + } + dependencies { repositories { mavenLocal() @@ -139,6 +174,60 @@ allprojects { } } +tasks.register('dist') { + group = JavaBasePlugin.BUILD_TASK_NAME + description "Creates the distribution directory" + def includedProjects = + ["eventmesh-common", + "eventmesh-meta:eventmesh-meta-api", + "eventmesh-metrics-plugin:eventmesh-metrics-api", + "eventmesh-protocol-plugin:eventmesh-protocol-api", + "eventmesh-retry:eventmesh-retry-api", + "eventmesh-runtime", + "eventmesh-security-plugin:eventmesh-security-api", + "eventmesh-spi", + "eventmesh-starter", + "eventmesh-storage-plugin:eventmesh-storage-api", + "eventmesh-trace-plugin:eventmesh-trace-api", + "eventmesh-webhook:eventmesh-webhook-api", + "eventmesh-webhook:eventmesh-webhook-admin", + "eventmesh-webhook:eventmesh-webhook-receive"] + includedProjects.each { dependsOn("${it}:jar") } + outputs.dirs('dist/apps', 'dist/bin', 'dist/conf', 'dist/lib', 'dist/licenses') + doLast { + includedProjects.each { + def project = findProject(it) + copy { + from project.jar.archivePath + into 'dist/apps' + } + copy { + from project.file('bin') + into 'dist/bin' + } + copy { + from project.file('conf') + from project.sourceSets.main.resources.srcDirs + into 'dist/conf' + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + exclude 'META-INF' + } + copy { + from project.configurations.runtimeClasspath + into 'dist/lib' + } + } + copy { + from configurations.distOnly + into 'dist/lib' + } + copy { + from 'tools/third-party-licenses' + into 'dist' + } + } +} + task tar(type: Tar) { archiveBaseName.set(project.name) archiveVersion.set(project.version.toString()) @@ -160,56 +249,60 @@ task zip(type: Zip) { } } -task installPlugin() { - if (!new File("${rootDir}/dist").exists()) { - return - } - String[] libJars = java.util.Optional.ofNullable(new File("${rootDir}/dist/lib").list()).orElseGet(() -> new String[0]) - getAllprojects().forEach(subProject -> { - var file = new File("${subProject.projectDir}/gradle.properties") - if (!file.exists()) { - return - } - var properties = new Properties() - properties.load(new FileInputStream(file)) - var pluginType = properties.getProperty("pluginType") - var pluginName = properties.getProperty("pluginName") - if (pluginType == null || pluginName == null) { +tasks.register('installPlugin') { + doLast { + if (!new File("${rootDir}/dist").exists()) { return } - var pluginFile = new File("${rootDir}/dist/plugin/${pluginType}/${pluginName}") - if (pluginFile.exists()) { - return - } - pluginFile.mkdirs() - println String.format( - "install plugin, pluginType: %s, pluginInstanceName: %s, module: %s", pluginType, pluginName, subProject.getName() - ) - - copy { - into "${rootDir}/dist/plugin/${pluginType}/${pluginName}" - from "${subProject.getProjectDir()}/dist/apps" - } - copy { - into "${rootDir}/dist/plugin/${pluginType}/${pluginName}" - from "${subProject.getProjectDir()}/dist/lib/" - exclude(libJars) - } - copy { - into "${rootDir}/dist/conf" - from "${subProject.getProjectDir()}/dist/conf" - exclude 'META-INF' - } - }) + String[] libJars = java.util.Optional.ofNullable(new File("${rootDir}/dist/lib").list()).orElseGet(() -> new String[0]) + getAllprojects().forEach(subProject -> { + var file = new File("${subProject.projectDir}/gradle.properties") + if (!file.exists()) { + return + } + var properties = new Properties() + properties.load(new FileInputStream(file)) + var pluginType = properties.getProperty("pluginType") + var pluginName = properties.getProperty("pluginName") + if (pluginType == null || pluginName == null) { + return + } + var pluginFile = new File("${rootDir}/dist/plugin/${pluginType}/${pluginName}") + if (pluginFile.exists()) { + return + } + pluginFile.mkdirs() + println String.format( + "install plugin, pluginType: %s, pluginInstanceName: %s, module: %s", pluginType, pluginName, subProject.getName() + ) + copy { + from subProject.jar.archivePath + into "${rootDir}/dist/plugin/${pluginType}/${pluginName}" + } + copy { + from subProject.configurations.runtimeClasspath + into "${rootDir}/dist/plugin/${pluginType}/${pluginName}" + exclude(libJars) + } + copy { + from subProject.file('conf') + from subProject.sourceSets.main.resources.srcDirs + into "${rootDir}/dist/conf" + exclude 'META-INF' + } + }) + } } task printProjects() { - getAllprojects().forEach(subProject -> { - if ("EventMesh".equals(subProject.getName())) { - return - } - println String.format("%s-%s.jar", subProject.getName(), subProject.getVersion()) - }) + doLast { + getAllprojects().forEach(subProject -> { + if ("EventMesh".equals(subProject.getName())) { + return + } + println String.format("%s-%s.jar", subProject.getName(), subProject.getVersion()) + }) + } } subprojects { @@ -303,77 +396,6 @@ subprojects { } } - task dist(dependsOn: ['jar']) { - doFirst { - new File("${projectDir}/dist/bin").mkdirs() - new File("${projectDir}/dist/apps").mkdirs() - new File("${projectDir}/dist/conf").mkdirs() - new File("${projectDir}/dist/lib").mkdirs() - new File("${projectDir}/dist/licenses").mkdirs() - } - Set rootProject = ["eventmesh-common", - "eventmesh-storage-api", - "eventmesh-metrics-api", - "eventmesh-meta-api", - "eventmesh-trace-api", - "eventmesh-retry-api", - "eventmesh-runtime", - "eventmesh-security-api", - "eventmesh-protocol-api", - "eventmesh-starter", - "eventmesh-spi", - "eventmesh-webhook-api", - "eventmesh-webhook-admin", - "eventmesh-webhook-receive"] - doLast { - copy { - into("${projectDir}/dist/apps") - from project.jar.getArchivePath() - } - copy { - into("${projectDir}/dist/lib") - from project.configurations.runtimeClasspath - } - copy { - into("${projectDir}/dist/bin") - from 'bin' - } - copy { - into("${projectDir}/dist/conf") - from 'conf', sourceSets.main.resources.srcDirs - setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE) - exclude 'META-INF' - } - if (rootProject.contains(project.name)) { - new File("${rootDir}/dist/apps").mkdirs() - new File("${rootDir}/dist/lib").mkdirs() - new File("${rootDir}/dist/bin").mkdirs() - new File("${rootDir}/dist/conf").mkdirs() - copy { - into("${rootDir}/dist/apps") - from "${projectDir}/dist/apps" - } - copy { - into "${rootDir}/dist/lib" - from "${projectDir}/dist/lib" - exclude "eventmesh-*" - } - copy { - into "${rootDir}/dist/bin" - from "${projectDir}/dist/bin" - } - copy { - into "${rootDir}/dist/conf" - from "${projectDir}/dist/conf" - } - } - copy { - into "${rootDir}/dist" - from "${rootDir}/tools/third-party-licenses" - } - } - } - javadoc { source = sourceSets.main.java destinationDir = reporting.file("javadoc") @@ -473,8 +495,14 @@ subprojects { } def grpcVersion = '1.43.2' + def springBootVersion = '2.7.10' + def rocketmq_version = '4.9.5' dependencyManagement { + imports { + mavenBom "org.apache.logging.log4j:log4j-bom:${log4jVersion}" + mavenBom 'org.springframework:spring-framework-bom:5.3.26' + } dependencies { dependency "org.apache.commons:commons-lang3:3.6" dependency "org.apache.commons:commons-collections4:4.1" @@ -487,9 +515,6 @@ subprojects { dependency "com.google.guava:guava:31.0.1-jre" dependency "org.slf4j:slf4j-api:1.7.30" - dependency "org.apache.logging.log4j:log4j-api:2.17.1" - dependency "org.apache.logging.log4j:log4j-core:2.17.1" - dependency "org.apache.logging.log4j:log4j-slf4j-impl:2.17.1" dependency "com.lmax:disruptor:3.4.2" @@ -527,7 +552,11 @@ subprojects { dependency "com.mebigfatguy.fb-contrib:fb-contrib:7.6.0" dependency "com.jayway.jsonpath:json-path:2.7.0" - dependency "org.springframework.boot:spring-boot-starter-web:2.7.10" + dependency("org.springframework.boot:spring-boot-starter:${springBootVersion}") { + exclude group: 'org.springframework.boot', name: 'spring-boot-starter-logging' + } + dependency "org.springframework.boot:spring-boot-starter-validation:${springBootVersion}" + dependency "org.springframework.boot:spring-boot-starter-web:${springBootVersion}" dependency "io.openmessaging:registry-server:0.0.1" dependency "org.junit.jupiter:junit-jupiter:5.6.0" @@ -572,6 +601,23 @@ subprojects { dependency "software.amazon.awssdk:s3:2.20.29" dependency "com.github.rholder:guava-retrying:2.0.0" + dependency "org.apache.rocketmq:rocketmq-acl:$rocketmq_version" + dependency("org.apache.rocketmq:rocketmq-broker:$rocketmq_version") { + exclude group: 'ch.qos.logback', name: 'logback-classic' + } + dependency "org.apache.rocketmq:rocketmq-client:$rocketmq_version" + dependency "org.apache.rocketmq:rocketmq-common:$rocketmq_version" + dependency "org.apache.rocketmq:rocketmq-filter:$rocketmq_version" + dependency "org.apache.rocketmq:rocketmq-logging:$rocketmq_version" + dependency("org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version") { + exclude group: 'ch.qos.logback', name: 'logback-classic' + } + dependency "org.apache.rocketmq:rocketmq-remoting:$rocketmq_version" + dependency "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version" + dependency "org.apache.rocketmq:rocketmq-store:$rocketmq_version" + dependency("org.apache.rocketmq:rocketmq-tools:$rocketmq_version") { + exclude group: 'ch.qos.logback', name: 'logback-classic' + } } } } diff --git a/eventmesh-common/build.gradle b/eventmesh-common/build.gradle index 67cb886dec..4c5c49f883 100644 --- a/eventmesh-common/build.gradle +++ b/eventmesh-common/build.gradle @@ -30,9 +30,9 @@ dependencies { api "io.cloudevents:cloudevents-core" api "io.cloudevents:cloudevents-json-jackson" - implementation "org.apache.logging.log4j:log4j-api" - implementation "org.apache.logging.log4j:log4j-core" - implementation "org.apache.logging.log4j:log4j-slf4j-impl" + // Logging backend used in tests + testRuntimeOnly "org.apache.logging.log4j:log4j-core" + testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j-impl" implementation 'com.github.seancfoley:ipaddress' diff --git a/eventmesh-connectors/eventmesh-connector-pravega/build.gradle b/eventmesh-connectors/eventmesh-connector-pravega/build.gradle index 0365334311..24876409f1 100644 --- a/eventmesh-connectors/eventmesh-connector-pravega/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-pravega/build.gradle @@ -15,11 +15,6 @@ * limitations under the License. */ -configurations { - implementation.exclude group: 'ch.qos.logback', module: 'logback-classic' - implementation.exclude group: 'log4j', module: 'log4j' -} - dependencies { api project(":eventmesh-openconnect:eventmesh-openconnect-java") implementation project(":eventmesh-common") diff --git a/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle b/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle index 4a532ec2b8..93b0cbcc48 100644 --- a/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle @@ -15,12 +15,13 @@ * limitations under the License. */ -List pulsar = [ - "org.apache.pulsar:pulsar-client:$pulsar_version" -] dependencies { implementation project(":eventmesh-openconnect:eventmesh-openconnect-java") - implementation pulsar + implementation("org.apache.pulsar:pulsar-client:$pulsar_version") { + exclude group: 'org.apache.logging.log4j', module: 'log4j-core' + exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl' + } + compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' -} \ No newline at end of file +} diff --git a/eventmesh-connectors/eventmesh-connector-rabbitmq/build.gradle b/eventmesh-connectors/eventmesh-connector-rabbitmq/build.gradle index b4edbe1f8a..f96d81bf6d 100644 --- a/eventmesh-connectors/eventmesh-connector-rabbitmq/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-rabbitmq/build.gradle @@ -16,11 +16,6 @@ */ -configurations { - implementation.exclude group: 'ch.qos.logback', module: 'logback-classic' - implementation.exclude group: 'log4j', module: 'log4j' -} - dependencies { api project(":eventmesh-openconnect:eventmesh-openconnect-java") implementation project(":eventmesh-common") diff --git a/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle b/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle index 769e9c6cf8..a91fefbb5a 100644 --- a/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle @@ -16,19 +16,18 @@ */ List rocketmq = [ - "org.apache.rocketmq:rocketmq-client:$rocketmq_version", - "org.apache.rocketmq:rocketmq-broker:$rocketmq_version", - "org.apache.rocketmq:rocketmq-common:$rocketmq_version", - "org.apache.rocketmq:rocketmq-store:$rocketmq_version", - "org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version", - "org.apache.rocketmq:rocketmq-tools:$rocketmq_version", - "org.apache.rocketmq:rocketmq-remoting:$rocketmq_version", - "org.apache.rocketmq:rocketmq-logging:$rocketmq_version", - "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", - "org.apache.rocketmq:rocketmq-filter:$rocketmq_version", - "org.apache.rocketmq:rocketmq-acl:$rocketmq_version", - "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", - + "org.apache.rocketmq:rocketmq-client", + "org.apache.rocketmq:rocketmq-broker", + "org.apache.rocketmq:rocketmq-common", + "org.apache.rocketmq:rocketmq-store", + "org.apache.rocketmq:rocketmq-namesrv", + "org.apache.rocketmq:rocketmq-tools", + "org.apache.rocketmq:rocketmq-remoting", + "org.apache.rocketmq:rocketmq-logging", + "org.apache.rocketmq:rocketmq-srvutil", + "org.apache.rocketmq:rocketmq-filter", + "org.apache.rocketmq:rocketmq-acl", + "org.apache.rocketmq:rocketmq-srvutil" ] dependencies { @@ -39,4 +38,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testImplementation "org.mockito:mockito-core" testImplementation "org.mockito:mockito-junit-jupiter" -} \ No newline at end of file +} diff --git a/eventmesh-connectors/eventmesh-connector-rocketmq/gradle.properties b/eventmesh-connectors/eventmesh-connector-rocketmq/gradle.properties index 8545888587..8b4c405eb4 100644 --- a/eventmesh-connectors/eventmesh-connector-rocketmq/gradle.properties +++ b/eventmesh-connectors/eventmesh-connector-rocketmq/gradle.properties @@ -14,6 +14,5 @@ # See the License for the specific language governing permissions and # limitations under the License. # -rocketmq_version=4.9.5 pluginType=connector -pluginName=rocketmq \ No newline at end of file +pluginName=rocketmq diff --git a/eventmesh-connectors/eventmesh-connector-slack/build.gradle b/eventmesh-connectors/eventmesh-connector-slack/build.gradle index ad66b78b96..12d30557b8 100644 --- a/eventmesh-connectors/eventmesh-connector-slack/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-slack/build.gradle @@ -15,12 +15,6 @@ * limitations under the License. */ -configurations { - implementation.exclude group: 'ch.qos.logback', module: 'logback-classic' - implementation.exclude group: 'log4j', module: 'log4j' - testImplementation.exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j' -} - dependencies { implementation project(":eventmesh-common") implementation project(":eventmesh-sdks:eventmesh-sdk-java") @@ -34,4 +28,4 @@ dependencies { testImplementation "org.mockito:mockito-core" testImplementation "org.mockito:mockito-junit-jupiter" -} \ No newline at end of file +} diff --git a/eventmesh-connectors/eventmesh-connector-spring/build.gradle b/eventmesh-connectors/eventmesh-connector-spring/build.gradle index b6f63cbfdd..3f50a0f964 100644 --- a/eventmesh-connectors/eventmesh-connector-spring/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-spring/build.gradle @@ -15,22 +15,16 @@ * limitations under the License. */ -configurations { - implementation.exclude group: 'ch.qos.logback', module: 'logback-classic' - implementation.exclude group: 'log4j', module: 'log4j' - testImplementation.exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j' -} - dependencies { api project(":eventmesh-openconnect:eventmesh-openconnect-java") implementation project(":eventmesh-common") implementation project(":eventmesh-sdks:eventmesh-sdk-java") - implementation "org.springframework.boot:spring-boot-starter:$spring_boot_version" - implementation "org.springframework.boot:spring-boot-starter-validation:$spring_boot_version" - implementation "org.springframework:spring-messaging:$spring_version" + implementation "org.springframework.boot:spring-boot-starter-validation" + implementation "org.springframework:spring-messaging" + compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testImplementation "org.mockito:mockito-core" testImplementation "org.mockito:mockito-junit-jupiter" -} \ No newline at end of file +} diff --git a/eventmesh-connectors/eventmesh-connector-wechat/build.gradle b/eventmesh-connectors/eventmesh-connector-wechat/build.gradle index c791524485..f3f63249b0 100644 --- a/eventmesh-connectors/eventmesh-connector-wechat/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-wechat/build.gradle @@ -15,12 +15,6 @@ * limitations under the License. */ -configurations { - implementation.exclude group: 'ch.qos.logback', module: 'logback-classic' - implementation.exclude group: 'log4j', module: 'log4j' - testImplementation.exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j' -} - dependencies { implementation project(":eventmesh-common") implementation project(":eventmesh-sdks:eventmesh-sdk-java") @@ -39,4 +33,4 @@ dependencies { testImplementation "org.mockito:mockito-core" testImplementation "org.mockito:mockito-junit-jupiter" testImplementation "org.mockito:mockito-inline" -} \ No newline at end of file +} diff --git a/eventmesh-connectors/eventmesh-connector-wecom/build.gradle b/eventmesh-connectors/eventmesh-connector-wecom/build.gradle index 746a4f3722..62a6fcefb0 100644 --- a/eventmesh-connectors/eventmesh-connector-wecom/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-wecom/build.gradle @@ -15,12 +15,6 @@ * limitations under the License. */ -configurations { - implementation.exclude group: 'ch.qos.logback', module: 'logback-classic' - implementation.exclude group: 'log4j', module: 'log4j' - testImplementation.exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j' -} - dependencies { implementation project(":eventmesh-common") implementation project(":eventmesh-sdks:eventmesh-sdk-java") @@ -36,4 +30,4 @@ dependencies { testImplementation "org.mockito:mockito-core" testImplementation "org.mockito:mockito-junit-jupiter" testImplementation "org.mockito:mockito-inline" -} \ No newline at end of file +} diff --git a/eventmesh-examples/build.gradle b/eventmesh-examples/build.gradle index 9ef70836bd..212b567799 100644 --- a/eventmesh-examples/build.gradle +++ b/eventmesh-examples/build.gradle @@ -17,15 +17,14 @@ def grpcVersion = '1.43.2' -configurations { - implementation.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' -} - dependencies { implementation project(":eventmesh-sdks:eventmesh-sdk-java") implementation project(":eventmesh-common") implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") implementation project(":eventmesh-connectors:eventmesh-connector-spring") + implementation('org.springframework.boot:spring-boot-starter') { + exclude module: 'spring-boot-starter-logging' + } implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'io.netty:netty-all' implementation "io.cloudevents:cloudevents-core" diff --git a/eventmesh-openconnect/eventmesh-openconnect-java/build.gradle b/eventmesh-openconnect/eventmesh-openconnect-java/build.gradle index 1ab0ca5577..47b1e1548f 100644 --- a/eventmesh-openconnect/eventmesh-openconnect-java/build.gradle +++ b/eventmesh-openconnect/eventmesh-openconnect-java/build.gradle @@ -17,9 +17,6 @@ dependencies { api "org.slf4j:slf4j-api" - implementation "org.apache.logging.log4j:log4j-api" - implementation "org.apache.logging.log4j:log4j-core" - implementation "org.apache.logging.log4j:log4j-slf4j-impl" implementation "com.fasterxml.jackson.core:jackson-databind" implementation "com.fasterxml.jackson.core:jackson-core" @@ -32,4 +29,7 @@ dependencies { compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' -} \ No newline at end of file + + testRuntimeOnly "org.apache.logging.log4j:log4j-core" + testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j-impl" +} diff --git a/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/build.gradle b/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/build.gradle index 07db9fff9e..dceb230ff4 100644 --- a/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/build.gradle +++ b/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/build.gradle @@ -17,9 +17,6 @@ dependencies { api "org.slf4j:slf4j-api" - implementation "org.apache.logging.log4j:log4j-api" - implementation "org.apache.logging.log4j:log4j-core" - implementation "org.apache.logging.log4j:log4j-slf4j-impl" implementation "com.fasterxml.jackson.core:jackson-databind" implementation "com.fasterxml.jackson.core:jackson-core" @@ -30,4 +27,7 @@ dependencies { compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' -} \ No newline at end of file + + testRuntimeOnly "org.apache.logging.log4j:log4j-core" + testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j-impl" +} diff --git a/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/build.gradle b/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/build.gradle index 692ef3d329..da09492a4a 100644 --- a/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/build.gradle +++ b/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/build.gradle @@ -18,9 +18,6 @@ dependencies { api project(":eventmesh-spi") api "org.slf4j:slf4j-api" - implementation "org.apache.logging.log4j:log4j-api" - implementation "org.apache.logging.log4j:log4j-core" - implementation "org.apache.logging.log4j:log4j-slf4j-impl" compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' @@ -29,4 +26,7 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' testImplementation "org.mockito:mockito-core" + + testRuntimeOnly "org.apache.logging.log4j:log4j-core" + testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j-impl" } diff --git a/eventmesh-storage-plugin/eventmesh-storage-kafka/build.gradle b/eventmesh-storage-plugin/eventmesh-storage-kafka/build.gradle index d776cc46a7..1a467ed8c3 100644 --- a/eventmesh-storage-plugin/eventmesh-storage-kafka/build.gradle +++ b/eventmesh-storage-plugin/eventmesh-storage-kafka/build.gradle @@ -14,10 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -configurations { - implementation.exclude group: 'ch.qos.logback', module: 'logback-classic' - implementation.exclude group: 'log4j', module: 'log4j' -} dependencies { implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") diff --git a/eventmesh-storage-plugin/eventmesh-storage-pulsar/build.gradle b/eventmesh-storage-plugin/eventmesh-storage-pulsar/build.gradle index 77922e241a..bceee8426e 100644 --- a/eventmesh-storage-plugin/eventmesh-storage-pulsar/build.gradle +++ b/eventmesh-storage-plugin/eventmesh-storage-pulsar/build.gradle @@ -15,11 +15,6 @@ * limitations under the License. */ -configurations { - implementation.exclude group: 'ch.qos.logback', module: 'logback-classic' - implementation.exclude group: 'log4j', module: 'log4j' -} - dependencies { implementation project(":eventmesh-common") implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") diff --git a/eventmesh-storage-plugin/eventmesh-storage-rabbitmq/build.gradle b/eventmesh-storage-plugin/eventmesh-storage-rabbitmq/build.gradle index 69b4f75bac..2e8ddac448 100644 --- a/eventmesh-storage-plugin/eventmesh-storage-rabbitmq/build.gradle +++ b/eventmesh-storage-plugin/eventmesh-storage-rabbitmq/build.gradle @@ -15,11 +15,6 @@ * limitations under the License. */ -configurations { - implementation.exclude group: 'ch.qos.logback', module: 'logback-classic' - implementation.exclude group: 'log4j', module: 'log4j' -} - dependencies { implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") implementation project(":eventmesh-common") diff --git a/eventmesh-storage-plugin/eventmesh-storage-redis/build.gradle b/eventmesh-storage-plugin/eventmesh-storage-redis/build.gradle index 5a103cb8e3..bec0767638 100644 --- a/eventmesh-storage-plugin/eventmesh-storage-redis/build.gradle +++ b/eventmesh-storage-plugin/eventmesh-storage-redis/build.gradle @@ -15,10 +15,6 @@ * limitations under the License. */ -configurations { - implementation.exclude group: 'org.slf4j', module: 'slf4j-simple' -} - dependencies { implementation project(":eventmesh-common") implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") diff --git a/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle b/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle index be30240097..9453845381 100644 --- a/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle +++ b/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle @@ -15,25 +15,19 @@ * limitations under the License. */ -configurations { - implementation.exclude group: 'ch.qos.logback', module: 'logback-classic' - implementation.exclude group: 'log4j', module: 'log4j' -} - List rocketmq = [ - "org.apache.rocketmq:rocketmq-client:$rocketmq_version", - "org.apache.rocketmq:rocketmq-broker:$rocketmq_version", - "org.apache.rocketmq:rocketmq-common:$rocketmq_version", - "org.apache.rocketmq:rocketmq-store:$rocketmq_version", - "org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version", - "org.apache.rocketmq:rocketmq-tools:$rocketmq_version", - "org.apache.rocketmq:rocketmq-remoting:$rocketmq_version", - "org.apache.rocketmq:rocketmq-logging:$rocketmq_version", - "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", - "org.apache.rocketmq:rocketmq-filter:$rocketmq_version", - "org.apache.rocketmq:rocketmq-acl:$rocketmq_version", - "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", - + "org.apache.rocketmq:rocketmq-client", + "org.apache.rocketmq:rocketmq-broker", + "org.apache.rocketmq:rocketmq-common", + "org.apache.rocketmq:rocketmq-store", + "org.apache.rocketmq:rocketmq-namesrv", + "org.apache.rocketmq:rocketmq-tools", + "org.apache.rocketmq:rocketmq-remoting", + "org.apache.rocketmq:rocketmq-logging", + "org.apache.rocketmq:rocketmq-srvutil", + "org.apache.rocketmq:rocketmq-filter", + "org.apache.rocketmq:rocketmq-acl", + "org.apache.rocketmq:rocketmq-srvutil" ] dependencies { diff --git a/eventmesh-storage-plugin/eventmesh-storage-rocketmq/gradle.properties b/eventmesh-storage-plugin/eventmesh-storage-rocketmq/gradle.properties index 9a01616c0d..3e423fb0c6 100644 --- a/eventmesh-storage-plugin/eventmesh-storage-rocketmq/gradle.properties +++ b/eventmesh-storage-plugin/eventmesh-storage-rocketmq/gradle.properties @@ -13,6 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. # -rocketmq_version=4.9.5 pluginType=storage pluginName=rocketmq From 6b0c122eefd2743eb5300a3945956528836252b5 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Thu, 4 Jan 2024 22:57:47 +0100 Subject: [PATCH 02/21] Fix licenses --- .gitignore | 4 +- build.gradle | 6 +- tools/dependency-check/check-dependencies.sh | 8 +-- tools/dependency-check/known-dependencies.txt | 59 +++++++++---------- ...g4j-to-slf4j.txt => LICENSE-log4j-jul.txt} | 0 .../licenses/java/LICENSE-logback-core.txt | 14 ----- .../licenses/java/LICENSE-slf4j-simple.txt | 21 ------- 7 files changed, 39 insertions(+), 73 deletions(-) mode change 100644 => 100755 tools/dependency-check/check-dependencies.sh rename tools/third-party-licenses/licenses/java/{LICENSE-log4j-to-slf4j.txt => LICENSE-log4j-jul.txt} (100%) delete mode 100644 tools/third-party-licenses/licenses/java/LICENSE-logback-core.txt delete mode 100644 tools/third-party-licenses/licenses/java/LICENSE-slf4j-simple.txt diff --git a/.gitignore b/.gitignore index 388d5085ba..55bf61f954 100644 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,7 @@ node_modules h2/db.mv.db # license check tmp file -all-dependencies.txt +/tools/dependency-check/all-dependencies.txt self-modules.txt third-party-dependencies.txt @@ -51,4 +51,4 @@ bld/ **/org/apache/eventmesh/connector/jdbc/antlr4/autogeneration/* #rust -Cargo.lock \ No newline at end of file +Cargo.lock diff --git a/build.gradle b/build.gradle index 53d3dcf5c2..4dbc179f27 100644 --- a/build.gradle +++ b/build.gradle @@ -215,6 +215,7 @@ tasks.register('dist') { copy { from project.configurations.runtimeClasspath into 'dist/lib' + exclude 'eventmesh*' } } copy { @@ -587,7 +588,10 @@ subprojects { dependency "com.alibaba.nacos:nacos-client:2.2.1" - dependency 'org.apache.zookeeper:zookeeper:3.7.1' + dependency('org.apache.zookeeper:zookeeper:3.7.1') { + exclude group: 'ch.qos.logback', name: 'logback-core' + exclude group: 'ch.qos.logback', name: 'logback-classic' + } dependency 'org.apache.curator:curator-client:5.4.0' dependency 'org.apache.curator:curator-framework:5.4.0' dependency 'org.apache.curator:curator-recipes:5.4.0' diff --git a/tools/dependency-check/check-dependencies.sh b/tools/dependency-check/check-dependencies.sh old mode 100644 new mode 100755 index 5353df817e..3842323c1f --- a/tools/dependency-check/check-dependencies.sh +++ b/tools/dependency-check/check-dependencies.sh @@ -1,4 +1,4 @@ -#!/usr/bin bash +#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -34,14 +34,14 @@ self_modules_txt='tools/dependency-check/self-modules.txt' # store all third part dependencies third_party_dependencies_txt='tools/dependency-check/third-party-dependencies.txt' -mkdir $decompress_conf || true +mkdir -p $decompress_conf tar -zxf build/eventmesh*.tar.gz -C $decompress_conf ./gradlew printProjects | grep '.jar' > "$self_modules_txt" -find "$decompress_conf" -name "*.jar" -exec basename {} \; | uniq | sort > "$all_dependencies_txt" +find "$decompress_conf" -name "*.jar" -exec basename {} \; | sort | uniq > "$all_dependencies_txt" -grep -wvf "$self_modules_txt" "$all_dependencies_txt" | uniq | sort > "$third_party_dependencies_txt" +grep -wvf "$self_modules_txt" "$all_dependencies_txt" | sort | uniq > "$third_party_dependencies_txt" # If the check is success it will return 0 sort "$known_third_party_dependencies_txt" | diff - "$third_party_dependencies_txt" diff --git a/tools/dependency-check/known-dependencies.txt b/tools/dependency-check/known-dependencies.txt index f25fa55a0c..3158591f51 100644 --- a/tools/dependency-check/known-dependencies.txt +++ b/tools/dependency-check/known-dependencies.txt @@ -1,13 +1,12 @@ -ST4-4.3.4.jar accessors-smart-2.4.7.jar alibabacloud-gateway-spi-0.0.1.jar amqp-client-5.16.0.jar animal-sniffer-annotations-1.19.jar annotations-2.20.29.jar annotations-4.1.1.4.jar -antlr-runtime-3.5.3.jar antlr4-4.13.0.jar antlr4-runtime-4.13.0.jar +antlr-runtime-3.5.3.jar aopalliance-1.0.jar apache-client-2.20.29.jar arns-2.20.29.jar @@ -69,8 +68,8 @@ dingtalk-2.0.61.jar disruptor-3.4.2.jar dledger-0.3.1.2.jar dom4j-2.0.3.jar -endpoint-util-0.0.7.jar endpoints-spi-2.20.29.jar +endpoint-util-0.0.7.jar error_prone_annotations-2.9.0.jar eventstream-1.0.1.jar failureaccess-1.0.1.jar @@ -93,10 +92,10 @@ gson-2.8.2.jar guava-31.0.1-jre.jar guava-retrying-2.0.0.jar guice-4.2.2.jar -hibernate-validator-6.2.0.Final.jar -http-client-spi-2.20.29.jar +hibernate-validator-6.2.5.Final.jar httpasyncclient-4.1.3.jar httpclient-4.5.13.jar +http-client-spi-2.20.29.jar httpcore-4.4.13.jar httpcore-nio-4.4.6.jar httpmime-4.5.13.jar @@ -139,15 +138,12 @@ json-path-2.7.0.jar json-smart-2.4.7.jar json-utils-2.20.29.jar jsr305-3.0.2.jar -jul-to-slf4j-1.7.33.jar kafka-clients-3.0.0.jar listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar -log4j-api-2.17.1.jar -log4j-core-2.17.1.jar -log4j-slf4j-impl-2.17.1.jar -log4j-to-slf4j-2.17.1.jar -logback-classic-1.2.10.jar -logback-core-1.2.10.jar +log4j-api-2.22.1.jar +log4j-core-2.22.1.jar +log4j-jul-2.22.1.jar +log4j-slf4j-impl-2.22.1.jar lz4-java-1.7.1.jar lz4-java-1.8.0.jar metrics-annotation-4.1.0.jar @@ -173,12 +169,12 @@ netty-codec-4.1.86.Final.jar netty-codec-dns-4.1.100.Final.jar netty-codec-dns-4.1.79.Final.jar netty-codec-haproxy-4.1.79.Final.jar -netty-codec-http-4.1.100.Final.jar -netty-codec-http-4.1.79.Final.jar -netty-codec-http-4.1.86.Final.jar netty-codec-http2-4.1.100.Final.jar netty-codec-http2-4.1.79.Final.jar netty-codec-http2-4.1.86.Final.jar +netty-codec-http-4.1.100.Final.jar +netty-codec-http-4.1.79.Final.jar +netty-codec-http-4.1.86.Final.jar netty-codec-memcache-4.1.79.Final.jar netty-codec-mqtt-4.1.79.Final.jar netty-codec-redis-4.1.79.Final.jar @@ -215,9 +211,9 @@ netty-transport-4.1.86.Final.jar netty-transport-classes-epoll-4.1.79.Final.jar netty-transport-classes-epoll-4.1.86.Final.jar netty-transport-classes-kqueue-4.1.79.Final.jar +netty-transport-native-epoll-4.1.79.Final.jar netty-transport-native-epoll-4.1.79.Final-linux-aarch_64.jar netty-transport-native-epoll-4.1.79.Final-linux-x86_64.jar -netty-transport-native-epoll-4.1.79.Final.jar netty-transport-native-kqueue-4.1.79.Final-osx-aarch_64.jar netty-transport-native-kqueue-4.1.79.Final-osx-x86_64.jar netty-transport-native-unix-common-4.1.100.Final.jar @@ -261,7 +257,6 @@ pravega-shared-controller-api-0.11.0.jar pravega-shared-protocol-0.11.0.jar pravega-shared-security-0.11.0.jar profiles-2.20.29.jar -proto-google-common-protos-2.0.1.jar protobuf-java-3.19.2.jar protobuf-java-3.21.5.jar protobuf-java-3.21.9.jar @@ -270,6 +265,7 @@ protobuf-java-util-3.17.2.jar protobuf-java-util-3.21.5.jar protobuf-java-util-3.5.1.jar protocol-core-2.20.29.jar +proto-google-common-protos-2.0.1.jar pull-parser-2.jar pulsar-client-2.10.1.jar pulsar-client-2.11.1.jar @@ -303,27 +299,28 @@ slack-api-client-1.1.6.jar slack-api-model-1.1.6.jar slack-app-backend-1.1.6.jar slf4j-api-1.7.30.jar +slf4j-api-1.7.36.jar snakeyaml-1.30.jar snappy-java-1.1.8.1.jar -spring-aop-5.3.15.jar -spring-beans-5.3.20.jar -spring-boot-2.5.9.jar -spring-boot-autoconfigure-2.5.9.jar -spring-boot-starter-2.5.9.jar -spring-boot-starter-logging-2.5.9.jar -spring-boot-starter-validation-2.5.9.jar -spring-context-5.3.15.jar -spring-core-5.3.20.jar -spring-expression-5.3.15.jar -spring-jcl-5.3.20.jar -spring-messaging-5.3.20.jar +spring-aop-5.3.26.jar +spring-beans-5.3.26.jar +spring-boot-2.7.10.jar +spring-boot-autoconfigure-2.7.10.jar +spring-boot-starter-2.7.10.jar +spring-boot-starter-validation-2.7.10.jar +spring-context-5.3.26.jar +spring-core-5.3.26.jar +spring-expression-5.3.26.jar +spring-jcl-5.3.26.jar +spring-messaging-5.3.26.jar +ST4-4.3.4.jar stax-api-1.0-2.jar tea-1.2.7.jar tea-openapi-0.2.8.jar tea-util-0.2.21.jar tea-xml-0.1.5.jar third-party-jackson-core-2.20.29.jar -tomcat-embed-el-9.0.56.jar +tomcat-embed-el-9.0.73.jar utils-2.20.29.jar validation-api-1.1.0.Final.jar vertx-auth-common-4.4.6.jar @@ -340,4 +337,4 @@ zipkin-sender-okhttp3-2.16.3.jar zookeeper-3.7.1.jar zookeeper-jute-3.7.1.jar zstd-jni-1.5.0-2.jar -zstd-jni-1.5.2-2.jar \ No newline at end of file +zstd-jni-1.5.2-2.jar diff --git a/tools/third-party-licenses/licenses/java/LICENSE-log4j-to-slf4j.txt b/tools/third-party-licenses/licenses/java/LICENSE-log4j-jul.txt similarity index 100% rename from tools/third-party-licenses/licenses/java/LICENSE-log4j-to-slf4j.txt rename to tools/third-party-licenses/licenses/java/LICENSE-log4j-jul.txt diff --git a/tools/third-party-licenses/licenses/java/LICENSE-logback-core.txt b/tools/third-party-licenses/licenses/java/LICENSE-logback-core.txt deleted file mode 100644 index 8953762a3c..0000000000 --- a/tools/third-party-licenses/licenses/java/LICENSE-logback-core.txt +++ /dev/null @@ -1,14 +0,0 @@ -Logback LICENSE ---------------- - -Logback: the reliable, generic, fast and flexible logging framework. -Copyright (C) 1999-2015, QOS.ch. All rights reserved. - -This program and the accompanying materials are dual-licensed under -either the terms of the Eclipse Public License v1.0 as published by -the Eclipse Foundation - - or (per the licensee's choosing) - -under the terms of the GNU Lesser General Public License version 2.1 -as published by the Free Software Foundation. \ No newline at end of file diff --git a/tools/third-party-licenses/licenses/java/LICENSE-slf4j-simple.txt b/tools/third-party-licenses/licenses/java/LICENSE-slf4j-simple.txt deleted file mode 100644 index 744377c437..0000000000 --- a/tools/third-party-licenses/licenses/java/LICENSE-slf4j-simple.txt +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2004-2017 QOS.ch -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From f237570a2a64557e8decbbbb5b3b1948438d5350 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Fri, 5 Apr 2024 23:12:57 +0200 Subject: [PATCH 03/21] Fix Logback exclusions --- .../eventmesh-connector-rocketmq/build.gradle | 31 +++++++++++-------- .../gradle.properties | 3 +- .../eventmesh-meta-zookeeper/build.gradle | 5 ++- .../eventmesh-retry-rocketmq/build.gradle | 5 +++ .../eventmesh-storage-rocketmq/build.gradle | 29 ++++++++++------- .../gradle.properties | 1 + 6 files changed, 47 insertions(+), 27 deletions(-) diff --git a/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle b/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle index a91fefbb5a..554a10ae0f 100644 --- a/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle @@ -16,20 +16,25 @@ */ List rocketmq = [ - "org.apache.rocketmq:rocketmq-client", - "org.apache.rocketmq:rocketmq-broker", - "org.apache.rocketmq:rocketmq-common", - "org.apache.rocketmq:rocketmq-store", - "org.apache.rocketmq:rocketmq-namesrv", - "org.apache.rocketmq:rocketmq-tools", - "org.apache.rocketmq:rocketmq-remoting", - "org.apache.rocketmq:rocketmq-logging", - "org.apache.rocketmq:rocketmq-srvutil", - "org.apache.rocketmq:rocketmq-filter", - "org.apache.rocketmq:rocketmq-acl", - "org.apache.rocketmq:rocketmq-srvutil" + "org.apache.rocketmq:rocketmq-client:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-broker:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-common:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-store:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-namesrv:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-tools:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-remoting:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-logging:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-srvutil:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-filter:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-acl:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-srvutil:${rocketmq_version}" ] +configurations { + implementation.exclude group: "ch.qos.logback", module: "logback-classic" + implementation.exclude group: "ch.qos.logback", module: "logback-core" +} + dependencies { api project(":eventmesh-openconnect:eventmesh-openconnect-java") implementation project(":eventmesh-common") @@ -38,4 +43,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testImplementation "org.mockito:mockito-core" testImplementation "org.mockito:mockito-junit-jupiter" -} +} \ No newline at end of file diff --git a/eventmesh-connectors/eventmesh-connector-rocketmq/gradle.properties b/eventmesh-connectors/eventmesh-connector-rocketmq/gradle.properties index 8b4c405eb4..8545888587 100644 --- a/eventmesh-connectors/eventmesh-connector-rocketmq/gradle.properties +++ b/eventmesh-connectors/eventmesh-connector-rocketmq/gradle.properties @@ -14,5 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # +rocketmq_version=4.9.5 pluginType=connector -pluginName=rocketmq +pluginName=rocketmq \ No newline at end of file diff --git a/eventmesh-meta/eventmesh-meta-zookeeper/build.gradle b/eventmesh-meta/eventmesh-meta-zookeeper/build.gradle index 1d8c871e2b..057171cbba 100644 --- a/eventmesh-meta/eventmesh-meta-zookeeper/build.gradle +++ b/eventmesh-meta/eventmesh-meta-zookeeper/build.gradle @@ -20,7 +20,10 @@ dependencies { compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' - implementation 'org.apache.zookeeper:zookeeper' + implementation('org.apache.zookeeper:zookeeper') { + exclude group: 'ch.qos.logback', module: 'logback-core' + exclude group: 'ch.qos.logback', module: 'logback-classic' + } implementation 'org.apache.curator:curator-client' implementation 'org.apache.curator:curator-framework' implementation 'org.apache.curator:curator-recipes' diff --git a/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle b/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle index 3d33929b44..563bac1583 100644 --- a/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle +++ b/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle @@ -30,6 +30,11 @@ List rocketmq = [ "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", ] +configurations { + implementation.exclude group: "ch.qos.logback", module: "logback-classic" + implementation.exclude group: "ch.qos.logback", module: "logback-core" +} + dependencies { implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") implementation project(":eventmesh-storage-plugin:eventmesh-storage-rocketmq") diff --git a/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle b/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle index 9453845381..0c7a2435b3 100644 --- a/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle +++ b/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle @@ -16,20 +16,25 @@ */ List rocketmq = [ - "org.apache.rocketmq:rocketmq-client", - "org.apache.rocketmq:rocketmq-broker", - "org.apache.rocketmq:rocketmq-common", - "org.apache.rocketmq:rocketmq-store", - "org.apache.rocketmq:rocketmq-namesrv", - "org.apache.rocketmq:rocketmq-tools", - "org.apache.rocketmq:rocketmq-remoting", - "org.apache.rocketmq:rocketmq-logging", - "org.apache.rocketmq:rocketmq-srvutil", - "org.apache.rocketmq:rocketmq-filter", - "org.apache.rocketmq:rocketmq-acl", - "org.apache.rocketmq:rocketmq-srvutil" + "org.apache.rocketmq:rocketmq-client:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-broker:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-common:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-store:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-namesrv:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-tools:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-remoting:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-logging:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-srvutil:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-filter:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-acl:${rocketmq_version}", + "org.apache.rocketmq:rocketmq-srvutil:${rocketmq_version}" ] +configurations { + implementation.exclude group: "ch.qos.logback", module: "logback-classic" + implementation.exclude group: "ch.qos.logback", module: "logback-core" +} + dependencies { implementation project(":eventmesh-common") implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") diff --git a/eventmesh-storage-plugin/eventmesh-storage-rocketmq/gradle.properties b/eventmesh-storage-plugin/eventmesh-storage-rocketmq/gradle.properties index 3e423fb0c6..9a01616c0d 100644 --- a/eventmesh-storage-plugin/eventmesh-storage-rocketmq/gradle.properties +++ b/eventmesh-storage-plugin/eventmesh-storage-rocketmq/gradle.properties @@ -13,5 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # +rocketmq_version=4.9.5 pluginType=storage pluginName=rocketmq From 96db74849cb05b7e8fb4ff1fd07d6740d029d0d4 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Fri, 5 Apr 2024 23:48:18 +0200 Subject: [PATCH 04/21] Fix license check --- build.gradle | 1 - tools/dependency-check/known-dependencies.txt | 5 ----- 2 files changed, 6 deletions(-) diff --git a/build.gradle b/build.gradle index b565dc3481..161b68191c 100644 --- a/build.gradle +++ b/build.gradle @@ -172,7 +172,6 @@ configurations { dependencies { distOnly "org.apache.logging.log4j:log4j-core:${log4jVersion}" - distOnly "org.apache.logging.log4j:log4j-jul:${log4jVersion}" distOnly "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}" } diff --git a/tools/dependency-check/known-dependencies.txt b/tools/dependency-check/known-dependencies.txt index ccf34353e3..f07b4b9371 100644 --- a/tools/dependency-check/known-dependencies.txt +++ b/tools/dependency-check/known-dependencies.txt @@ -153,15 +153,11 @@ json-path-2.7.0.jar json-smart-2.4.7.jar json-utils-2.20.29.jar jsr305-3.0.2.jar -jul-to-slf4j-1.7.33.jar kafka-clients-3.0.0.jar listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar log4j-api-2.22.1.jar log4j-core-2.22.1.jar -log4j-slf4j-impl-2.22.1.jar log4j-slf4j2-impl-2.22.1.jar -logback-classic-1.2.10.jar -logback-core-1.2.10.jar lz4-java-1.7.1.jar lz4-java-1.8.0.jar metrics-annotation-4.1.0.jar @@ -324,7 +320,6 @@ spring-beans-5.3.20.jar spring-boot-2.5.9.jar spring-boot-autoconfigure-2.5.9.jar spring-boot-starter-2.5.9.jar -spring-boot-starter-logging-2.5.9.jar spring-boot-starter-validation-2.5.9.jar spring-context-5.3.15.jar spring-core-5.3.20.jar From cb0bf2b030481d3da018af96f9176c441fbf4a51 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Sat, 6 Apr 2024 11:16:35 +0200 Subject: [PATCH 05/21] Fix `printProjects` according to the review --- build.gradle | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 161b68191c..65a04a6f28 100644 --- a/build.gradle +++ b/build.gradle @@ -296,15 +296,13 @@ tasks.register('installPlugin') { } } -task printProjects() { - doLast { - getAllprojects().forEach(subProject -> { - if ("EventMesh".equals(subProject.getName())) { - return - } - println String.format("%s-%s.jar", subProject.getName(), subProject.getVersion()) - }) - } +tasks.register('printProjects') { + getAllprojects().forEach(subProject -> { + if ("EventMesh".equals(subProject.getName())) { + return + } + println String.format("%s-%s.jar", subProject.getName(), subProject.getVersion()) + }) } subprojects { From ec028cac550f849073a3cef6dbb51108ff7588ab Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Sat, 6 Apr 2024 20:45:48 +0200 Subject: [PATCH 06/21] Add logging backend to `eventmesh-starter` --- build.gradle | 44 ++++++++++++++++++---------------- eventmesh-starter/build.gradle | 5 +++- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/build.gradle b/build.gradle index 65a04a6f28..99713e753b 100644 --- a/build.gradle +++ b/build.gradle @@ -95,27 +95,29 @@ allprojects { .exclude('**/org/apache/eventmesh/connector/jdbc/antlr**') configurations { - runtimeClasspath { - // Log4j API implementations - exclude group: 'org.apache.logging.log4j', module: 'log4j-core' - exclude group: 'org.apache.logging.log4j', module: 'log4j-to-jul' - exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j' - // SLF4J implementations - exclude group: 'ch.qos.logback', module: 'logback-classic' - exclude group: 'org.slf4j', module: 'slf4j-jdk14' - exclude group: 'org.slf4j', module: 'slf4j-log4j12' - exclude group: 'org.slf4j', module: 'slf4j-nop' - exclude group: 'org.slf4j', module: 'slf4j-reload4j' - exclude group: 'org.slf4j', module: 'slf4j-simple' - exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl' - exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j2-impl' - // JUL implementations - exclude group: 'org.apache.logging.log4j', module: 'log4j-jul' - exclude group: 'org.slf4j', module: 'jul-to-slf4j' - // Log4j 1.x and replacements - exclude group: 'log4j', module: 'log4j' - exclude group: 'org.slf4j', module: 'log4j-over-slf4j' - exclude group: 'org.apache.logging.log4j', module: 'log4j-1.2-api' + if (!"eventmesh-starter".equals(project.name)) { + runtimeClasspath { + // Log4j API implementations + exclude group: 'org.apache.logging.log4j', module: 'log4j-core' + exclude group: 'org.apache.logging.log4j', module: 'log4j-to-jul' + exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j' + // SLF4J implementations + exclude group: 'ch.qos.logback', module: 'logback-classic' + exclude group: 'org.slf4j', module: 'slf4j-jdk14' + exclude group: 'org.slf4j', module: 'slf4j-log4j12' + exclude group: 'org.slf4j', module: 'slf4j-nop' + exclude group: 'org.slf4j', module: 'slf4j-reload4j' + exclude group: 'org.slf4j', module: 'slf4j-simple' + exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl' + exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j2-impl' + // JUL implementations + exclude group: 'org.apache.logging.log4j', module: 'log4j-jul' + exclude group: 'org.slf4j', module: 'jul-to-slf4j' + // Log4j 1.x and replacements + exclude group: 'log4j', module: 'log4j' + exclude group: 'org.slf4j', module: 'log4j-over-slf4j' + exclude group: 'org.apache.logging.log4j', module: 'log4j-1.2-api' + } } } diff --git a/eventmesh-starter/build.gradle b/eventmesh-starter/build.gradle index 0bc2208fd1..8d2888e742 100644 --- a/eventmesh-starter/build.gradle +++ b/eventmesh-starter/build.gradle @@ -17,4 +17,7 @@ dependencies { implementation project(":eventmesh-runtime") -} \ No newline at end of file + // Logging backend + runtimeOnly "org.apache.logging.log4j:log4j-core" + runtimeOnly "org.apache.logging.log4j:log4j-slf4j2-impl" +} From fe5d26e268054e72aedfbc1a33d9477d1e0a2972 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Sat, 6 Apr 2024 21:00:59 +0200 Subject: [PATCH 07/21] Remove task description --- build.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/build.gradle b/build.gradle index 99713e753b..4234058077 100644 --- a/build.gradle +++ b/build.gradle @@ -178,8 +178,6 @@ dependencies { } tasks.register('dist') { - group = JavaBasePlugin.BUILD_TASK_NAME - description "Creates the distribution directory" def includedProjects = ["eventmesh-common", "eventmesh-meta:eventmesh-meta-api", From 6765a8231b39d59d2242f151acb02d73bb18cbe1 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Sat, 6 Apr 2024 22:09:23 +0200 Subject: [PATCH 08/21] Fix task dependencies of task `installPlugin` --- build.gradle | 73 +++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/build.gradle b/build.gradle index 4234058077..cc2482410b 100644 --- a/build.gradle +++ b/build.gradle @@ -198,6 +198,7 @@ tasks.register('dist') { doLast { includedProjects.each { def project = findProject(it) + logger.lifecycle('Install module: module: {}', project.name) copy { from project.jar.archivePath into 'dist/apps' @@ -252,45 +253,41 @@ task zip(type: Zip) { } tasks.register('installPlugin') { - doLast { - if (!new File("${rootDir}/dist").exists()) { - return + // Compute dependency and outputs eagerly + dependsOn('dist') + allprojects.forEach(subProject -> { + var props = subProject.properties + if (props.containsKey('pluginType') && props.containsKey('pluginName')) { + var pluginType = props.get('pluginType') + var pluginName = props.get('pluginName') + dependsOn("${subProject.path}:jar") + outputs.dir("dist/plugin/${pluginType}/${pluginName}") } - String[] libJars = java.util.Optional.ofNullable(new File("${rootDir}/dist/lib").list()).orElseGet(() -> new String[0]) - getAllprojects().forEach(subProject -> { - var file = new File("${subProject.projectDir}/gradle.properties") - if (!file.exists()) { - return - } - var properties = new Properties() - properties.load(new FileInputStream(file)) - var pluginType = properties.getProperty("pluginType") - var pluginName = properties.getProperty("pluginName") - if (pluginType == null || pluginName == null) { - return - } - var pluginFile = new File("${rootDir}/dist/plugin/${pluginType}/${pluginName}") - if (pluginFile.exists()) { - return - } - pluginFile.mkdirs() - println String.format( - "install plugin, pluginType: %s, pluginInstanceName: %s, module: %s", pluginType, pluginName, subProject.getName() - ) - copy { - from subProject.jar.archivePath - into "${rootDir}/dist/plugin/${pluginType}/${pluginName}" - } - copy { - from subProject.configurations.runtimeClasspath - into "${rootDir}/dist/plugin/${pluginType}/${pluginName}" - exclude(libJars) - } - copy { - from subProject.file('conf') - from subProject.sourceSets.main.resources.srcDirs - into "${rootDir}/dist/conf" - exclude 'META-INF' + }) + doLast { + String[] libJars = file('dist/lib').list() + allprojects.forEach(subProject -> { + var properties = subProject.properties + var pluginType = properties.get('pluginType') + var pluginName = properties.get('pluginName') + if (pluginType != null || pluginName != null) { + logger.lifecycle('Install plugin: pluginType: {}, pluginInstanceName: {}, module: {}', pluginType, + pluginName, subProject.name) + copy { + from subProject.jar.archivePath + into "dist/plugin/${pluginType}/${pluginName}" + } + copy { + from subProject.configurations.runtimeClasspath + into "dist/plugin/${pluginType}/${pluginName}" + exclude(libJars) + } + copy { + from subProject.file('conf') + from subProject.sourceSets.main.resources.srcDirs + into "dist/conf" + exclude 'META-INF' + } } }) } From 8d5cab712b496b5166980d9f103075eb8f2c31ca Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Sat, 6 Apr 2024 22:48:05 +0200 Subject: [PATCH 09/21] Fix `installPlugin` task --- build.gradle | 62 ++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/build.gradle b/build.gradle index cc2482410b..2c5b5fd7ae 100644 --- a/build.gradle +++ b/build.gradle @@ -255,39 +255,39 @@ task zip(type: Zip) { tasks.register('installPlugin') { // Compute dependency and outputs eagerly dependsOn('dist') - allprojects.forEach(subProject -> { - var props = subProject.properties - if (props.containsKey('pluginType') && props.containsKey('pluginName')) { - var pluginType = props.get('pluginType') - var pluginName = props.get('pluginName') - dependsOn("${subProject.path}:jar") - outputs.dir("dist/plugin/${pluginType}/${pluginName}") - } - }) + var pluginProjects = subprojects.findAll { + it.file('gradle.properties').exists() + && it.properties.containsKey('pluginType') + && it.properties.containsKey('pluginName') + } + pluginProjects. + forEach(subProject -> { + var pluginType = subProject.properties.get('pluginType') + var pluginName = subProject.properties.get('pluginName') + dependsOn("${subProject.path}:jar") + outputs.dir("dist/plugin/${pluginType}/${pluginName}") + }) doLast { String[] libJars = file('dist/lib').list() - allprojects.forEach(subProject -> { - var properties = subProject.properties - var pluginType = properties.get('pluginType') - var pluginName = properties.get('pluginName') - if (pluginType != null || pluginName != null) { - logger.lifecycle('Install plugin: pluginType: {}, pluginInstanceName: {}, module: {}', pluginType, - pluginName, subProject.name) - copy { - from subProject.jar.archivePath - into "dist/plugin/${pluginType}/${pluginName}" - } - copy { - from subProject.configurations.runtimeClasspath - into "dist/plugin/${pluginType}/${pluginName}" - exclude(libJars) - } - copy { - from subProject.file('conf') - from subProject.sourceSets.main.resources.srcDirs - into "dist/conf" - exclude 'META-INF' - } + pluginProjects.forEach(subProject -> { + var pluginType = subProject.properties.get('pluginType') + var pluginName = subProject.properties.get('pluginName') + logger.lifecycle('Install plugin: pluginType: {}, pluginInstanceName: {}, module: {}', pluginType, + pluginName, subProject.name) + copy { + from subProject.jar.archivePath + into "dist/plugin/${pluginType}/${pluginName}" + } + copy { + from subProject.configurations.runtimeClasspath + into "dist/plugin/${pluginType}/${pluginName}" + exclude(libJars) + } + copy { + from subProject.file('conf') + from subProject.sourceSets.main.resources.srcDirs + into "dist/conf" + exclude 'META-INF' } }) } From 52d38a7f9746fa11cc3d8aac248f9cfa167d2475 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Sat, 6 Apr 2024 23:44:07 +0200 Subject: [PATCH 10/21] Add comment about exclusions --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 2c5b5fd7ae..7a7a13a9a5 100644 --- a/build.gradle +++ b/build.gradle @@ -94,6 +94,7 @@ allprojects { .exclude('**/org/apache/eventmesh/connector/openfunction/client/CallbackServiceGrpc**') .exclude('**/org/apache/eventmesh/connector/jdbc/antlr**') + // Prevents the introduction of logging backends by mistake in sub-projects configurations { if (!"eventmesh-starter".equals(project.name)) { runtimeClasspath { From e89f31cceb371ee6590707913a3eddec08973480 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Mon, 8 Apr 2024 16:15:24 +0200 Subject: [PATCH 11/21] Minimize changes to current configuration This commit minimizes the changes to EventMesh dependencies. Since a global exclusion is not an effective way to stop propagating logging backends as **transitive** dependencies we: * explictly remove logging backends from third-party dependencies that include them: RocketMQ, Pulsar, Spring Boot and Zookeeper, * restore Log4j Core as dependency of `eventmesh-common`, * exclude Log4j Core as dependency of `eventmesh-sdk-java`. --- build.gradle | 70 +++---------------- eventmesh-common/build.gradle | 3 + .../eventmesh-connector-pulsar/build.gradle | 4 +- .../eventmesh-connector-rocketmq/build.gradle | 38 +++++----- .../eventmesh-connector-slack/build.gradle | 2 +- .../eventmesh-connector-spring/build.gradle | 14 ++-- .../eventmesh-connector-wechat/build.gradle | 2 +- .../eventmesh-connector-wecom/build.gradle | 2 +- .../eventmesh-retry-rocketmq/build.gradle | 30 ++++---- .../eventmesh-sdk-java/build.gradle | 6 +- eventmesh-starter/build.gradle | 5 +- .../eventmesh-storage-pulsar/build.gradle | 7 +- .../eventmesh-storage-rocketmq/build.gradle | 40 ++++++----- 13 files changed, 94 insertions(+), 129 deletions(-) diff --git a/build.gradle b/build.gradle index 7a7a13a9a5..404ffa69fe 100644 --- a/build.gradle +++ b/build.gradle @@ -94,34 +94,6 @@ allprojects { .exclude('**/org/apache/eventmesh/connector/openfunction/client/CallbackServiceGrpc**') .exclude('**/org/apache/eventmesh/connector/jdbc/antlr**') - // Prevents the introduction of logging backends by mistake in sub-projects - configurations { - if (!"eventmesh-starter".equals(project.name)) { - runtimeClasspath { - // Log4j API implementations - exclude group: 'org.apache.logging.log4j', module: 'log4j-core' - exclude group: 'org.apache.logging.log4j', module: 'log4j-to-jul' - exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j' - // SLF4J implementations - exclude group: 'ch.qos.logback', module: 'logback-classic' - exclude group: 'org.slf4j', module: 'slf4j-jdk14' - exclude group: 'org.slf4j', module: 'slf4j-log4j12' - exclude group: 'org.slf4j', module: 'slf4j-nop' - exclude group: 'org.slf4j', module: 'slf4j-reload4j' - exclude group: 'org.slf4j', module: 'slf4j-simple' - exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl' - exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j2-impl' - // JUL implementations - exclude group: 'org.apache.logging.log4j', module: 'log4j-jul' - exclude group: 'org.slf4j', module: 'jul-to-slf4j' - // Log4j 1.x and replacements - exclude group: 'log4j', module: 'log4j' - exclude group: 'org.slf4j', module: 'log4j-over-slf4j' - exclude group: 'org.apache.logging.log4j', module: 'log4j-1.2-api' - } - } - } - dependencies { repositories { mavenLocal() @@ -167,18 +139,10 @@ allprojects { } } -def log4jVersion = '2.22.1' - -configurations { - distOnly -} - -dependencies { - distOnly "org.apache.logging.log4j:log4j-core:${log4jVersion}" - distOnly "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}" -} - tasks.register('dist') { + subprojects.forEach { subProject -> + dependsOn("${subProject.path}:jar") + } def includedProjects = ["eventmesh-common", "eventmesh-meta:eventmesh-meta-api", @@ -194,7 +158,6 @@ tasks.register('dist') { "eventmesh-webhook:eventmesh-webhook-api", "eventmesh-webhook:eventmesh-webhook-admin", "eventmesh-webhook:eventmesh-webhook-receive"] - includedProjects.each { dependsOn("${it}:jar") } outputs.dirs('dist/apps', 'dist/bin', 'dist/conf', 'dist/lib', 'dist/licenses') doLast { includedProjects.each { @@ -221,10 +184,6 @@ tasks.register('dist') { exclude 'eventmesh*' } } - copy { - from configurations.distOnly - into 'dist/lib' - } copy { from 'tools/third-party-licenses' into 'dist' @@ -232,7 +191,7 @@ tasks.register('dist') { } } -task tar(type: Tar) { +tasks.register('tar', Tar) { archiveBaseName.set(project.name) archiveVersion.set(project.version.toString()) archiveExtension.set('tar.gz') @@ -243,7 +202,7 @@ task tar(type: Tar) { } } -task zip(type: Zip) { +tasks.register('zip', Zip) { archiveBaseName.set(project.name) archiveVersion.set(project.version.toString()) archiveExtension.set('zip') @@ -493,12 +452,9 @@ subprojects { } def grpcVersion = '1.43.2' - def springBootVersion = '2.7.10' + def log4jVersion = '2.22.1' dependencyManagement { - imports { - mavenBom "org.apache.logging.log4j:log4j-bom:${log4jVersion}" - } dependencies { dependency "org.apache.commons:commons-lang3:3.6" dependency "org.apache.commons:commons-collections4:4.1" @@ -511,6 +467,9 @@ subprojects { dependency "com.google.guava:guava:31.0.1-jre" dependency "org.slf4j:slf4j-api:2.0.9" + dependency "org.apache.logging.log4j:log4j-api:${log4jVersion}" + dependency "org.apache.logging.log4j:log4j-core:${log4jVersion}" + dependency "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}" dependency "com.lmax:disruptor:3.4.2" @@ -548,11 +507,7 @@ subprojects { dependency "com.mebigfatguy.fb-contrib:fb-contrib:7.6.0" dependency "com.jayway.jsonpath:json-path:2.7.0" - // Exclude 'spring-boot-starter-logging' only once in the right artifact - dependency("org.springframework.boot:spring-boot-starter:${springBootVersion}") { - exclude group: 'org.springframework.boot', name: 'spring-boot-starter-logging' - } - dependency "org.springframework.boot:spring-boot-starter-web:${springBootVersion}" + dependency "org.springframework.boot:spring-boot-starter-web:2.7.10" dependency "io.openmessaging:registry-server:0.0.1" dependency "org.junit.jupiter:junit-jupiter:5.6.0" @@ -583,10 +538,7 @@ subprojects { dependency "com.alibaba.nacos:nacos-client:2.2.1" - dependency('org.apache.zookeeper:zookeeper:3.7.1') { - exclude group: 'ch.qos.logback', name: 'logback-core' - exclude group: 'ch.qos.logback', name: 'logback-classic' - } + dependency 'org.apache.zookeeper:zookeeper:3.7.1' dependency 'org.apache.curator:curator-client:5.4.0' dependency 'org.apache.curator:curator-framework:5.4.0' dependency 'org.apache.curator:curator-recipes:5.4.0' diff --git a/eventmesh-common/build.gradle b/eventmesh-common/build.gradle index ba2dff9db7..532b9dd256 100644 --- a/eventmesh-common/build.gradle +++ b/eventmesh-common/build.gradle @@ -30,6 +30,9 @@ dependencies { api "io.cloudevents:cloudevents-core" api "io.cloudevents:cloudevents-json-jackson" + runtimeOnly "org.apache.logging.log4j:log4j-core" + runtimeOnly "org.apache.logging.log4j:log4j-slf4j2-impl" + implementation 'com.github.seancfoley:ipaddress' implementation "com.lmax:disruptor" diff --git a/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle b/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle index 93b0cbcc48..984c3cff47 100644 --- a/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle @@ -18,10 +18,10 @@ dependencies { implementation project(":eventmesh-openconnect:eventmesh-openconnect-java") implementation("org.apache.pulsar:pulsar-client:$pulsar_version") { + // Remove logging backend implementations exclude group: 'org.apache.logging.log4j', module: 'log4j-core' exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl' } - compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' -} +} \ No newline at end of file diff --git a/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle b/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle index 554a10ae0f..0b89e9cefd 100644 --- a/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle @@ -16,29 +16,33 @@ */ List rocketmq = [ - "org.apache.rocketmq:rocketmq-client:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-broker:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-common:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-store:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-namesrv:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-tools:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-remoting:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-logging:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-srvutil:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-filter:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-acl:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-srvutil:${rocketmq_version}" + "org.apache.rocketmq:rocketmq-acl:$rocketmq_version", + "org.apache.rocketmq:rocketmq-client:$rocketmq_version", + "org.apache.rocketmq:rocketmq-common:$rocketmq_version", + "org.apache.rocketmq:rocketmq-filter:$rocketmq_version", + "org.apache.rocketmq:rocketmq-logging:$rocketmq_version", + "org.apache.rocketmq:rocketmq-remoting:$rocketmq_version", + "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", + "org.apache.rocketmq:rocketmq-store:$rocketmq_version", + "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version" ] -configurations { - implementation.exclude group: "ch.qos.logback", module: "logback-classic" - implementation.exclude group: "ch.qos.logback", module: "logback-core" -} - dependencies { api project(":eventmesh-openconnect:eventmesh-openconnect-java") implementation project(":eventmesh-common") implementation rocketmq + implementation("org.apache.rocketmq:rocketmq-broker:$rocketmq_version") { + // Remove logging backend implementations + exclude group: 'ch.qos.logback', module: 'logback-classic' + } + implementation("org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version") { + // Remove logging backend implementations + exclude group: 'ch.qos.logback', module: 'logback-classic' + } + implementation("org.apache.rocketmq:rocketmq-tools:$rocketmq_version") { + // Remove logging backend implementations + exclude group: 'ch.qos.logback', module: 'logback-classic' + } compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testImplementation "org.mockito:mockito-core" diff --git a/eventmesh-connectors/eventmesh-connector-slack/build.gradle b/eventmesh-connectors/eventmesh-connector-slack/build.gradle index 12d30557b8..851887e3c3 100644 --- a/eventmesh-connectors/eventmesh-connector-slack/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-slack/build.gradle @@ -28,4 +28,4 @@ dependencies { testImplementation "org.mockito:mockito-core" testImplementation "org.mockito:mockito-junit-jupiter" -} +} \ No newline at end of file diff --git a/eventmesh-connectors/eventmesh-connector-spring/build.gradle b/eventmesh-connectors/eventmesh-connector-spring/build.gradle index 48459b9004..5d4d6990fa 100644 --- a/eventmesh-connectors/eventmesh-connector-spring/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-spring/build.gradle @@ -15,19 +15,15 @@ * limitations under the License. */ -configurations { - implementation.exclude group: 'ch.qos.logback', module: 'logback-classic' - implementation.exclude group: 'log4j', module: 'log4j' - implementation.exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j' - testImplementation.exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j' -} - dependencies { api project(":eventmesh-openconnect:eventmesh-openconnect-java") implementation project(":eventmesh-common") implementation project(":eventmesh-sdks:eventmesh-sdk-java") - implementation "org.springframework.boot:spring-boot-starter:$spring_boot_version" - implementation "org.springframework.boot:spring-boot-starter-validation:$spring_boot_version" + + implementation("org.springframework.boot:spring-boot-starter-validation:$spring_boot_version") { + // Remove logging backend implementations + exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' + } implementation "org.springframework:spring-messaging:$spring_version" compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' diff --git a/eventmesh-connectors/eventmesh-connector-wechat/build.gradle b/eventmesh-connectors/eventmesh-connector-wechat/build.gradle index f3f63249b0..5d8f6e415e 100644 --- a/eventmesh-connectors/eventmesh-connector-wechat/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-wechat/build.gradle @@ -33,4 +33,4 @@ dependencies { testImplementation "org.mockito:mockito-core" testImplementation "org.mockito:mockito-junit-jupiter" testImplementation "org.mockito:mockito-inline" -} +} \ No newline at end of file diff --git a/eventmesh-connectors/eventmesh-connector-wecom/build.gradle b/eventmesh-connectors/eventmesh-connector-wecom/build.gradle index 62a6fcefb0..e89567c6f9 100644 --- a/eventmesh-connectors/eventmesh-connector-wecom/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-wecom/build.gradle @@ -30,4 +30,4 @@ dependencies { testImplementation "org.mockito:mockito-core" testImplementation "org.mockito:mockito-junit-jupiter" testImplementation "org.mockito:mockito-inline" -} +} \ No newline at end of file diff --git a/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle b/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle index 563bac1583..6d89ab443f 100644 --- a/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle +++ b/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle @@ -16,29 +16,33 @@ */ List rocketmq = [ + "org.apache.rocketmq:rocketmq-acl:$rocketmq_version", "org.apache.rocketmq:rocketmq-client:$rocketmq_version", - "org.apache.rocketmq:rocketmq-broker:$rocketmq_version", "org.apache.rocketmq:rocketmq-common:$rocketmq_version", - "org.apache.rocketmq:rocketmq-store:$rocketmq_version", - "org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version", - "org.apache.rocketmq:rocketmq-tools:$rocketmq_version", - "org.apache.rocketmq:rocketmq-remoting:$rocketmq_version", - "org.apache.rocketmq:rocketmq-logging:$rocketmq_version", - "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", "org.apache.rocketmq:rocketmq-filter:$rocketmq_version", - "org.apache.rocketmq:rocketmq-acl:$rocketmq_version", + "org.apache.rocketmq:rocketmq-logging:$rocketmq_version", + "org.apache.rocketmq:rocketmq-remoting:$rocketmq_version", "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", + "org.apache.rocketmq:rocketmq-store:$rocketmq_version", + "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version" ] -configurations { - implementation.exclude group: "ch.qos.logback", module: "logback-classic" - implementation.exclude group: "ch.qos.logback", module: "logback-core" -} - dependencies { implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") implementation project(":eventmesh-storage-plugin:eventmesh-storage-rocketmq") implementation rocketmq + implementation("org.apache.rocketmq:rocketmq-broker:$rocketmq_version") { + // Remove logging backend implementations + exclude group: 'ch.qos.logback', module: 'logback-classic' + } + implementation("org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version") { + // Remove logging backend implementations + exclude group: 'ch.qos.logback', module: 'logback-classic' + } + implementation("org.apache.rocketmq:rocketmq-tools:$rocketmq_version") { + // Remove logging backend implementations + exclude group: 'ch.qos.logback', module: 'logback-classic' + } implementation project(":eventmesh-retry:eventmesh-retry-api") implementation project(":eventmesh-common") diff --git a/eventmesh-sdks/eventmesh-sdk-java/build.gradle b/eventmesh-sdks/eventmesh-sdk-java/build.gradle index db15554031..c83b77d26b 100644 --- a/eventmesh-sdks/eventmesh-sdk-java/build.gradle +++ b/eventmesh-sdks/eventmesh-sdk-java/build.gradle @@ -18,7 +18,11 @@ def grpcVersion = '1.43.2' dependencies { - api project(":eventmesh-common") + api(project(":eventmesh-common")) { + // Remove logging backend implementations to allow users to choose their own + exclude group: 'org.apache.logging.log4j', module: 'log4j-core' + exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j2-impl' + } implementation "com.fasterxml.jackson.core:jackson-databind" implementation "com.fasterxml.jackson.core:jackson-core" diff --git a/eventmesh-starter/build.gradle b/eventmesh-starter/build.gradle index 8d2888e742..0bc2208fd1 100644 --- a/eventmesh-starter/build.gradle +++ b/eventmesh-starter/build.gradle @@ -17,7 +17,4 @@ dependencies { implementation project(":eventmesh-runtime") - // Logging backend - runtimeOnly "org.apache.logging.log4j:log4j-core" - runtimeOnly "org.apache.logging.log4j:log4j-slf4j2-impl" -} +} \ No newline at end of file diff --git a/eventmesh-storage-plugin/eventmesh-storage-pulsar/build.gradle b/eventmesh-storage-plugin/eventmesh-storage-pulsar/build.gradle index bceee8426e..39c8fa4695 100644 --- a/eventmesh-storage-plugin/eventmesh-storage-pulsar/build.gradle +++ b/eventmesh-storage-plugin/eventmesh-storage-pulsar/build.gradle @@ -18,11 +18,14 @@ dependencies { implementation project(":eventmesh-common") implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") - implementation 'org.apache.pulsar:pulsar-client:2.10.1' + implementation('org.apache.pulsar:pulsar-client:2.10.1') { + // Remove logging backend implementations + exclude group: 'org.apache.logging.log4j', module: 'log4j-core' + exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl' + } testImplementation project(":eventmesh-storage-plugin:eventmesh-storage-api") testImplementation project(":eventmesh-common") - testImplementation 'org.apache.pulsar:pulsar-client:2.10.1' implementation 'io.cloudevents:cloudevents-json-jackson' diff --git a/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle b/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle index 0c7a2435b3..f8887e1e1c 100644 --- a/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle +++ b/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle @@ -16,29 +16,33 @@ */ List rocketmq = [ - "org.apache.rocketmq:rocketmq-client:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-broker:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-common:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-store:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-namesrv:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-tools:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-remoting:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-logging:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-srvutil:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-filter:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-acl:${rocketmq_version}", - "org.apache.rocketmq:rocketmq-srvutil:${rocketmq_version}" + "org.apache.rocketmq:rocketmq-acl:$rocketmq_version", + "org.apache.rocketmq:rocketmq-client:$rocketmq_version", + "org.apache.rocketmq:rocketmq-common:$rocketmq_version", + "org.apache.rocketmq:rocketmq-filter:$rocketmq_version", + "org.apache.rocketmq:rocketmq-logging:$rocketmq_version", + "org.apache.rocketmq:rocketmq-remoting:$rocketmq_version", + "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", + "org.apache.rocketmq:rocketmq-store:$rocketmq_version", + "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version" ] -configurations { - implementation.exclude group: "ch.qos.logback", module: "logback-classic" - implementation.exclude group: "ch.qos.logback", module: "logback-core" -} - dependencies { implementation project(":eventmesh-common") implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") implementation rocketmq + implementation("org.apache.rocketmq:rocketmq-broker:$rocketmq_version") { + // Remove logging backend implementations + exclude group: 'ch.qos.logback', module: 'logback-classic' + } + implementation("org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version") { + // Remove logging backend implementations + exclude group: 'ch.qos.logback', module: 'logback-classic' + } + implementation("org.apache.rocketmq:rocketmq-tools:$rocketmq_version") { + // Remove logging backend implementations + exclude group: 'ch.qos.logback', module: 'logback-classic' + } testImplementation project(":eventmesh-storage-plugin:eventmesh-storage-api") testImplementation project(":eventmesh-common") @@ -46,8 +50,6 @@ dependencies { testImplementation "org.mockito:mockito-core" testImplementation "org.mockito:mockito-junit-jupiter" - testImplementation rocketmq - compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' From 04e03f3b3fbf033b8a0df26e218f7274e83a3126 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Wed, 10 Apr 2024 01:48:59 +0200 Subject: [PATCH 12/21] Add comments to remove exclusions after upgrade --- .../eventmesh-connector-pulsar/build.gradle | 14 ++++++++++++++ .../eventmesh-connector-rocketmq/build.gradle | 5 +++++ .../eventmesh-connector-spring/build.gradle | 9 ++++++++- .../eventmesh-meta-zookeeper/build.gradle | 5 +++++ .../eventmesh-retry-rocketmq/build.gradle | 4 ++++ .../eventmesh-storage-pulsar/build.gradle | 13 +++++++++++++ .../eventmesh-storage-rocketmq/build.gradle | 4 ++++ 7 files changed, 53 insertions(+), 1 deletion(-) diff --git a/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle b/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle index 984c3cff47..f087842ea8 100644 --- a/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle @@ -17,11 +17,25 @@ dependencies { implementation project(":eventmesh-openconnect:eventmesh-openconnect-java") + + /* + * TODO: This is a shaded artifact that contains 20 MiB of external libraries. It could probably be replaced by: + * + * implementation "org.apache.pulsar:pulsar-client-api:$pulsar_version" + * runtimeOnly "org.apache.pulsar:pulsar-client-original:$pulsar_version" + * + * The exclusions can be removed after an upgrade of the transitive: + * + * "org.apache.bookkeeper:bookkeeper" + * + * dependency to 4.15.4 or higher (used by Pulsar 2.11.2 or higher). + */ implementation("org.apache.pulsar:pulsar-client:$pulsar_version") { // Remove logging backend implementations exclude group: 'org.apache.logging.log4j', module: 'log4j-core' exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl' } + compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' } \ No newline at end of file diff --git a/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle b/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle index 0b89e9cefd..a6a972344d 100644 --- a/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle @@ -31,6 +31,10 @@ dependencies { api project(":eventmesh-openconnect:eventmesh-openconnect-java") implementation project(":eventmesh-common") implementation rocketmq + /* + * The exclusions can be remove after this issue is fixed: + * https://github.com/apache/rocketmq/issues/5347 + */ implementation("org.apache.rocketmq:rocketmq-broker:$rocketmq_version") { // Remove logging backend implementations exclude group: 'ch.qos.logback', module: 'logback-classic' @@ -43,6 +47,7 @@ dependencies { // Remove logging backend implementations exclude group: 'ch.qos.logback', module: 'logback-classic' } + compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testImplementation "org.mockito:mockito-core" diff --git a/eventmesh-connectors/eventmesh-connector-spring/build.gradle b/eventmesh-connectors/eventmesh-connector-spring/build.gradle index 5d4d6990fa..e0680d2bf2 100644 --- a/eventmesh-connectors/eventmesh-connector-spring/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-spring/build.gradle @@ -20,11 +20,18 @@ dependencies { implementation project(":eventmesh-common") implementation project(":eventmesh-sdks:eventmesh-sdk-java") + /* + * TODO: Are these dependencies necessary? The source code only requires these two dependencies + * that do not propagate logging backends: + * + * api "org.springframework:spring-context:$spring_version" + * implementation "org.springframework.boot:spring-boot-autoconfigure:$spring_boot_version" + */ implementation("org.springframework.boot:spring-boot-starter-validation:$spring_boot_version") { - // Remove logging backend implementations exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' } implementation "org.springframework:spring-messaging:$spring_version" + compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' diff --git a/eventmesh-meta/eventmesh-meta-zookeeper/build.gradle b/eventmesh-meta/eventmesh-meta-zookeeper/build.gradle index 057171cbba..149f78e99d 100644 --- a/eventmesh-meta/eventmesh-meta-zookeeper/build.gradle +++ b/eventmesh-meta/eventmesh-meta-zookeeper/build.gradle @@ -20,6 +20,11 @@ dependencies { compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' + /* + * The exclusion can be removed once ZOOKEEPER-4820 has been fixed. + * + * See https://github.com/apache/zookeeper/pull/2155 + */ implementation('org.apache.zookeeper:zookeeper') { exclude group: 'ch.qos.logback', module: 'logback-core' exclude group: 'ch.qos.logback', module: 'logback-classic' diff --git a/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle b/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle index 6d89ab443f..277afda099 100644 --- a/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle +++ b/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle @@ -31,6 +31,10 @@ dependencies { implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") implementation project(":eventmesh-storage-plugin:eventmesh-storage-rocketmq") implementation rocketmq + /* + * The exclusions can be remove after this issue is fixed: + * https://github.com/apache/rocketmq/issues/5347 + */ implementation("org.apache.rocketmq:rocketmq-broker:$rocketmq_version") { // Remove logging backend implementations exclude group: 'ch.qos.logback', module: 'logback-classic' diff --git a/eventmesh-storage-plugin/eventmesh-storage-pulsar/build.gradle b/eventmesh-storage-plugin/eventmesh-storage-pulsar/build.gradle index 39c8fa4695..d439016bea 100644 --- a/eventmesh-storage-plugin/eventmesh-storage-pulsar/build.gradle +++ b/eventmesh-storage-plugin/eventmesh-storage-pulsar/build.gradle @@ -18,6 +18,19 @@ dependencies { implementation project(":eventmesh-common") implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") + + /* + * TODO: This is a shaded artifact that contains 20 MiB of external libraries. It could probably be replaced by: + * + * implementation "org.apache.pulsar:pulsar-client-api:$pulsar_version" + * runtimeOnly "org.apache.pulsar:pulsar-client-original:$pulsar_version" + * + * The exclusions can be removed after an upgrade of the transitive: + * + * "org.apache.bookkeeper:bookkeeper" + * + * dependency to 4.15.4 or higher (used by Pulsar 2.11.2 or higher). + */ implementation('org.apache.pulsar:pulsar-client:2.10.1') { // Remove logging backend implementations exclude group: 'org.apache.logging.log4j', module: 'log4j-core' diff --git a/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle b/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle index f8887e1e1c..d443d1700a 100644 --- a/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle +++ b/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle @@ -31,6 +31,10 @@ dependencies { implementation project(":eventmesh-common") implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") implementation rocketmq + /* + * The exclusions can be remove after this issue is fixed: + * https://github.com/apache/rocketmq/issues/5347 + */ implementation("org.apache.rocketmq:rocketmq-broker:$rocketmq_version") { // Remove logging backend implementations exclude group: 'ch.qos.logback', module: 'logback-classic' From f5d8b73f5b6e4fd1fe74957099dd6d3f0a1e8fde Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Thu, 11 Apr 2024 08:13:14 +0200 Subject: [PATCH 13/21] Make `installPlugin` independent from `dist` --- build.gradle | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index e890ac909c..3537b8cf10 100644 --- a/build.gradle +++ b/build.gradle @@ -213,8 +213,6 @@ tasks.register('zip', Zip) { } tasks.register('installPlugin') { - // Compute dependency and outputs eagerly - dependsOn('dist') var pluginProjects = subprojects.findAll { it.file('gradle.properties').exists() && it.properties.containsKey('pluginType') @@ -228,7 +226,7 @@ tasks.register('installPlugin') { outputs.dir("dist/plugin/${pluginType}/${pluginName}") }) doLast { - String[] libJars = file('dist/lib').list() + String[] libJars = java.util.Optional.ofNullable(file('dist/lib').list()).orElse(new String[0]) pluginProjects.forEach(subProject -> { var pluginType = subProject.properties.get('pluginType') var pluginName = subProject.properties.get('pluginName') From b6a574dee41cd1d78d048f355cff621d18e11bac Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Thu, 11 Apr 2024 08:27:32 +0200 Subject: [PATCH 14/21] Make `copy` tasks easier to understand --- build.gradle | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index 3537b8cf10..1a511115e7 100644 --- a/build.gradle +++ b/build.gradle @@ -161,32 +161,32 @@ tasks.register('dist') { outputs.dirs('dist/apps', 'dist/bin', 'dist/conf', 'dist/lib', 'dist/licenses') doLast { includedProjects.each { - def project = findProject(it) - logger.lifecycle('Install module: module: {}', project.name) + def subProject = findProject(it) + logger.lifecycle('Install module: module: {}', subProject.name) copy { - from project.jar.archivePath - into 'dist/apps' + from subProject.jar.archivePath + into rootProject.file('dist/apps') } copy { - from project.file('bin') - into 'dist/bin' + from subProject.file('bin') + into rootProject.file('dist/bin') } copy { - from project.file('conf') - from project.sourceSets.main.resources.srcDirs - into 'dist/conf' + from subProject.file('conf') + from subProject.sourceSets.main.resources.srcDirs + into rootProject.file('dist/conf') duplicatesStrategy = DuplicatesStrategy.EXCLUDE exclude 'META-INF' } copy { - from project.configurations.runtimeClasspath - into 'dist/lib' + from subProject.configurations.runtimeClasspath + into rootProject.file('dist/lib') exclude 'eventmesh*' } } copy { from 'tools/third-party-licenses' - into 'dist' + into rootProject.file('dist') } } } @@ -234,17 +234,17 @@ tasks.register('installPlugin') { pluginName, subProject.name) copy { from subProject.jar.archivePath - into "dist/plugin/${pluginType}/${pluginName}" + into rootProject.file("dist/plugin/${pluginType}/${pluginName}") } copy { from subProject.configurations.runtimeClasspath - into "dist/plugin/${pluginType}/${pluginName}" + into rootProject.file("dist/plugin/${pluginType}/${pluginName}") exclude(libJars) } copy { from subProject.file('conf') from subProject.sourceSets.main.resources.srcDirs - into "dist/conf" + into rootProject.file("dist/conf") exclude 'META-INF' } }) From fec936a15defdd5476fc9c277e19f796fa41075e Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Thu, 11 Apr 2024 12:12:14 +0200 Subject: [PATCH 15/21] Add `eventmesh-common` to EventMesh OpenConnect deps --- eventmesh-openconnect/eventmesh-openconnect-java/build.gradle | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eventmesh-openconnect/eventmesh-openconnect-java/build.gradle b/eventmesh-openconnect/eventmesh-openconnect-java/build.gradle index 0049b96788..b41f7fbfae 100644 --- a/eventmesh-openconnect/eventmesh-openconnect-java/build.gradle +++ b/eventmesh-openconnect/eventmesh-openconnect-java/build.gradle @@ -26,10 +26,8 @@ dependencies { api project (":eventmesh-openconnect:eventmesh-openconnect-offsetmgmt-plugin:eventmesh-openconnect-offsetmgmt-api") implementation project (":eventmesh-openconnect:eventmesh-openconnect-offsetmgmt-plugin:eventmesh-openconnect-offsetmgmt-nacos") implementation project(":eventmesh-sdks:eventmesh-sdk-java") + implementation project(":eventmesh-common") compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' - - testRuntimeOnly "org.apache.logging.log4j:log4j-core" - testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j2-impl" } \ No newline at end of file From ebc6d0a6ba0a6381d4ab48e649c6f82396aa843b Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Thu, 11 Apr 2024 12:37:57 +0200 Subject: [PATCH 16/21] Refactor RocketMQ deps --- .../eventmesh-connector-rocketmq/build.gradle | 32 ++++++++----------- .../eventmesh-retry-rocketmq/build.gradle | 31 ++++++++---------- .../eventmesh-storage-rocketmq/build.gradle | 32 ++++++++----------- 3 files changed, 41 insertions(+), 54 deletions(-) diff --git a/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle b/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle index a6a972344d..64c43e29d5 100644 --- a/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle +++ b/eventmesh-connectors/eventmesh-connector-rocketmq/build.gradle @@ -16,36 +16,32 @@ */ List rocketmq = [ - "org.apache.rocketmq:rocketmq-acl:$rocketmq_version", "org.apache.rocketmq:rocketmq-client:$rocketmq_version", + "org.apache.rocketmq:rocketmq-broker:$rocketmq_version", "org.apache.rocketmq:rocketmq-common:$rocketmq_version", - "org.apache.rocketmq:rocketmq-filter:$rocketmq_version", - "org.apache.rocketmq:rocketmq-logging:$rocketmq_version", + "org.apache.rocketmq:rocketmq-store:$rocketmq_version", + "org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version", + "org.apache.rocketmq:rocketmq-tools:$rocketmq_version", "org.apache.rocketmq:rocketmq-remoting:$rocketmq_version", + "org.apache.rocketmq:rocketmq-logging:$rocketmq_version", "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", - "org.apache.rocketmq:rocketmq-store:$rocketmq_version", - "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version" + "org.apache.rocketmq:rocketmq-filter:$rocketmq_version", + "org.apache.rocketmq:rocketmq-acl:$rocketmq_version", + "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", + ] dependencies { api project(":eventmesh-openconnect:eventmesh-openconnect-java") implementation project(":eventmesh-common") - implementation rocketmq /* - * The exclusions can be remove after this issue is fixed: + * The exclusions can be removed after this issue is fixed: * https://github.com/apache/rocketmq/issues/5347 */ - implementation("org.apache.rocketmq:rocketmq-broker:$rocketmq_version") { - // Remove logging backend implementations - exclude group: 'ch.qos.logback', module: 'logback-classic' - } - implementation("org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version") { - // Remove logging backend implementations - exclude group: 'ch.qos.logback', module: 'logback-classic' - } - implementation("org.apache.rocketmq:rocketmq-tools:$rocketmq_version") { - // Remove logging backend implementations - exclude group: 'ch.qos.logback', module: 'logback-classic' + rocketmq.each { + implementation(it) { + exclude group: 'ch.qos.logback', module: 'logback-classic' + } } compileOnly 'org.projectlombok:lombok' diff --git a/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle b/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle index 277afda099..883081271c 100644 --- a/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle +++ b/eventmesh-retry/eventmesh-retry-rocketmq/build.gradle @@ -16,36 +16,31 @@ */ List rocketmq = [ - "org.apache.rocketmq:rocketmq-acl:$rocketmq_version", "org.apache.rocketmq:rocketmq-client:$rocketmq_version", + "org.apache.rocketmq:rocketmq-broker:$rocketmq_version", "org.apache.rocketmq:rocketmq-common:$rocketmq_version", - "org.apache.rocketmq:rocketmq-filter:$rocketmq_version", - "org.apache.rocketmq:rocketmq-logging:$rocketmq_version", + "org.apache.rocketmq:rocketmq-store:$rocketmq_version", + "org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version", + "org.apache.rocketmq:rocketmq-tools:$rocketmq_version", "org.apache.rocketmq:rocketmq-remoting:$rocketmq_version", + "org.apache.rocketmq:rocketmq-logging:$rocketmq_version", + "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", + "org.apache.rocketmq:rocketmq-filter:$rocketmq_version", + "org.apache.rocketmq:rocketmq-acl:$rocketmq_version", "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", - "org.apache.rocketmq:rocketmq-store:$rocketmq_version", - "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version" ] dependencies { implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") implementation project(":eventmesh-storage-plugin:eventmesh-storage-rocketmq") - implementation rocketmq /* - * The exclusions can be remove after this issue is fixed: + * The exclusions can be removed after this issue is fixed: * https://github.com/apache/rocketmq/issues/5347 */ - implementation("org.apache.rocketmq:rocketmq-broker:$rocketmq_version") { - // Remove logging backend implementations - exclude group: 'ch.qos.logback', module: 'logback-classic' - } - implementation("org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version") { - // Remove logging backend implementations - exclude group: 'ch.qos.logback', module: 'logback-classic' - } - implementation("org.apache.rocketmq:rocketmq-tools:$rocketmq_version") { - // Remove logging backend implementations - exclude group: 'ch.qos.logback', module: 'logback-classic' + rocketmq.each { + implementation(it) { + exclude group: 'ch.qos.logback', module: 'logback-classic' + } } implementation project(":eventmesh-retry:eventmesh-retry-api") implementation project(":eventmesh-common") diff --git a/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle b/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle index d443d1700a..fd14357fb9 100644 --- a/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle +++ b/eventmesh-storage-plugin/eventmesh-storage-rocketmq/build.gradle @@ -16,36 +16,32 @@ */ List rocketmq = [ - "org.apache.rocketmq:rocketmq-acl:$rocketmq_version", "org.apache.rocketmq:rocketmq-client:$rocketmq_version", + "org.apache.rocketmq:rocketmq-broker:$rocketmq_version", "org.apache.rocketmq:rocketmq-common:$rocketmq_version", - "org.apache.rocketmq:rocketmq-filter:$rocketmq_version", - "org.apache.rocketmq:rocketmq-logging:$rocketmq_version", + "org.apache.rocketmq:rocketmq-store:$rocketmq_version", + "org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version", + "org.apache.rocketmq:rocketmq-tools:$rocketmq_version", "org.apache.rocketmq:rocketmq-remoting:$rocketmq_version", + "org.apache.rocketmq:rocketmq-logging:$rocketmq_version", "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", - "org.apache.rocketmq:rocketmq-store:$rocketmq_version", - "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version" + "org.apache.rocketmq:rocketmq-filter:$rocketmq_version", + "org.apache.rocketmq:rocketmq-acl:$rocketmq_version", + "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", + ] dependencies { implementation project(":eventmesh-common") implementation project(":eventmesh-storage-plugin:eventmesh-storage-api") - implementation rocketmq /* - * The exclusions can be remove after this issue is fixed: + * The exclusions can be removed after this issue is fixed: * https://github.com/apache/rocketmq/issues/5347 */ - implementation("org.apache.rocketmq:rocketmq-broker:$rocketmq_version") { - // Remove logging backend implementations - exclude group: 'ch.qos.logback', module: 'logback-classic' - } - implementation("org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version") { - // Remove logging backend implementations - exclude group: 'ch.qos.logback', module: 'logback-classic' - } - implementation("org.apache.rocketmq:rocketmq-tools:$rocketmq_version") { - // Remove logging backend implementations - exclude group: 'ch.qos.logback', module: 'logback-classic' + rocketmq.each { + implementation(it) { + exclude group: 'ch.qos.logback', module: 'logback-classic' + } } testImplementation project(":eventmesh-storage-plugin:eventmesh-storage-api") From d17cb9ccfdbe55c6ac1e505f1e1ab5e48e0cfd49 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Thu, 11 Apr 2024 12:50:20 +0200 Subject: [PATCH 17/21] Delete `output.dirs` --- build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle b/build.gradle index 1a511115e7..feafd50fb1 100644 --- a/build.gradle +++ b/build.gradle @@ -158,7 +158,6 @@ tasks.register('dist') { "eventmesh-webhook:eventmesh-webhook-api", "eventmesh-webhook:eventmesh-webhook-admin", "eventmesh-webhook:eventmesh-webhook-receive"] - outputs.dirs('dist/apps', 'dist/bin', 'dist/conf', 'dist/lib', 'dist/licenses') doLast { includedProjects.each { def subProject = findProject(it) From 44cd3cdaf2253cde96a7cffc435466a81c8516c6 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Thu, 11 Apr 2024 15:36:13 +0200 Subject: [PATCH 18/21] Fix typo --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index feafd50fb1..b6499d0ce2 100644 --- a/build.gradle +++ b/build.gradle @@ -180,7 +180,7 @@ tasks.register('dist') { copy { from subProject.configurations.runtimeClasspath into rootProject.file('dist/lib') - exclude 'eventmesh*' + exclude 'eventmesh-*' } } copy { From 54c352c425d691f4a8837d80a5cc7f9a31383009 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Thu, 11 Apr 2024 15:59:35 +0200 Subject: [PATCH 19/21] Remove last `outputs.dir` --- build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle b/build.gradle index b6499d0ce2..7e8b1b72c4 100644 --- a/build.gradle +++ b/build.gradle @@ -222,7 +222,6 @@ tasks.register('installPlugin') { var pluginType = subProject.properties.get('pluginType') var pluginName = subProject.properties.get('pluginName') dependsOn("${subProject.path}:jar") - outputs.dir("dist/plugin/${pluginType}/${pluginName}") }) doLast { String[] libJars = java.util.Optional.ofNullable(file('dist/lib').list()).orElse(new String[0]) From f18e6c9d98ef121b9093f40e8aeee6cb0365ab52 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Sat, 13 Apr 2024 14:11:13 +0200 Subject: [PATCH 20/21] Remove dependencies from `installPlugin` --- build.gradle | 6 ------ 1 file changed, 6 deletions(-) diff --git a/build.gradle b/build.gradle index 7e8b1b72c4..28e4afae18 100644 --- a/build.gradle +++ b/build.gradle @@ -217,12 +217,6 @@ tasks.register('installPlugin') { && it.properties.containsKey('pluginType') && it.properties.containsKey('pluginName') } - pluginProjects. - forEach(subProject -> { - var pluginType = subProject.properties.get('pluginType') - var pluginName = subProject.properties.get('pluginName') - dependsOn("${subProject.path}:jar") - }) doLast { String[] libJars = java.util.Optional.ofNullable(file('dist/lib').list()).orElse(new String[0]) pluginProjects.forEach(subProject -> { From e771010a2d66a510727108f4776b2bcba56e0f76 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Mon, 15 Apr 2024 13:58:26 +0200 Subject: [PATCH 21/21] Add `eventmesh-common` to OpenConnect artifacts --- .../eventmesh-openconnect-offsetmgmt-plugin/build.gradle | 6 ++---- .../eventmesh-openconnect-offsetmgmt-api/build.gradle | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/build.gradle b/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/build.gradle index 7736e61d32..537c74fafc 100644 --- a/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/build.gradle +++ b/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/build.gradle @@ -23,11 +23,9 @@ dependencies { implementation "com.fasterxml.jackson.core:jackson-annotations" implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml" + implementation project(":eventmesh-common") implementation project(":eventmesh-sdks:eventmesh-sdk-java") compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' - - testRuntimeOnly "org.apache.logging.log4j:log4j-core" - testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j2-impl" -} \ No newline at end of file +} diff --git a/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/build.gradle b/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/build.gradle index c8c4aba4fd..97c3b8c33c 100644 --- a/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/build.gradle +++ b/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/build.gradle @@ -21,12 +21,10 @@ dependencies { compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' + implementation project(":eventmesh-common") testCompileOnly 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' testImplementation "org.mockito:mockito-core" - - testRuntimeOnly "org.apache.logging.log4j:log4j-core" - testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j2-impl" }