Skip to content

Commit

Permalink
[BEAM-11055] Update log4j to version 2.13.3
Browse files Browse the repository at this point in the history
  • Loading branch information
iemejia committed Oct 19, 2020
1 parent 8f7aa09 commit b62612d
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 54 deletions.
Expand Up @@ -410,6 +410,7 @@ class BeamModulePlugin implements Plugin<Project> {
def influxdb_version = "2.19"
def jackson_version = "2.10.2"
def jaxb_api_version = "2.3.3"
def log4j_version = "2.13.3"
def kafka_version = "1.0.0"
def nemo_version = "0.1"
def netty_version = "4.1.51.Final"
Expand Down Expand Up @@ -545,6 +546,9 @@ class BeamModulePlugin implements Plugin<Project> {
junit : "junit:junit:4.13-beta-3",
kafka : "org.apache.kafka:kafka_2.11:$kafka_version",
kafka_clients : "org.apache.kafka:kafka-clients:$kafka_version",
// Beam uses slf4j as its default logging library. Use log4j only in the right scope required by transitive dependencies.
log4j_api : "org.apache.logging.log4j:log4j-api:$log4j_version",
log4j_core : "org.apache.logging.log4j:log4j-core:$log4j_version",
mockito_core : "org.mockito:mockito-core:3.0.0",
nemo_compiler_frontend_beam : "org.apache.nemo:nemo-compiler-frontend-beam:$nemo_version",
netty_handler : "io.netty:netty-handler:$netty_version",
Expand Down
Expand Up @@ -23,60 +23,61 @@ package org.apache.beam.gradle
*/
class GrpcVendoring_1_26_0 {

static def guava_version = "26.0-jre"
static def protobuf_version = "3.11.0"
static def alpn_api_version = "1.1.2.v20150522"
static def bouncycastle_version = "1.54"
static def compress_lzf_version = "1.0.3"
static def conscrypt_version = "1.3.0"
static def google_auth_version = "0.18.0"
static def grpc_version = "1.26.0"
static def gson_version = "2.8.6"
static def guava_version = "26.0-jre"
static def jboss_marshalling_version = "1.4.11.Final"
static def jboss_modules_version = "1.1.0.Beta1"
static def jzlib_version = "1.1.3"
static def log4j_version = "2.13.3"
static def lz4_version = "1.3.0"
static def lzma_java_version = "1.3"
static def netty_version = "4.1.51.Final"
static def google_auth_version = "0.18.0"
static def proto_google_common_protos_version = "1.12.0"
static def npn_api_version = "1.1.1.v20141010"
static def opencensus_version = "0.24.0"
static def perfmark_version = "0.19.0"
static def lzma_java_version = "1.3"
static def proto_google_common_protos_version = "1.12.0"
static def protobuf_javanano_version = "3.0.0-alpha-5"
static def jzlib_version = "1.1.3"
static def compress_lzf_version = "1.0.3"
static def lz4_version = "1.3.0"
static def bouncycastle_version = "1.54"
static def conscrypt_version = "1.3.0"
static def alpn_api_version = "1.1.2.v20150522"
static def npn_api_version = "1.1.1.v20141010"
static def jboss_marshalling_version = "1.4.11.Final"
static def jboss_modules_version = "1.1.0.Beta1"
static def protobuf_version = "3.11.0"

/** Returns the list of compile time dependencies. */
static List<String> dependencies() {
return [
"com.github.jponge:lzma-java:$lzma_java_version",
"com.google.api.grpc:proto-google-common-protos:$proto_google_common_protos_version",
"com.google.auth:google-auth-library-credentials:$google_auth_version",
"com.google.code.gson:gson:$gson_version",
"com.google.guava:guava:$guava_version",
"com.google.protobuf:protobuf-java:$protobuf_version",
"com.google.protobuf.nano:protobuf-javanano:$protobuf_javanano_version",
"com.google.protobuf:protobuf-java-util:$protobuf_version",
"com.google.code.gson:gson:$gson_version",
"com.google.protobuf:protobuf-java:$protobuf_version",
"com.jcraft:jzlib:$jzlib_version",
"com.ning:compress-lzf:$compress_lzf_version",
"io.grpc:grpc-auth:$grpc_version",
"io.grpc:grpc-core:$grpc_version",
"io.grpc:grpc-context:$grpc_version",
"io.grpc:grpc-core:$grpc_version",
"io.grpc:grpc-netty:$grpc_version",
"io.grpc:grpc-protobuf:$grpc_version",
"io.grpc:grpc-stub:$grpc_version",
"io.netty:netty-transport-native-epoll:$netty_version",
"io.grpc:grpc-testing:$grpc_version",
// tcnative version from https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty
"io.netty:netty-tcnative-boringssl-static:2.0.33.Final",
"com.google.auth:google-auth-library-credentials:$google_auth_version",
"io.grpc:grpc-testing:$grpc_version",
"com.google.api.grpc:proto-google-common-protos:$proto_google_common_protos_version",
"io.netty:netty-transport-native-epoll:$netty_version",
"io.opencensus:opencensus-api:$opencensus_version",
"io.opencensus:opencensus-contrib-grpc-metrics:$opencensus_version",
"io.perfmark:perfmark-api:$perfmark_version",
"com.github.jponge:lzma-java:$lzma_java_version",
"com.google.protobuf.nano:protobuf-javanano:$protobuf_javanano_version",
"com.jcraft:jzlib:$jzlib_version",
"com.ning:compress-lzf:$compress_lzf_version",
"net.jpountz.lz4:lz4:$lz4_version",
"org.bouncycastle:bcpkix-jdk15on:$bouncycastle_version",
"org.bouncycastle:bcprov-jdk15on:$bouncycastle_version",
"org.eclipse.jetty.alpn:alpn-api:$alpn_api_version",
"org.eclipse.jetty.npn:npn-api:$npn_api_version",
"org.jboss.marshalling:jboss-marshalling:$jboss_marshalling_version",
"org.jboss.modules:jboss-modules:$jboss_modules_version"
"org.jboss.modules:jboss-modules:$jboss_modules_version",
]
}

Expand All @@ -86,12 +87,12 @@ class GrpcVendoring_1_26_0 {
*/
static List<String> runtimeDependencies() {
return [
"org.apache.logging.log4j:log4j-api:$log4j_version",
// TODO(BEAM-9288): Enable relocation for conscrypt
"org.conscrypt:conscrypt-openjdk-uber:$conscrypt_version",
'com.google.errorprone:error_prone_annotations:2.3.3',
'commons-logging:commons-logging:1.2',
'org.apache.logging.log4j:log4j-api:2.6.2',
'org.slf4j:slf4j-api:1.7.30',
// TODO(BEAM-9288): Enable relocation for conscrypt
"org.conscrypt:conscrypt-openjdk-uber:$conscrypt_version"
]
}

Expand Down
Expand Up @@ -27,7 +27,6 @@ enableJavaPerformanceTesting()
description = "Apache Beam :: SDKs :: Java :: IO :: Elasticsearch-Tests :: 2.x"
ext.summary = "Tests of ElasticsearchIO on Elasticsearch 2.x"

def log4j_version = "2.6.2"
def elastic_search_version = "2.4.1"

dependencies {
Expand All @@ -36,13 +35,13 @@ dependencies {
testCompile project(":sdks:java:io:elasticsearch")
testCompile project(path: ":sdks:java:io:common", configuration: "testRuntime")
testCompile library.java.slf4j_api
testCompile "org.apache.logging.log4j:log4j-api:$log4j_version"
testCompile "org.apache.logging.log4j:log4j-core:$log4j_version"
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.junit
testCompile "org.elasticsearch.client:elasticsearch-rest-client:7.9.2"
testCompile "org.elasticsearch:elasticsearch:$elastic_search_version"
testRuntimeOnly library.java.log4j_api
testRuntimeOnly library.java.log4j_core
testRuntimeOnly library.java.slf4j_jdk14
testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
}
Expand Up @@ -32,15 +32,14 @@ test {
systemProperty "tests.security.manager", "false"
}

def log4j_version = "2.6.2"
def elastic_search_version = "5.6.3"

configurations.all {
resolutionStrategy {
// Make sure the log4j versions for api and core match instead of taking the default
// Gradle rule of using the latest.
force "org.apache.logging.log4j:log4j-api:$log4j_version"
force "org.apache.logging.log4j:log4j-core:$log4j_version"
force library.java.log4j_api
force library.java.log4j_core
}
}

Expand All @@ -54,13 +53,13 @@ dependencies {
testCompile project(path: ":sdks:java:core", configuration: "shadow")
testCompile project(":sdks:java:io:elasticsearch")
testCompile project(path: ":sdks:java:io:common", configuration: "testRuntime")
testCompile "org.apache.logging.log4j:log4j-core:$log4j_version"
testCompile "org.apache.logging.log4j:log4j-api:$log4j_version"
testCompile library.java.slf4j_api
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.junit
testCompile "org.elasticsearch.client:elasticsearch-rest-client:$elastic_search_version"
testRuntimeOnly library.java.log4j_api
testRuntimeOnly library.java.log4j_core
testRuntimeOnly library.java.slf4j_jdk14
testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
}
Expand Up @@ -32,15 +32,14 @@ test {
systemProperty "tests.security.manager", "false"
}

def log4j_version = "2.6.2"
def elastic_search_version = "6.4.0"

configurations.all {
resolutionStrategy {
// Make sure the log4j versions for api and core match instead of taking the default
// Gradle rule of using the latest.
force "org.apache.logging.log4j:log4j-api:$log4j_version"
force "org.apache.logging.log4j:log4j-core:$log4j_version"
force library.java.log4j_api
force library.java.log4j_core
}
}

Expand All @@ -54,13 +53,13 @@ dependencies {
testCompile project(path: ":sdks:java:core", configuration: "shadow")
testCompile project(":sdks:java:io:elasticsearch")
testCompile project(path: ":sdks:java:io:common", configuration: "testRuntime")
testCompile "org.apache.logging.log4j:log4j-core:$log4j_version"
testCompile "org.apache.logging.log4j:log4j-api:$log4j_version"
testCompile library.java.slf4j_api
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.junit
testCompile "org.elasticsearch.client:elasticsearch-rest-client:$elastic_search_version"
testRuntimeOnly library.java.log4j_api
testRuntimeOnly library.java.log4j_core
testRuntimeOnly library.java.slf4j_jdk14
testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
}
Expand Up @@ -32,15 +32,14 @@ test {
systemProperty "tests.security.manager", "false"
}

def log4j_version = "2.11.1"
def elastic_search_version = "7.9.2"

configurations.all {
resolutionStrategy {
// Make sure the log4j versions for api and core match instead of taking the default
// Gradle rule of using the latest.
force "org.apache.logging.log4j:log4j-api:$log4j_version"
force "org.apache.logging.log4j:log4j-core:$log4j_version"
force library.java.log4j_api
force library.java.log4j_core
}
}

Expand All @@ -54,13 +53,13 @@ dependencies {
testCompile project(path: ":sdks:java:core", configuration: "shadow")
testCompile project(":sdks:java:io:elasticsearch")
testCompile project(path: ":sdks:java:io:common", configuration: "testRuntime")
testCompile "org.apache.logging.log4j:log4j-core:$log4j_version"
testCompile "org.apache.logging.log4j:log4j-api:$log4j_version"
testCompile library.java.slf4j_api
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.junit
testCompile "org.elasticsearch.client:elasticsearch-rest-client:$elastic_search_version"
testRuntimeOnly library.java.log4j_api
testRuntimeOnly library.java.log4j_core
testRuntimeOnly library.java.slf4j_jdk14
testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
}
Expand Up @@ -25,15 +25,14 @@ applyJavaNature(enableChecker:false,
description = "Apache Beam :: SDKs :: Java :: IO :: Elasticsearch-Tests :: Common"
ext.summary = "Common test classes for ElasticsearchIO"

def log4j_version = "2.11.1"
def elastic_search_version = "7.9.2"

configurations.all {
resolutionStrategy {
// Make sure the log4j versions for api and core match instead of taking the default
// Gradle rule of using the latest.
force "org.apache.logging.log4j:log4j-api:$log4j_version"
force "org.apache.logging.log4j:log4j-core:$log4j_version"
force library.java.log4j_api
force library.java.log4j_core
}
}

Expand All @@ -43,12 +42,12 @@ dependencies {
testCompile project(":sdks:java:io:elasticsearch")
testCompile project(path: ":sdks:java:io:common", configuration: "testRuntime")
testCompile library.java.slf4j_api
testCompile "org.apache.logging.log4j:log4j-api:$log4j_version"
testCompile "org.apache.logging.log4j:log4j-core:$log4j_version"
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testCompile library.java.junit
testCompile "org.elasticsearch.client:elasticsearch-rest-client:$elastic_search_version"
testRuntimeOnly library.java.log4j_api
testRuntimeOnly library.java.log4j_core
testRuntimeOnly library.java.slf4j_jdk14
testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
}
3 changes: 1 addition & 2 deletions sdks/java/io/hadoop-format/build.gradle
Expand Up @@ -29,7 +29,6 @@ enableJavaPerformanceTesting()
description = "Apache Beam :: SDKs :: Java :: IO :: Hadoop Format"
ext.summary = "IO to read data from sources and to write data to sinks that implement Hadoop MapReduce Format."

def log4j_version = "2.6.2"
def elastic_search_version = "7.9.2"

configurations.create("sparkRunner")
Expand Down Expand Up @@ -79,10 +78,10 @@ dependencies {
testCompile library.java.cassandra_driver_mapping
testCompile "org.apache.cassandra:cassandra-all:3.11.8"
testCompile library.java.postgres
testCompile "org.apache.logging.log4j:log4j-core:$log4j_version"
testCompile library.java.junit
testCompile library.java.hamcrest_core
testCompile library.java.hamcrest_library
testRuntimeOnly library.java.log4j_core
testRuntimeOnly library.java.slf4j_jdk14
testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")

Expand Down
2 changes: 2 additions & 0 deletions sdks/java/io/hcatalog/build.gradle
Expand Up @@ -67,6 +67,8 @@ dependencies {
testCompile "org.apache.hive:hive-exec:$hive_version"
testCompile "org.apache.hive:hive-common:$hive_version"
testCompile "org.apache.hive:hive-cli:$hive_version"
testRuntimeOnly library.java.log4j_api
testRuntimeOnly library.java.log4j_core
testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
}

0 comments on commit b62612d

Please sign in to comment.