开发者

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

开发者 https://www.devze.com 2023-01-01 08:38 出处:网络
Closed. This quest开发者_如何学编程ion is opinion-based. It is not currently accepting answers.
Closed. This quest开发者_如何学编程ion is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 4 years ago.

Improve this question

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


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.


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.


No it is not necessary


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.


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.


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.


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.


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

No

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号