删除评论"由< date>生成的Javadoc> <时间>"在生成的Javadoc中 [英] Remove the comment "Generated by Javadoc on <date> <time>" in generated Javadoc
问题描述
javadoc命令会自动插入一条注释,内容如下:
<! - 由javadoc生成(build 1.6。 0_17)于Thu Apr 07 18:32:31 CEST 2011 - >
在每个生成的HTML文件中。
这样做可以防止对版本化的javadoc进行更改跟踪,因为在重新生成doc时,每个文件都会被修改。前面的问题让我确信不要版本任何javadoc,但是它也提出了这个问题,问题依然存在:有没有办法摆脱这个评论?我没有在javadoc选项中找到这种可能性的踪迹。
感谢JackMc的评论,我发现命令行参数 -notimestamp
。它可以工作(至少在我的1.6.0_20这里)。
如果使用ant,您必须将它添加到< javadoc> ; 任务使用
< arg value = - notimestamp/>
嵌套元素或 additionalparam = -notimestamp
属性。
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.
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..)
这篇关于删除评论"由< date>生成的Javadoc> <时间>"在生成的Javadoc中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!