harrah/xsbt — pull request #252 by indrajitr (2011-11-02 16:06:16+00:00)
Title: Enable Javadoc generation in `doc` task

* `docSetting` is now updated to do `Javadoc` in addition to `Scaladoc`. In hybrid project, the outputs are rebased to `scala` or `java` sub-directory but for pure scala or pure java projects, the subdirectory isn't added. This helps retain compatibility as much as possible. I would have liked to tuck them behind some sort of `Doc.apply(...)(...)` but kept it as-is to avoid breaking change (at least at this level).

* Taking cue from `compileInputsTask`, the maxErrors is currently set to 100 to avert the 9 argument cap. Going forward, I wonder if we can re-use `compileInputs` instead - similar to the way it was in (now deprecated)
docTask. We can then simplify `docSetting` by reusing `compileInputs in (Compile, doc)`

* Related to that, what would be your recommendation to deal with the 9 argument cap? Bringing in intermediate keys might be against the overall intention of reusing existing keys in right scope as much as possible. For consistency, I wanted to find and apply the approach from another `Setting` or `Task` where this was needed – but couldn't find one by casual 'eyeballing'.

* Is it necessary to have `fullClasspath <<= dependencyClasspath`? Can't we just use `dependencyClasspath` instead?

* Also maxErrors isn't used currently for javadoc since it is along the lines of javac (which doesn't use `xsbti.Reporter` either. I have kept is there just in case it's put to use later on.

* Doc.scala has some duplicated currently. This is mostly to preserve the signature of `Scaladoc`. At some later major version (maybe 0.12) this can be restructred a bit. Unless, of course, if you have other
thing in mind.

This is a draft version to start the conversation. As usual, looking forward to suggestions and feedback (and modifying the patch accordingly).

NB: You get to see three commits for this pull request. I suspect, you'll have to apply #248 and #249 to remove the other commits from showing up here.