Closed jjank closed 5 years ago
It's because of the SPI combination. Either you rewrite the SPI descriptor or just use the vertx-maven-plugin that would take care of this.
Ahh, very cool I just tried it and it works perfectly fine, thanks a lot!
I generated the project via start.vertx.io which did not use this plugin...yet? There is an open issue about this: https://github.com/vert-x3/vertx-starter/issues/39. Maybe I can help out with a PR there.
There is also one pending PR in the vertx-maven-starter
repo: https://github.com/vert-x3/vertx-maven-starter/issues/3.
Thanks anyway I'm gonna close this one now :)
for who use gradle shadow plugin, try this:
shadowJar{
mergeServiceFiles()
}
Hi everybody,
I've encountered some minor issue when working with additional ConfigStores. I've created a little example app using the
Kubernetes ConfigMap Store
but the issue applies for all additional config stores.According to the documentation one has to include both the
vertx-config
and thevertx-config-kubernetes-configmap
artifacts as dependencies.When you run the my example app on the
broken
branch via the maven exec-plugin or via a main-method, everything works fine. However if you run the fat jar I get an exception:The solution for me was to remove the
vertx-config
dependency (see thefixed
branch). Now the fat jar runs just fine. So my question is: Is this a bug or just something that the documentation should be more explicit about? Unfortunately I am not very familiar with ServiceLoaders and how that connects to the fat jar packaging. But I'd be glad to help out with a PR if you can point me into the right direction 👍Thanks for the great work!
BTW: I encountered the exact same behavior on JDK 1.8 and JDK 11 (MacOs 10.14.2, Maven 3.5.4). Also changing the compilation target to 11 and upgrading the maven-shade-plugin did not change anything.