Is it possible to add a resolver to an SBT project's build via an AutoPlugin? -
i creating autoplugin wraps non-auto plugin flywaydb. unfortunately, non-auto plugin requires custom resolver. when publish our autoplugin, resolver not used in client project's meta build, causing sbt fail start big stack trace begins with:
sbt.resolveexception: unresolved dependency: org.flywaydb#flyway-sbt;3.2.1: not found
i did not catch locally because had flyway artifacts cached in ~/.ivy/cache/scala_2.10/sbt_0.13/org.flywaydb/
the error due sbt not using custom flyway resolver when loading build autoplugin enabled. question, there way add meta build resolver via autoplugin setting? or required plugin dependencies must resolvable via default sbt resolvers?
a secondary question (could real issue): sbt bug client project's meta build not transitively depend on dependencies of enabled plugins?
this project oss. links code in case helpful:
here plugin project adds resolver: https://github.com/allenai/sbt-plugins/blob/a3ea78319836fd39cc8f2e13305e85bb9bfef5c7/build.sbt#l44-l45
here auto plugin: https://github.com/allenai/sbt-plugins/blob/a3ea78319836fd39cc8f2e13305e85bb9bfef5c7/src/main/scala/org/allenai/plugins/databaseplugin.scala
unfortunately build user still needs put in resolver setting inside project/*.sbt
.
Comments
Post a Comment