2017-10-16 108 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這表明不自動啓用它。但到目前爲止,沒有解決方案或解決方法。