In Intellij IDEA (2016), with Download: Sources and Javadocs enabled, (can't insert image inline due to lack of reputation)
SBT 会尝试为所有依赖项下载来源和 Javadocs ,无论它们是否存在。
问题是,当依赖项(或更糟糕的是,嵌套依赖项)没有源 / Javadoc 时,构建将失败。
有没有办法配置 IDEA / SBT 来检查并跳过下载来源 / Javadocs 不存在,或在下载来源 / Javadocs 时忽略错误,而无需附加
withSources() withJavadoc()
每个依赖?
例如,依赖 Antlr 2.7.7 的依赖项, Maven中没有Javadocs( antlr-2.7.7-javadoc.jar )中心(https://repo1.maven.org/maven2/antlr/antlr/2.7.7/),启用下载:Javadoc ,将返回错误:
SBT project import
[warn] [FAILED ] antlr#antlr;2.7.7!antlr.jar(doc): (0ms)
[warn] ==== local: tried
[warn] C:\Users\Daniel\.ivy2\local\antlr\antlr\2.7.7\docs\antlr-javadoc.jar
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7-javadoc.jar
[warn] ==== activator-launcher-local: tried
[warn] C:\Users\Daniel\.activator\repository\antlr\antlr\2.7.7\docs\antlr-javadoc.jar
[warn] ==== activator-local: tried
答案 0 :(得分:0)
在构思设置>构建...>构建工具> sbt:取消选中下载库源和sbt源