2017-10-16 83 views
0

我有一个使用FlyWay sbt项目。它在大多数项目中被禁用,因为我们只运行特定项目的演变。SBT AutoPlugins冲突,不应该在那里

所以我有这样的事情:

lazy val master = project 
    .disablePlugins(FlywayPlugin) 
    .aggregate(common) 
    .dependsOn(common) 

项目工作正常。它编译,工程,测试通过,等

现在我想添加旋转扭曲,所以我这样做(除了当然plugins.sbt):

lazy val master = project 
    .enablePlugins(SbtTwirl) 
    .disablePlugins(FlywayPlugin) 
    .aggregate(common) 
    .dependsOn(common) 

我结束了这个错误:

[error] sbt.AutoPluginException: Error determining plugins for project 'master' in /opt/app/master: 
[error] Contradiction in selected plugins. These plugins were both included and excluded: org.flywaydb.sbt.FlywayPlugin 
[error] Use 'last' for the full log. 

对此我真的不明白,因为我没有关于FlyWay改变任何东西。

这可能是什么原因造成的?

回答

1

这是一个已知的问题。所有(子)项目都会自动启用FlywayPlugin,并且当您尝试禁用它时,会导致冲突。

参见sbt/sbt#1926。引用@jsuereth:

Yeah, this is a known issue in our logic system (and the translation of enablement/disablement into it). I'm working on a mechanism to fix it.

PRs welcome if you have time.

也有在飞路库中的悬而未决的问题:flyway/flyway#1329这表明不自动启用它。但到目前为止,没有解决方案或解决方法。