如何在Play 2.2.x中使用dist任务禁用scaladoc生成(使用build.sbt)?

时间:2014-08-24 15:07:10

标签: java scala playframework sbt playframework-2.2

使用java-play 2.2.1和sbt 0.13.0,我在How to disable ScalaDoc generation in dist task in Play 2.2.x (using project/build.scala)?中遇到了同样的问题,除了我使用(据称)标准build.sbt而不是Build.scala

有没有办法用build.sbt执行此操作?或者我应该转移到Build.scala

1 个答案:

答案 0 :(得分:3)

tl; dr .settings方法调用中的内容应该直接转到build.sbt

build.sbt defines a Seq[Setting[_]], i.e. it’s a list of Scala expressions, separated by blank lines, where each one becomes one element in the sequence.一样,它与使用project/*.scala调用的.settings个文件中的完整版本定义相似。

您应该将以下内容添加到build.sbt

publishArtifact in (Compile, packageDoc) := false

publishArtifact in packageDoc := false

sources in (Compile,doc) := Seq.empty