score:0

Accepted answer

tl;dr Use ${baseDirectory.value} to reference the project's main directory, i.e. resolvers += "local maven" at s"file:${baseDirectory.value}/lib".

The issue comes from the line resolvers += "local maven" at "file:./lib/" because the preconditions on the parameter do not hold, i.e. "file:./lib/" doesn't meet java.io.File's contract.

You can check it out yourself in Scala REPL:

new java.io.File(new java.net.URI("file:./lib/"))

With the above line you'll face the error:

scala> new java.io.File(new java.net.URI("file:./lib/"))
java.lang.IllegalArgumentException: URI is not hierarchical
  at java.io.File.<init>(File.java:418)
  ... 43 elided

The solution is to use ${baseDirectory.value} to fully reference the path of the main directory of the project:

resolvers +=  "local ./lib maven" at s"file:${baseDirectory.value}/lib"

Related Query

More Query from same tag