How to skip javadoc dependency download with sbt

爷,独闯天下 提交于 2019-12-21 04:02:26

问题


1) Javadoc artifacts tend to take too much space and time to download. For example, scala-library-2.10.2-sources.jar is 1 Mb, but scala-library-2.10.2-javadoc.jar is 34 Mb.

2) Javadoc is mostly not needed at all. As modern IDEs can fetch all info from sources.

So I wanted to find a way to alter sbt settings to completely disable javadoc download among third-party library dependencies.


回答1:


https://github.com/mpeltonen/sbt-idea/issues/225#issuecomment-19150022 kindly gives the answer:

The javadoc is typically much more bulky and less useful than the sources. I have at least turned off downloading javadocs by putting this setting in ~/.sbt/build.sbt:

transitiveClassifiers in Global := Seq(Artifact.SourceClassifier)

See also What is a classifier in SBT.

Note that ~/.sbt/build.sbt on Linux corresponds to %USERPROFILE%\.sbt\build.sbt on Windows.



来源:https://stackoverflow.com/questions/20313123/how-to-skip-javadoc-dependency-download-with-sbt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!