Javadoc support

82 views
Skip to first unread message

Indrajit Raychaudhuri

unread,
Oct 28, 2011, 3:25:26 AM10/28/11
to simple-b...@googlegroups.com
Hi SBTers,

Turns out Javadoc support in SBT would be a nice incentive for pure Java (or Java/Scala) hybrid projects to consider SBT. Now we can take either of the two approaches here:

* Have a javadoc plugin to do the needful. I am hoping this should work out just fine. However, the project has to explicitly introduce a plugin to get going.

* Have built-in support for Javadoc. This should work out just fine too with the added benefit that 'it just works' out of the box without any extra steps like above. This also brings java doc generation at par with it's scala counterpart.

Either way, we obviously have to be able to adjust `docSettings` so that `doc` task can deal with both javadoc and scaladoc. The issue here would be finding the right config point for specifying `target in doc` since they would have to be different for scaladoc and javadoc (unlike `target in compile` which are identical).

Thoughts?

- Indrajit


Mark Harrah

unread,
Oct 29, 2011, 3:15:05 PM10/29/11
to simple-b...@googlegroups.com
Hey Indrajit,

On Fri, 28 Oct 2011 12:55:26 +0530
Indrajit Raychaudhuri <indr...@gmail.com> wrote:

> Hi SBTers,
>
> Turns out Javadoc support in SBT would be a nice incentive for pure Java (or Java/Scala) hybrid projects to consider SBT. Now we can take either of the two approaches here:
>
> * Have a javadoc plugin to do the needful. I am hoping this should work out just fine. However, the project has to explicitly introduce a plugin to get going.
>
> * Have built-in support for Javadoc. This should work out just fine too with the added benefit that 'it just works' out of the box without any extra steps like above. This also brings java doc generation at par with it's scala counterpart.

I think having javadoc built-in is in line with sbt's built-in support for javac/scalac.

> Either way, we obviously have to be able to adjust `docSettings` so that `doc` task can deal with both javadoc and scaladoc. The issue here would be finding the right config point for specifying `target in doc` since they would have to be different for scaladoc and javadoc (unlike `target in compile` which are identical).

One way would be to take 'target in doc' and append scala/ or java/ as appropriate. Another way is to only run javadoc for pure Java projects. A problem is that scaladoc generates docs for Java sources, but without processing the javadoc comments. If scaladoc processed comments for Java sources, that solution would be more viable.

-Mark

> Thoughts?
>
> - Indrajit
>
>

Indrajit Raychaudhuri

unread,
Oct 30, 2011, 9:39:23 AM10/30/11
to simple-b...@googlegroups.com
Hi Mark,

Yes, scaladoc's approach is less than ideal. But the more pertinent use case from java dev's point of view is to see the classic (ugly but arguably more functional) javadoc in action. This serves pure Java projects straightaway and hybrid projects on a 'best effort basis' :)

- Indrajit

>
> -Mark
>
>> Thoughts?
>>
>> - Indrajit
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
> To post to this group, send email to simple-b...@googlegroups.com.
> To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.
>

Seth Tisue

unread,
Oct 31, 2011, 2:48:05 PM10/31/11
to simple-b...@googlegroups.com
On Sat, Oct 29, 2011 at 3:15 PM, Mark Harrah <dmha...@gmail.com> wrote:
> One way would be to take 'target in doc' and append scala/ or java/ as appropriate.  Another way is to only run javadoc for pure Java projects.  A problem is that scaladoc generates docs for Java sources, but without processing the javadoc comments.  If scaladoc processed comments for Java sources, that solution would be more viable.

I keep hoping an angel will fly down from heaven and make Scaladoc
process comments in Java sources.

If anybody wants to go vote for it, the ticket is here:
https://issues.scala-lang.org/browse/SI-4826

--
Seth Tisue | Northwestern University | http://tisue.net
lead developer, NetLogo: http://ccl.northwestern.edu/netlogo/

Reply all
Reply to author
Forward
0 new messages