TLDR:是否有适用于 Scala 2.12
和 SBT 1.0
的 flyway-sbt
的公开可用 jar?
是否有其他人在使用 Scala 2.12
时遇到过 flyway-sbt
的依赖解析问题?看看下面的网址,它们确实不存在。
[warn] module not found: org.flywaydb#flyway-sbt;4.0
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/org.flywaydb/flyway-sbt/scala_2.12/sbt_1.0//4.0/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.flywaydb/flyway-sbt/scala_2.12/sbt_1.0//4.0/ivys/ivy.xml
[warn] ==== local: tried
[warn] /Users/adu/.ivy2/local/org.flywaydb/flyway-sbt/scala_2.12/sbt_1.0//4.0/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/flywaydb/flyway-sbt_2.12_1.0/4.0/flyway-sbt-4.0.pom
[warn] ==== local-preloaded-ivy: tried
[warn] /Users/adu/.sbt/preloaded/org.flywaydb/flyway-sbt/4.0/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:////Users/adu/.sbt/preloaded/org/flywaydb/flyway-sbt_2.12_1.0/4.0/flyway-sbt-4.0.pom
[warn] ==== Flyway: tried
[warn] https://flywaydb.org/repo/org/flywaydb/flyway-sbt_2.12_1.0/4.0/flyway-sbt-4.0.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.flywaydb#flyway-sbt;4.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] org.flywaydb:flyway-sbt:4.0 (scalaVersion=2.12, sbtVersion=1.0)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.flywaydb:flyway-sbt:4.0 (scalaVersion=2.12, sbtVersion=1.0) (/Users/adu/workspace/seed-play/project/plugins.sbt#L42-43)
[warn] +- default:seed-play-build:0.1-SNAPSHOT (scalaVersion=2.12, sbtVersion=1.0)
[error] sbt.librarymanagement.ResolveException: unresolved dependency: org.flywaydb#flyway-sbt;4.0: not found
这些是我的 plugins.sbt
文件的添加内容:
resolvers += "Flyway" at "https://flywaydb.org/repo"
addSbtPlugin("org.flywaydb" % "flyway-sbt" % "4.0")
最佳答案
事实证明,Flyway 尚未发布与 sbtVersion=1.x
兼容的 flyway-sbt
的官方工件。
经过一番挖掘,我发现了这个 Github issue .
然后导致这个新的Github repository .
以上是Flyway github帐户的一部分,所以应该维护。
使用以下有效内容替换我的plugins.sbt 文件中的添加内容:
resolvers += "Flyway" at "https://davidmweber.github.io/flyway-sbt.repo"
addSbtPlugin("org.flywaydb" % "flyway-sbt" % "4.2.0")
关于scala - 为 Scala 2.12(Play Framework)添加 Flyway-sbt 插件时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47600615/