3

I'd love some advice on how best to autogenerate documentation for a mixed Java/Scala project. We're using Scala 2.8; it seems the scaladoc tool that ships with 2.8.1 does not generate usable documentation for our Java classes -- it gets the structure right, but does not include the documentation. And javadoc obviously only covers the Java part.

We looked at Doxygen, but it doesn't work with Scala out of the box, so that's a bit of a research project.

How can we do this short of going 100% Java or 100% Scala?

Thanks!

  • I've same problem in a project. At the moment my solution looks like that I've written all the **important** classes in Scala (that are the classes that need documentation). Also, I used a `*.scala` filter for Scaladoc, so I let off the Java classes (in the docu). For a while I had the idea (not implemented) to mix the documentation generated by Javadoc and Scaladoc. But even when adjusting the CSS's then you mix two different looking documentation styles. – binuWADa Dec 04 '11 at 13:35
  • Does your project have Scala and Java really mixed in the same packages, or splitted into different packages? In the latter case, generating two documentations and cross-referencing them might work. – Paŭlo Ebermann Dec 04 '11 at 16:04
  • @PaŭloEbermann: In fact it's so that most packages are written in one language only. But I also have the mixed case. This arises mostly from a former Java package. Then gradually I migrate it to Scala whereas adjusting functionality. Then sometimes remain separate Java classes in a package full of Scala code. But as mentioned above, I simply leave these files away in the documentation. – binuWADa Dec 04 '11 at 21:16
  • We have both in the same package. We started out writing public interfaces in Java for guaranteed compatibility with Java, but over time it's been harder to keep all the public code pure Java. – Eric Bowman - abstracto - Dec 05 '11 at 10:46

1 Answers1

2

Play Framework generates scaladoc for its Scala classes and javadoc for its Java classes. See generateAPIDocsTask: https://github.com/playframework/Play20/blob/master/framework/project/Build.scala

Ben McCann
  • 18,548
  • 25
  • 83
  • 101
  • 1
    This doesn't really answer the question; The OP is using play 1.2.x, and that link is for play 2.0, which has a completely different build system. – Jay Taylor Apr 09 '12 at 18:44