如何在Play项目上执行“dist”(目前正在使用Play 2.3.0)时阻止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 (任何在这个非库项目上工作的人都会查看实际的源代码)。
发布于 2020-03-30 19:11:25
对于较新版本的Play (我目前正在使用2.8.1),您必须将这些设置添加到sbt中的项目(或每个子项目中):
Compile / doc / sources := Nil
Compile / packageDoc / publishArtifact := false(这是sbt 1的新语法。)
发布于 2014-08-20 15:27:47
在使用Play 2.1构建的项目上,我在sbt构建文件中添加了以下设置
...settings(sources in doc in Compile := List())这完全删除了文档创建。
https://stackoverflow.com/questions/25400820
复制相似问题