我有一个包含两个子项目的项目。一方面,我想使用 sbt-docker ,在另一个,sbt-native-packager .但是,它们都定义了一个键 dockerCmd
使用不同的类型(分别是 String
和 Seq[String]
),所以加载项目失败:
java.lang.RuntimeException: Some keys were defined with the same name but different types: 'dockerCmd' (scala.collection.Seq[java.lang.String], java.lang.String)
有没有比修改插件来就类型达成一致更容易解决这个问题的方法?
最佳答案
Key naming convention: Use prefix
Sometimes, you need a new key, because there is no existing sbt key. In this case, use a plugin-specific prefix.
关于sbt - 不同子项目中的冲突键类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32576050/