Facing a (really!) annoying problem that I'm sure is easily solvable.
We are building a "fat jar" in Gradle; no plugins are being used.
When specifying an appender type in our YAML config, we get an error along the lines of:
* Failed to parse configuration at: logging.appenders; Could not resolve type id 'console' into a subtype of [simple type, class io.dropwizard.logging.AppenderFactory]
This looks like the META-INF/services file for io.dropwizard.logging.AppenderFactory is missing, but an explosion of the jar shows it there.
Am I missing something obvious? We are using 0.7.1.
Any help is greatly appreciated.
Thx
I'm guessing that Java is using class path preference and finding one of these random *.Discoverable files that doesn't including the Appender reference.
Although Gradle isn't my personal preference, I have to use it. Merging the *.Discoverable files seems like the best solution, albeit ugly to do it manually.
Any suggestions?
Thanks for the tips, Jochen.
Unfortunately, the JCenter repo is blocked (corp environment binary control), and Shadow doesn't appear is Maven Central. It looks very promising, otherwise!
I'll take a look at OneJar, although my preference would be avoid custom classloaders if at all possible (Guice, and some other funky stuff can get confused...).