intellij:模块描述符未列出所需的工件:*#*!*。*

时间:2019-01-25 14:05:51

标签: intellij-idea sbt

刷新Intellij中的sbt项目时,我得到以下异常:

enter image description here

我删除了.intellij文件夹,但没有成功。

无论如何,到目前为止一切似乎都按预期进行。

这是整个项目:https://github.com/pme123/play-binding-form

在贾斯汀·凯瑟(Justin Kaeser)发表评论之后,我安装了2018.2,现在Intellij可以工作了,但是现在我在sbt shell中看到了异常:

[info] Reapplying settings...
[info] Set current project to formRoot (in build file:/Users/mpa/dev/Github/pme123/play-binding-form/)
[error] a required artifact is not listed by module descriptor: *#*!*.*
[error] a required artifact is not listed by module descriptor: *#*!*.*
[error] a required artifact is not listed by module descriptor: *#*!*.*
...

2 个答案:

答案 0 :(得分:1)

我现在发现了引起问题的更改:

build.sbt中,我的共享配置是

lazy val shared = crossProject(JSPlatform, JVMPlatform)
  .crossType(CrossType.Pure)
  .settings(sharedSettings())
  .settings(sharedDependencies)
  .settings(
    publish := {},
    publishLocal := {},
    publishArtifact := false, // this line caused the problem
  )

删除该行时有效。

如果有人知道原因,那就太好了!

答案 1 :(得分:0)

这似乎是一个依赖关系解决问题。

此外,在您的源代码中,您有2个项目的内容根相同:

formRoot和查找表单。

您不能有2个模块具有相同的内容根。 摆脱掉其中之一,使其适合您的sbt构建:文件>无效的缓存/重新启动...,最后在sbt工具窗口中刷新所有sbt项目。

希望有帮助。