DEV Community

Vinicius Carvalho
Vinicius Carvalho

Posted on

2 2

Don't let the shadow jar plugin shadow your application

In my previous post, I shared a template for deploying a ktor application to Google App Engine.

As part of this process I was using the Shadow plugin.
Well it turns out, by default the plugin won't copy service files from java Serviceloader.

This lead to my application failing due SPI classes not being loaded. So if your app breaks by using the plugin just add this to your build.gradle

shadowJar {
    mergeServiceFiles()
}

Happy coding

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay