Open liborfuka opened 9 months ago
@liborfuka: With the provided input I am unable to reproduce the issue.
More specifically I used the spring-boot-on-kubernetes-example
and added the dekorate and spring boms:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.dekorate</groupId>
<artifactId>dekorate-bom</artifactId>
<version>3.6.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>3.1.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
The error message itself most probably means that https://github.com/fabric8io/kubernetes-client/blob/main/httpclient-okhttp/pom.xml is not present in your class path.
The dependency should be brought in by io.fabric8:kubernetes-client:6.6.2
which is used by dekorate-core
.
Check that a bom is not somehow forcing different version or add the dependency explicitly to your project if it does.
I have parent BOM which brings org.springframework.cloud.spring-cloud-starter-kubernetes-fabric8 3.0.4 and it brings fabric8.kubernetes-client 6.2.0 but this should be ok.
I tested the same application with dekorate-spring-bom 2.11.5.redhat-00017 and it does not raise the exception Provider io.fabric8.kubernetes.client.okhttp.OkHttpClientFactory not found. It raises the exception with dekorate-spring-bom 3.6.1.
They changed it in kubernetes-client pom: https://github.com/fabric8io/kubernetes-client/blob/v6.6.2/kubernetes-client/pom.xml.
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-httpclient-okhttp</artifactId>
<scope>runtime</scope>
</dependency>
It is scope runtime now.
Fixed in 3.7.6
This issue is back from 4.0.0 tag.
Using dekorate-bom 3.6.1 and runing mvn clean package -Ddekorate.deploy=true raise exception: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project springboot-dekorate-app: Fatal error compiling: java.util.ServiceConfigurationError: io.fabric8.kubernetes.client.http.HttpClient$Factory: Provider io.fabric8.kubernetes.client.okhttp.OkHttpClientFactory not found -> [Help 1]