Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider not found #2554

Closed
isaacpz opened this issue Oct 21, 2020 · 1 comment
Closed

Provider not found #2554

isaacpz opened this issue Oct 21, 2020 · 1 comment

Comments

@isaacpz
Copy link

isaacpz commented Oct 21, 2020

Hi! No bugs or actions for maintainers in this issue. Just want to create it in order to document how I fixed a build error I had with this library. Hoping this helps somebody else who is searching the project issues for keywords like I was.

The error is:

java.util.ServiceConfigurationError: io.fabric8.kubernetes.api.KubernetesResourceMappingProvider: Provider io.fabric8.kubernetes.internal.InternalResourceMappingProvider not found

I am using Gradle to build my project, and after a bit of turmoil I realized that certain classes from transitive dependencies (like io.fabric8.kubernetes.internal.InternalResourceMappingProvider) were not getting shadowed into my output jar. As it turns out, this is because of the minimize() option I was using with the com.github.johnrengelman.shadow plugin for Gradle.

To fix this issue, I simply excluded kubernetes-client from the shadowJar options in Gradle:

shadowJar {
    minimize {
        exclude(dependency('io.fabric8:kubernetes-client:.*'))
    }
}

I hope this helps somebody!

@isaacpz isaacpz closed this as completed Oct 21, 2020
@rohanKanojia
Copy link
Member

@isaacpz : Which version of KuberntesClient are you using? Could this be related to #2488 We've fixed this in v4.12.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants