Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent generating all javadoc files when there is only some changes

I'm using JAutodoc for auto commenting java files in eclipse neon 2. I have created javadoc file by using :

enter image description here

Then i change some java files and generate javadoc again. When i check git repo, i observe "all doc" is modified instead of only changed files.

The problem is that javadoc generates all files and i want javadoc to generate only changed java files.

Is there any way to do this?

like image 289
Süleyman K Avatar asked Nov 09 '22 03:11

Süleyman K


1 Answers

javadoc will regenerate all documents regardless of whether source files have changed. Given specific arguments, javadoc processing can be restricted to a select set of files either by package name and/or file/pathname, but not by file conditions (i.e. has/has not changed, timestamps, etc.). You can find out more about controlling javadoc by reviewing javadoc - The Java API Documentation Generator.

While it is possible to create scripts that limit javadoc processing to changed files only, it is not recommended. Consider a class that has moved to a different package. Running javadoc on that .java file alone would not update references to that class in other parts (e.g. package summaries, @link references).

Since Javadocs are artifacts normally generated from source code, tracking them in your repository has no benefit, as far as revision control is concerned. You could just exclude them via .gitignore (once you have removed them with git rm).

like image 50
Frelling Avatar answered Nov 14 '22 21:11

Frelling