4

How can I stop scaladoc from running when executing 'dist' on a Play project (currently using Play 2.3.0)? As an example:

$ 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

The 'scaladoc' portion of that process takes about 12 of those 20 seconds. I don't want to run scaladoc at all (anyone doing work on this non-library project will be looking at the actual source code).

Roberto Tyley
  • 24,513
  • 11
  • 72
  • 101
  • possible duplicate of [How to disable ScalaDoc generation in dist task in Play 2.2.x?](http://stackoverflow.com/questions/21461798/how-to-disable-scaladoc-generation-in-dist-task-in-play-2-2-x) – Jacek Laskowski Aug 20 '14 at 13:28

2 Answers2

1

For newer versions of Play (I'm currently using 2.8.1), you'll have to add these settings to the project in sbt (or to every subproject):

Compile / doc / sources := Nil
Compile / packageDoc / publishArtifact  := false

(This is the new syntax from sbt 1.)

Jean-Philippe Pellet
  • 59,296
  • 21
  • 173
  • 234
0

On a project built with Play 2.1 I added the following setting to my sbt build file

...settings(sources in doc in Compile := List())

This removed the documentation creation completely.

Darko Cerdic
  • 953
  • 1
  • 7
  • 15