I want links to source in my project. My project<https://github.com/mslinn/hanuman> only
has build.sbt in the top directory. I don't want a whole lot of SBT code,
so I just tried the following:
1) Created project/build.scala and put the following in it:
scalacOptions in (Compile, doc) <++= (baseDirectory in
LocalProject("hanuman")).map {
bd => Seq("-sourcepath", bd.getAbsolutePath,
"-doc-source-url",
"https://github.com/mslinn/hanumanâ¬{FILE_PATH}.scala")
}
(no idea what the Euro symbol in the 3rd line does, just copied it from the
example).
2) Ran sbt doc:
$ sbt doc
[info] Loading global plugins from C:\Users\Mike Slinn\.sbt\plugins
[info] Loading project definition from E:\work\hanuman\project
[info] Compiling 1 Scala source to
E:\work\hanuman\project\target\scala-2.9.1\sbt-0.11.2\classes...
[error] IO error while decoding E:\work\hanuman\project\build.scala with
UTF-8
[error] Please try specifying another one using the -encoding option
[error] one error found
[error] {file:/E:/work/hanuman/project/}default-5e0f21/compile:compile:
Compilation failed
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
3) I removed the Euro symbol and retried:
$ sbt doc
[info] Loading global plugins from C:\Users\Mike Slinn\.sbt\plugins
[info] Loading project definition from E:\work\hanuman\project
[info] Compiling 1 Scala source to E:\work\hanuman
\project\target\scala-2.9.1\sbt-0.11.2\classes...
[error] E:\work\hanuman\project\build.scala:1: expected class or object
definition
[error] scalacOptions in (Compile, doc) <++= (baseDirectory in
LocalProject(" hanuman ")).map {
[error] ^
[error] one error found
[error] {file:/E:/work/hanuman/project/}default-5e0f21/compile:compile:
Compilation failed
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
4) I put the code into project/build.sbt instead and got the same error.
Is there a way to do this without getting into a whole lot of code?
Mike