【问题标题】:Why does IDEA fail with multi-project build?为什么 IDEA 在多项目构建中失败?
【发布时间】:2014-09-26 07:08:28
【问题描述】:

我刚刚在我的 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.

【问题讨论】:

  • 你使用 sbt-idea 插件还是内部 Intellij Sbt 导入支持(intellij-sbt 插件)?

标签: scala intellij-idea sbt


【解决方案1】:

您需要将 Project Structure/Module/"module_name"/Paths 中的输出路径更改为唯一值。这是一个分析sbt-idea插件的bug的项目结构,也可能是intellij-sbt插件。

【讨论】:

    猜你喜欢
    • 2017-09-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-23
    • 2011-05-01
    • 1970-01-01
    • 2018-01-10
    相关资源
    最近更新 更多