Iām too much of a noob to determine this on my own: how do I find out which pedestal dependency to use for a given namespace? In this case, Iām looking at the SSE example on https://pedestal.io/pedestal/0.8/reference/server-sent-events.html which requires io.pedestal.http.sse and io.pedestal.interceptor? The API Docs only mention the namespaces, right?
io.pedestal/pedestal.service is what you need. It has the io.pedestal.http.sse namespace and it depends on io.pedestal/pedestal.interceptor which has the interceptor namespace
Thanks Mikko. But how do you know? Is there some mapping to be found on the github pages where the connection between dependencies and namespaces is made? Is it in a build file? Or maybe some deps.edn file?
Uhm, yeah, good question š I just checked https://github.com/pedestal/pedestal.
But usually most of the stuff you need is in io.pedestal/pedestal.service or in its dependencies.
Then you need to add web server of your choice and add that dependency, i.e. io.pedestal/pedestal.jetty. That should be enough.
The namespaces have gotten to be a bit of a jumble; back around 0.6 and 0.7, there was a pretty direct mapping of namespace name to Maven artifact; that's been twisted in 0.8 as part of the drive to split Pedestal apart from the Java Servlet API; this meant introducing some new libraries and moving existing namespaces to them.
But through the magic of transitive dependencies, you can just depend on the pedestal.jetty library and get all the other dependencies you need.