10

SBT で Scaladoc を構成しようとしています。具体的には、タイトル、出力ディレクトリ、およびクラスパスです。

build.sbt に以下を追加して、タイトルを定義することができました。

scalacOptions in (Compile, doc) ++= Opts.doc.title("Scala-Tools")

ドキュメント出力ディレクトリを変更する方法がわかりません。

クラスパスにjarを追加する方法もわかりません。クラスパスを編集したい理由は、標準の Scala ライブラリがそのクラスを参照するときに scaladoc によって取得されていないように見えるためです。つまり、[[scala.Option]] は「リンクするメンバーが見つかりませんでした」という警告につながります。 「scala.Option」の場合。

SBT構成の例の形であっても、助けていただければ幸いです!

Scala 2.10-RC3 と SBT 0.12.1 を使用しています。

4

1 に答える 1

6

The Scala library is on the classpath, otherwise scaladoc would bail out with an error pretty quickly. The warning you see means that scaladoc doesn't know how to link to Option. For this, you need to use either the -external-urls option or the -doc-external-doc option coming in 2.10.1. The output of scaladoc -help for the upcoming 2.10.1 shows:

-doc-external-doc:<external-doc>  comma-separated list of classpath_entry_path#doc_URL pairs describing external dependencies.
-external-urls:<externalUrl(s)>   (deprecated) comma-separated list of package_names=doc_URL for external dependencies, where package names are ':'-separated

The solution until 2.10.1 is out is to use -external-uris:

-external-urls:scala=http://www.scala-lang.org/archives/downloads/distrib/files/nightly/docs/library/
于 2012-12-12T03:10:11.410 に答える