How to include javadoc in scala code when distributing Jars library?

This question is related to calling scala code from java code.

When I include some scala library (in jar format), return types are often of type scala.collection and other types of scala.

When developing in Java (on Netbeans) using scala libraries, I get the following "error" when trying to view the documentation for scala types.

  Javadoc not found.  Either Javadoc documentation for this item does not
 exist or you have not added specified Javadoc in the Java Platform Manager
 or the Library Manager. 

What is the best way to incorporate javadocs (my code and scala-library) into distributed banks?

+8
java scala javadoc
source share
1 answer

If you are using maven, installing a dependency on Scala should instruct the plugin to pull javadocs (and the source for this question) from the repository. If you are not using maven for dependency management ... Well, you should start now.

By the way, exposing Scala types for Java is not good practice. You must wrap your Scala code in standard Java. This will greatly improve maintainability of the code, since developers using your banks will not have to twist their heads by switching Java to Scala types.

+1
source share

All Articles