Skip to content

Commit 21321b0

Browse files
SamBarkergyfora
authored andcommitted
[FLINK-36332] Fix okhttp dependency handling
(cherry picked from commit c821b48)
1 parent 11d1828 commit 21321b0

File tree

4 files changed

+50
-46
lines changed

4 files changed

+50
-46
lines changed

flink-kubernetes-operator-api/pom.xml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,8 @@ under the License.
6666
<dependency>
6767
<groupId>io.fabric8</groupId>
6868
<artifactId>kubernetes-client</artifactId>
69-
<version>${fabric8.version}</version>
70-
<exclusions>
71-
<exclusion>
72-
<groupId>com.squareup.okhttp3</groupId>
73-
<artifactId>*</artifactId>
74-
</exclusion>
75-
<exclusion>
76-
<groupId>io.fabric8</groupId>
77-
<artifactId>kubernetes-httpclient-okhttp</artifactId>
78-
</exclusion>
79-
</exclusions>
8069
</dependency>
81-
70+
8271
<!-- Utils -->
8372
<dependency>
8473
<groupId>org.apache.commons</groupId>
@@ -112,6 +101,11 @@ under the License.
112101
<version>${log4j.version}</version>
113102
</dependency>
114103

104+
<dependency>
105+
<groupId>com.fasterxml.jackson.core</groupId>
106+
<artifactId>jackson-annotations</artifactId>
107+
</dependency>
108+
115109
<!-- Test -->
116110
<dependency>
117111
<groupId>org.apache.flink</groupId>

flink-kubernetes-operator/pom.xml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ under the License.
3737
<!-- required by FlinkConfigManagerTest -->
3838
--add-opens=java.base/java.util=ALL-UNNAMED
3939
</surefire.module.config>
40-
<!-- valid options can be checked at https://central.sonatype.com/search?q=kubernetes-httpclient- currently: okhttp, jdk, jetty, vertx -->
41-
<fabric8.httpclient.impl>okhttp</fabric8.httpclient.impl>
4240
</properties>
4341

4442
<dependencies>
@@ -421,22 +419,6 @@ under the License.
421419
</plugins>
422420
</build>
423421
</profile>
424-
<profile>
425-
<id>depend-on-okhttp4</id>
426-
<activation>
427-
<property>
428-
<name>fabric8.httpclient.impl</name>
429-
<value>okhttp</value>
430-
</property>
431-
</activation>
432-
<dependencies>
433-
<dependency>
434-
<groupId>com.squareup.okhttp3</groupId>
435-
<artifactId>okhttp</artifactId>
436-
<version>${okhttp.version}</version>
437-
</dependency>
438-
</dependencies>
439-
</profile>
440422
</profiles>
441423

442424
</project>

flink-kubernetes-webhook/pom.xml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,6 @@ under the License.
7878
<scope>test</scope>
7979
</dependency>
8080

81-
<!-- okhttp -->
82-
<!--
83-
Regarding the okhttp explicit version
84-
see https://github.com/fabric8io/kubernetes-client/issues/4290
85-
and https://issues.apache.org/jira/browse/FLINK-28637
86-
-->
87-
<dependency>
88-
<groupId>com.squareup.okhttp3</groupId>
89-
<artifactId>okhttp</artifactId>
90-
<version>${okhttp.version}</version>
91-
</dependency>
92-
<dependency>
93-
<groupId>com.squareup.okhttp3</groupId>
94-
<artifactId>logging-interceptor</artifactId>
95-
<version>${okhttp.version}</version>
96-
</dependency>
9781
<dependency>
9882
<groupId>com.squareup.okhttp3</groupId>
9983
<artifactId>mockwebserver</artifactId>

pom.xml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ under the License.
111111

112112
<derby.version>10.15.2.0</derby.version>
113113
<awaitility.version>4.2.2</awaitility.version>
114+
115+
<!-- valid options can be checked at https://central.sonatype.com/search?q=kubernetes-httpclient- currently: okhttp, jdk, jetty, vertx -->
116+
<!-- when using a value other than okhttp disable the `depend-on-okhttp4` profile as well. -->
117+
<fabric8.httpclient.impl>okhttp</fabric8.httpclient.impl>
114118
</properties>
115119

116120
<dependencyManagement>
@@ -129,6 +133,33 @@ under the License.
129133
<type>pom</type>
130134
<scope>import</scope>
131135
</dependency>
136+
<dependency>
137+
<groupId>io.fabric8</groupId>
138+
<artifactId>kubernetes-client</artifactId>
139+
<version>${fabric8.version}</version>
140+
<exclusions>
141+
<exclusion>
142+
<groupId>com.squareup.okhttp3</groupId>
143+
<artifactId>*</artifactId>
144+
</exclusion>
145+
<exclusion>
146+
<groupId>io.fabric8</groupId>
147+
<artifactId>kubernetes-httpclient-okhttp</artifactId>
148+
</exclusion>
149+
</exclusions>
150+
</dependency>
151+
<dependency>
152+
<groupId>io.fabric8</groupId>
153+
<artifactId>kubernetes-server-mock</artifactId>
154+
<version>${fabric8.version}</version>
155+
<scope>test</scope>
156+
<exclusions>
157+
<exclusion>
158+
<groupId>com.squareup.okhttp3</groupId>
159+
<artifactId>mockwebserver</artifactId>
160+
</exclusion>
161+
</exclusions>
162+
</dependency>
132163
</dependencies>
133164
</dependencyManagement>
134165

@@ -189,6 +220,19 @@ under the License.
189220
</plugins>
190221
</build>
191222
</profile>
223+
<profile>
224+
<id>depend-on-okhttp4</id>
225+
<activation>
226+
<activeByDefault>true</activeByDefault>
227+
</activation>
228+
<dependencies>
229+
<dependency>
230+
<groupId>com.squareup.okhttp3</groupId>
231+
<artifactId>okhttp</artifactId>
232+
<version>${okhttp.version}</version>
233+
</dependency>
234+
</dependencies>
235+
</profile>
192236
</profiles>
193237

194238
<build>

0 commit comments

Comments
 (0)