From b7f8ea693718f525586d6bb438e2ac31ba34c151 Mon Sep 17 00:00:00 2001 From: Alex Diachenko Date: Thu, 21 Oct 2021 00:59:19 -0700 Subject: [PATCH 1/4] Added azure-storage-blob-shaded. --- azure-storage-blob-shaded/pom.xml | 112 ++++++++++++++++++ .../connect/storage/PlaceHolder.java | 34 ++++++ 2 files changed, 146 insertions(+) create mode 100644 azure-storage-blob-shaded/pom.xml create mode 100644 azure-storage-blob-shaded/src/main/java/io/confluent/connect/storage/PlaceHolder.java diff --git a/azure-storage-blob-shaded/pom.xml b/azure-storage-blob-shaded/pom.xml new file mode 100644 index 000000000..0eb4308ef --- /dev/null +++ b/azure-storage-blob-shaded/pom.xml @@ -0,0 +1,112 @@ + + + + + 4.0.0 + + + io.confluent + kafka-connect-storage-common-parent + 10.3.0-SNAPSHOT + + + azure-storage-blob-shaded + jar + azure-storage-blob-shaded + + azure-storage-blob shaded to replace dependencies that are shipped with Kafka + 2021 + + + 12.11.1 + + + + + + maven-jar-plugin + + + org.apache.maven.plugins + maven-shade-plugin + 3.2.4 + + + package + + shade + + + + + com.azure:* + org.reactivestreams:* + com.fasterxml.jackson*:* + io.netty:* + io.projectreactor.netty:* + io.projectreactor:* + + + + + + io.confluent:* + + ** + + + + + + com.azure + com.azure.shaded + + + io.netty + io.netty.shaded + + + io.projectreactor + io.projectreactor.shaded + + + reactor + reactor.shaded + + + com.fasterxml.jackson + com.fasterxml.jackson.shaded + + + org.reactivestreams + org.reactivestreams.shaded + + + + + + + + + + + + com.azure + azure-storage-blob + ${azure-storage.version} + + + diff --git a/azure-storage-blob-shaded/src/main/java/io/confluent/connect/storage/PlaceHolder.java b/azure-storage-blob-shaded/src/main/java/io/confluent/connect/storage/PlaceHolder.java new file mode 100644 index 000000000..0e5bb99d0 --- /dev/null +++ b/azure-storage-blob-shaded/src/main/java/io/confluent/connect/storage/PlaceHolder.java @@ -0,0 +1,34 @@ +/* + * Copyright 2021 Confluent Inc. + * + * Licensed under the Confluent Community License (the "License"); you may not use + * this file except in compliance with the License. You may obtain a copy of the + * License at + * + * http://www.confluent.io/confluent-community-license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package io.confluent.connect.storage; + + +/** + * This class is added as a workaround to maven. Attempting to run both verify and install phases + * with maven fails if there's no source code in the project (the produced jar is empty). + * + * @see mvn + * clean verify deploy causes jar plugin to execute twice + *

This fact subsequently fails the attempt to re-shade the dependencies without adding new + * code. + * The workaround is to introduce this class here, with the intention to remove it during shading by + * configuring a filter for maven-shade-plugin. + *

+ */ +public class PlaceHolder { + + +} From 331e47d6829e61ab6818fe8b75c9aa9d6bb14a21 Mon Sep 17 00:00:00 2001 From: Alex Diachenko Date: Wed, 24 Nov 2021 18:04:54 -0800 Subject: [PATCH 2/4] Relocate provider-configuration files in META-INF/services as well. --- azure-storage-blob-shaded/pom.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/azure-storage-blob-shaded/pom.xml b/azure-storage-blob-shaded/pom.xml index 0eb4308ef..02a4334ce 100644 --- a/azure-storage-blob-shaded/pom.xml +++ b/azure-storage-blob-shaded/pom.xml @@ -46,6 +46,24 @@ language governing permissions and limitations under the License. --> shade + + + + com.azure:* From a23e43d1dde7af6cd38af943ff1a3127fbf4208c Mon Sep 17 00:00:00 2001 From: Alex Diachenko Date: Wed, 24 Nov 2021 20:25:57 -0800 Subject: [PATCH 3/4] Include woodstox as well. --- azure-storage-blob-shaded/pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/azure-storage-blob-shaded/pom.xml b/azure-storage-blob-shaded/pom.xml index 02a4334ce..0a50d5154 100644 --- a/azure-storage-blob-shaded/pom.xml +++ b/azure-storage-blob-shaded/pom.xml @@ -72,6 +72,8 @@ language governing permissions and limitations under the License. --> io.netty:* io.projectreactor.netty:* io.projectreactor:* + org.codehaus.woodstox:* + com.fasterxml.woodstox:* @@ -112,6 +114,14 @@ language governing permissions and limitations under the License. --> org.reactivestreams org.reactivestreams.shaded + + org.codehaus.woodstox + org.codehaus.woodstox.shaded + + + com.fasterxml.woodstox + com.fasterxml.woodstox.shaded + From ef834f00e385cbe82fb5361ba7f030c9eff098e5 Mon Sep 17 00:00:00 2001 From: Alex Diachenko Date: Wed, 24 Nov 2021 23:54:32 -0800 Subject: [PATCH 4/4] Include all org.codehaus* dependencies. --- azure-storage-blob-shaded/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-storage-blob-shaded/pom.xml b/azure-storage-blob-shaded/pom.xml index 0a50d5154..a68e96e81 100644 --- a/azure-storage-blob-shaded/pom.xml +++ b/azure-storage-blob-shaded/pom.xml @@ -72,7 +72,7 @@ language governing permissions and limitations under the License. --> io.netty:* io.projectreactor.netty:* io.projectreactor:* - org.codehaus.woodstox:* + org.codehaus*:* com.fasterxml.woodstox:* @@ -115,8 +115,8 @@ language governing permissions and limitations under the License. --> org.reactivestreams.shaded - org.codehaus.woodstox - org.codehaus.woodstox.shaded + org.codehaus + org.codehaus.shaded com.fasterxml.woodstox