如何在Play项目(目前使用Play 2.3.0)上执行'dist'时停止scaladoc的运行?举个例子:
$ git clone --branch play-2.3.0 git@github.com:guardian/gu-who.git
$ cd gu-who
$ sbt clean dist
[info] Loading project definition from /tmp/gu-who/project
[info] Set current project to gu-who (in build file:/tmp/gu-who/)
[success] Total time: 0 s, completed 20-Aug-2014 09:57:55
...
[info] Compiling 23 Scala sources and 1 Java source to /tmp/gu-who/target/scala-2.10/classes...
[info] Main Scala API documentation to /tmp/gu-who/target/scala-2.10/api...
[info] Packaging /tmp/gu-who/target/gu-who-1.0-SNAPSHOT-assets.jar ...
[info] Done packaging.
model contains 54 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging /tmp/gu-who/target/scala-2.10/gu-who_2.10-1.0-SNAPSHOT-javadoc.jar ...
[info] Done packaging.
[info] Packaging /tmp/gu-who/target/scala-2.10/gu-who_2.10-1.0-SNAPSHOT.jar ...
[info] Done packaging.
[info]
[info] Your package is ready in /tmp/gu-who/target/universal/gu-who-1.0-SNAPSHOT.zip
[info]
[success] Total time: 20 s, completed 20-Aug-2014 09:58:15
该过程的'scaladoc'部分大约需要20秒的 12 。我根本不想运行scaladoc (在这个非库项目上工作的任何人都会查看实际的源代码)。
答案 0 :(得分:0)
在使用Play 2.1构建的项目中,我将以下设置添加到我的sbt构建文件
...settings(sources in doc in Compile := List())
这完全删除了文档创建。
答案 1 :(得分:0)
对于较新版本的Play(我当前使用的是2.8.1),您必须将以下设置添加到sbt
中的项目(或每个子项目)中:
Compile / doc / sources := Nil
Compile / packageDoc / publishArtifact := false
(这是sbt 1中的新语法。)