Remove the comment “Generated by Javadoc on <date> <time>” in generated Javadoc

此生再无相见时 提交于 2019-12-12 08:22:04

问题


A javadoc command automatically inserts a comment stating something like:

<!-- Generated by javadoc (build 1.6.0_17) on Thu Apr 07 18:32:31 CEST 2011 -->

in every generated HTML file.

This is quite preventing change tracking for versioned javadoc, since every file will be modified when regenerating the doc.

A previous question I asked convince me not to version any javadoc, but it also raised this problem and the question remains: is there a way to get rid of this comment? I did not find trace of such possibility in the javadoc options.


回答1:


Thank to JackMc's comment, I found the command line parameter -notimestamp. It works (at least for my 1.6.0_20 here).

If using ant, you'll have to add it to the <javadoc> task using either the <arg value="-notimestamp" /> nested element or an additionalparam="-notimestamp" attribute.

(I just used this for my github-managed JSch documentation..)



来源:https://stackoverflow.com/questions/5613847/remove-the-comment-generated-by-javadoc-on-date-time-in-generated-javadoc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!