fm-sbt-s3-resolver
fm-sbt-s3-resolver copied to clipboard
Failure to create a Resolver from an s3:// url with sbt 1.1.4 and v0.14.0
It seems that the Resolver is being created before the plugin has a chance to register the UrlStreamHandler
.
Details: plugins.sbt:
addSbtPlugin("com.frugalmechanic" % "fm-sbt-s3-resolver" % "0.14.0")
This line in build.sbt
causes a crash:
resolvers += Resolver.url("LiveSafe", url("s3://s3.amazonaws.com/my-artifacts/ivy2"))(Resolver.ivyStylePatterns)
due to java.net.MalformedURLException: unknown protocol: s3
. I do not see the s3://
UrlStreamHandler
get installed.
However, if I do not try to add any s3 resolvers, I see the plugin registering the URL handler:
[info] Installing the s3:// URLStreamHandler via java.net.URL.setURLStreamHandlerFactory
If I then, later, via the console, add my s3 resolver, it succeeds.
It worked when I created a project/project/plugins.sbt
and added the plugin there.
Just to clarify, you are trying to use the S3 Resolver to resolve SBT plugins which is why adding it to project/project/plugins.sbt
worked?
Nope, just to resolve dependencies at the project-level (not in the meta project).
Hi,
Same with my setup. Project level dependencies. Adding it to project/project/plugins.sbt
fixes the issue. Otherwise, same java.net.MalformedURLException: unknown protocol: s3
using v0.19.0