我刚刚在我的SBT构建中添加了一个子项目来编译宏。这是我添加的project/Build.scala
:
import sbt._
object DevaBuild extends Build {
lazy val deva = Project("deva", file(".")) dependsOn macros
lazy val macros = Project("macros", file("macros"))
}
它从命令行构建得很好,但IntelliJ IDEA给了我这个错误:
Error:scala: Output path .../deva/project/target/idea-classes is shared between: Module 'deva-build' production, Module 'main-build' production
Output path .../deva/project/target/idea-test-classes is shared between: Module 'deva-build' tests, Module 'main-build' tests
Please configure separate output paths to proceed with the compilation.
TIP: you can use Project Artifacts to combine compiled classes if needed.
答案 0 :(得分:2)
您需要将项目结构/模块/" module_name" / Paths中的输出路径更改为唯一值。它是一个分析sbt-idea插件错误的项目结构,也可能是intellij-sbt插件。