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)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay