Posts mit dem Label scaladoc werden angezeigt. Alle Posts anzeigen
Posts mit dem Label scaladoc werden angezeigt. Alle Posts anzeigen

Sonntag, 21. Juli 2013

Compiling with scaladoc for stupid people (includes me)

Since I had some problems compiling my documentation with scaladoc, here is a short description of how to use it (in Linux).

A lot of my problems probably arose from the fact that I use the scala Eclipse plugin and never had to compile something more complicated with scalac.

Example:
src/ contains the source code files
javacvcppjars/ and breeze/ contains some libraries in .jar form

My call to scaladoc:
scaladoc -d doc -cp javacvcppjars/javacv.jar:javacvcppjars/javacpp.jar:javacvcppjars/javacv-linux-x86_64.jar:javacvcppjars/ffmpeg-1.2-linux-x86_64.jar:javacvcppjars/opencv-2.4.5-linux-x86_64.jar:breeze/breeze-learn-assembly-0.4-SNAPSHOT.jar $(find src/ -name *.scala) 
-d doc ... Tells scaladoc to put the documentation in a new directory named doc

-cp ... Colon separated list of all used libraries

$(find src/ -name *.scala) ... Will be replaced by a white space separated list of all .scala file names in src and all its sub directories. You could also manually list all source code files here separated by a space.

So in the end it is all pretty obvious. If you know how to compile scala or java without an IDE ;)