Blog

March 12, 2013

GenJavaDoc: Generate True JavaDoc for Scala Projects

March 12, 2013
Scala
Akka

The Akka API is offered both for Java and Scala users, and most of it is actually reusing the exact same methods - a feat enabled by Scala's carefully crafted Java interoperability. Until now there has been only one tool which could extract API documentation from Scala sources: ScalaDoc generates very nice and accessible documentation for Scala projects. When it comes to a Java audience this tool has two flaws in that it ignores Java source files and in that the generated output is much richer than and not compatible with JavaDoc output.

Since having proper JavaDoc artifacts is necessary for IDE support and we also do not wish to impose ScalaDoc on Java developers, we developed a Scala compiler plugin which transports the documentation comments from the Scala sources to Java output files such that native JavaDoc can be produced from them. This process has been applied to the Akka documentation, please check it out!

The compiler plugin is published to Maven Central and available under the Apache 2 license, for more information head over to github. We encourage all authors of Scala libraries which are intended to be consumed from Java to try it out and provide us feedback.

By Roland Kuhn, Akka Tech Lead at Typesafe

comments powered by Disqus
Browse Recent Blog Posts