Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate javadoc-style documentation for Scala-only project in sbt?

Tags:

java

scala

sbt

I have a Scala project under sbt. I'd like to generate a javadoc for it as most of the users of the project API are Java developers. Is this possible?

like image 742
Sriram Subramanian Avatar asked Jun 29 '13 22:06

Sriram Subramanian


People also ask

How can you generate Javadoc documentation for your code?

Step 1 − Open eclipse, select the option Project →Generate Javadoc. Step 2 − Select the javadoc.exe file from the bin folder of java installation directory, select the destination folder for the generated java doc and select Next. finish button.

How do I create an automatic Javadoc?

In the Package Explorer view, select a Java project and click Project > Generate Javadoc with Diagrams > Automatically. In the Generate Javadoc wizard, under Javadoc command, select the Javadoc command (an executable file).

How do I export a Javadoc?

In Eclipse, go to File > Export. Expand Java and select Javadoc. Then click Next. Select your project and package.

What is Javadoc generator?

JavaDoc tool is a document generator tool in Java programming language for generating standard documentation in HTML format. It generates API documentation. It parses the declarations ad documentation in a set of source file describing classes, methods, constructors, and fields.


1 Answers

I assume that you want your docs in JavaDoc format in order to have something familiar to people that are used to java libraries?

There is a project from typesafe called GenJavaDoc that might be what you are looking for. It generates docs for a scala library in a format that is very similar to javadoc. It can be integrated into an sbt build.

Akka has a very complete java api, and many of the users of Akka come from the java world, so obviously they have a need for this.

The project repository

Akka japi docs generated by the tool

Blog post by Roland Kuhn describing the tool and the rationale

like image 88
Rüdiger Klaehn Avatar answered Oct 04 '22 17:10

Rüdiger Klaehn