views:

122

answers:

8

Is it necessary to generate javadoc as part of build process?

+1  A: 

No it is not necessary

Jacob
+12  A: 

Well there's nothing really forcing you to do it, but if you want to distribute your build artifacts as a usable library it certainly helps to have well-written Javadocs that people can browse before they even download your JAR.

jasonmp85
+3  A: 

No. What you choose to do in a build process is up to you (or the customer). Some build systems may include JavaDoc generation by default, but it should be simple to disable.

David Antaramian
+1  A: 

You don't mention if this is a build for, say, a web app, or for a library for distribution. As other repliers have mentioned, it's not truly necessary, but for both an internally-maintained web app and an externally-distributed library, documentation (in the form of javadoc) will be extremely useful.

dplass
A: 

If your build process uses Ant, I'd say that it may not be necessary, but doing it shouldn't be a hardship at all. You simply use the javadoc task, generate it, and be done with it.

duffymo
+1  A: 

Not at all.

If most users of your code directly access the Java files and use an IDE, then they are already probably reading their JavaDocs via the hovers in the code editor. That may be more up-to-date than the version that is checked-in or that is getting built (unless you have continuous builds).

If you expose interim versions to clients (E.g., you're an open source project), then providing JavaDocs rather than just class files further binds you to specific semantics. It makes sense to provide stricter control about your API and your JavaDocs essentially describe your API.

If you don't want anyone external using your public interfaces (e.g., you keep them open to future plug-ins), you can't prevent it, but you can certainly avoid encouraging it by providing JavaDocs.

Uri
A: 

You decide if it's necessary or not. Personally, I don't generate javadoc and other heavy reports (which are a bit expensive to generate) at each build, I want to keep the build run on developer machines and by the continuous integration engine as fast as possible (the continuous integration engine builds and publishes source jars though). Reports generation is done during the nightly build.

Pascal Thivent
+1  A: 

Is it necessary to generate javadoc as part of build process?

No

fastcodejava