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

fix: Uber Jar includes merged service entry for multiple implementations of the same interface #2211

Conversation

manusa
Copy link
Member

@manusa manusa commented May 8, 2020

Apparently uber-jar configuration has been wrong for a while now.

Service entry declarations were being lost because they collided both for openshift-client and
for kubernetes-client modules.

uberjar: maven-shade-plugin:3.2.3:shade

[WARNING] kubernetes-client-4.10-SNAPSHOT.jar, kubernetes-openshift-uberjar-4.10-SNAPSHOT.jar, openshift-client-4.10-SNAPSHOT.jar define 3 overlapping resources:
[WARNING]   - META-INF/services/io.fabric8.kubernetes.client.ExtensionAdapter
[WARNING]   - META-INF/services/io.fabric8.kubernetes.client.ResourceHandler
[WARNING]   - META-INF/services/io.fabric8.kubernetes.client.ServiceToURLProvider

See: https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#ServicesResourceTransformer

Should fix: #2066

@centos-ci
Copy link

Can one of the admins verify this patch?

@rohanKanojia rohanKanojia requested a review from oscerd May 8, 2020 13:35
@rohanKanojia rohanKanojia requested a review from iocanel May 8, 2020 13:36
CHANGELOG.md Outdated Show resolved Hide resolved
…ons of the same interface

Apparently uber-jar configuration has been wrong for a while now.

Service entry declarations were being lost because they collided both for openshift-client and
for kubernetes-client modules.

uberjar: `maven-shade-plugin:3.2.3:shade `
```
[WARNING] kubernetes-client-4.10-SNAPSHOT.jar, kubernetes-openshift-uberjar-4.10-SNAPSHOT.jar, openshift-client-4.10-SNAPSHOT.jar define 3 overlapping resources:
[WARNING]   - META-INF/services/io.fabric8.kubernetes.client.ExtensionAdapter
[WARNING]   - META-INF/services/io.fabric8.kubernetes.client.ResourceHandler
[WARNING]   - META-INF/services/io.fabric8.kubernetes.client.ServiceToURLProvider
```

See: https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#ServicesResourceTransformer
@manusa manusa force-pushed the fix/#2066-missing-handlers-in-uber-jar branch from 16c9850 to 7bb4a9f Compare May 8, 2020 13:42
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 8, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@rohanKanojia
Copy link
Member

[merge]

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

Successfully merging this pull request may close these issues.

OpenShift - NPE when loading resources from InputStream
4 participants