这个问题是针对Scala2.12的Scaladoc的。
scaladoc -help吐出了很多行,包括这两行:
Usage: scaladoc <options> <source files>
-sourcepath <path> Specify location(s) of source files.但是,没有提到源文件路径。我假设它们需要与-sourcepath值相关(如果指定的话),但我没有看到-sourcepath有任何影响。例如,每次下面的调用都会产生相同的结果:
scaladoc root/src/test/scala/EtherTest.scala
scaladoc -sourcepath root root/src/test/scala/EtherTest.scala
scaladoc -sourcepath $PWD/root root/src/test/scala/EtherTest.scala这似乎是错误的。我原以为源路径会作为Scala文件路径的前缀,如下所示:
scaladoc -sourcepath root src/test/scala/EtherTest.scala不幸的是,上面的结果是:
error: source file 'src/test/scala/EtherTest.scala' could not be found我遗漏了什么?
发布于 2018-10-17 15:51:20
只要尝试进入src根路径src/test/scala,scaladoc就会找到源代码的正确路径。
完整命令
cd src/test/scala && scaladoc EtherTest.scala
https://stackoverflow.com/questions/47482531
复制相似问题