Hey guys , I have another question about creating ...
# kobweb
d
Hey guys , I have another question about creating a custom Kobweb server plugin https://github.com/varabyte/kobweb?tab=readme-ov-file#create-a-kobweb-server-plugin. I followed all the steps but I keep on getting the following issue when I do Kobweb run:
Copy code
Exception in thread "main" java.util.ServiceConfigurationError: com.varabyte.kobweb.server.plugin.KobwebServerPlugin: Provider be.dieter.app.DemoKobwebServerPlugin not found
The code seems to be generating the files correctly and is also automatically placing my jar under site/.kobweb/server/plugins. Am I forgetting something
d
Hmmmm. Can you share your project?
I don't think too many people use Kobweb server plugins to be honest. But in theory if you have created that class in your project, it should be finding it.
Maybe something broke at some point? I can try to create a Kobweb server plugin myself sometime to see if it's working for me or not.
d
If you want I can invite you to the project?
Which github profile can I add?
d
Heads up that I'm pretty exhausted, this release was a marathon, so it might be a day before I can take a look. Feel free to ping me again in a day or two if you don't hear from me.
d
No problem! I added you to the project 🙂
d
I didn't see any notification on GitHub. Usually I think you get notified with an invite when someone adds you as an admin to a project?
I just tried creating a server plugin locally and it worked
That said -- I've learned a lot of Gradle since first implemented the feature, and I will probably be cleaning up the approach a little bit in 0.15.5 😛
d
I added you! I'm sure
image.png
d
I've attached a quick demo I threw together showing an implementation of a kobweb server plugin as described in the README
There's also a 0.15.5 branch which you can check out to see how it's going to slightly change in the next version of Kobweb
But yeah, unzip that project, then
cd serverplugin/site; kobweb run
in there
and check out
site/.kobweb/server/logs/kobweb-server.log
and you should see the entry "REPLACE ME WITH REAL CONFIGURATION" text which comes from
DemoKobwebServerPlugin.kt
🙌 1