How do you specify jetty-apln-agent version

Hi, I’m using PlayAkkaHttp2Support and I’ve run into a bug with jetty-alpn-agent 2.0.6, this bug has been fixed in jetty-apln-agent 2.0.7.

However I have no idea how to tell PlayAkkaHttp2Support to use 2.0.7 instead of 2.0.6. I tried adding the following to my build.sbt:

libraryDependencies += "org.mortbay.jetty.alpn" % "jetty-alpn-agent" % "2.0.7" % "provided"

The above doesn’t work as PlayAkkaHttp2Support configures its jetty agent as well and the two versions conflict. Does anyone know how to specify the jetty-apln-agent version?

I ran into the same issue, found a solution, not perfect but worked for me:

// in plugins.sbt: add the following line
addSbtPlugin(“com.lightbend.sbt” % “sbt-javaagent” % “0.1.4”)

// in build.sbt: add the following
enablePlugins(JavaAgent)
javaAgents := Seq(“org.mortbay.jetty.alpn” % “jetty-alpn-agent” % “2.0.7”)

Note: in my case 2.0.7 bumped into another bug, 2.0.9 worked for me.

Hope it help,

Thanh Nguyen

1 Like