In Intellij IDEA (2016), with Download: Sources and Javadocs enabled, (can't insert image inline due to lack of reputation) SBT将尝试为所有依赖项下载Sources和Javadoc,无论它们是否存在。
问题是,当依赖项(或更糟糕的是,嵌套依赖项)没有Source / Javadoc时,构建将失败。
有没有办法配置IDEA / SBT来检查和跳过下载Sources / Javadoc(如果它不存在),或者在下载Sources / Javadocs时忽略错误,而不必附加
withSources() withJavadoc()
对每一个依赖?
例如,依赖于Antlr 2.7.7的依赖项,在Maven Central(https://repo1.maven.org/maven2/antlr/antlr/2.7.7/)中没有Javadocs(antlr-2.7.7-javadoc.jar),启用了下载: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
在构思设置>构建...>构建工具> sbt:取消选中下载库源和sbt源