sbt-javaagent icon indicating copy to clipboard operation
sbt-javaagent copied to clipboard

Document dependency syntax

Open non opened this issue 6 years ago • 0 comments

It's not clear from the README, but when using a Scala dependency, the author must be sure to append the Scala version explicitly, e.g.

javaAgents += "com.example" % "somelibrary_2.12" % "1.2.3" % "compile;runtime"

Using the %% syntax instead of _2.12 will appear to work, but the java agent will not be resolved, and the -javaagent parameter won't be provided.

I can think of a few remediations:

  1. Allow %% to be used, which fixes the issue.
  2. Document that %% is not supported and update the README.

Either way, I think the plugin should print a warning or error when agents are not resolved: silent failure is frustrating and harder to debug.

non avatar Jun 14 '18 20:06 non