可以配置maven-javadoc-plugin,不包含生成日期吗?

huangapple 未分类评论48阅读模式
英文:

Possible to configure maven-javadoc-plugin NOT to include the generation date?

问题

我正在使用maven-javadoc-plugin在构建项目时重新生成Javadocs。这些Javadocs生成到Maven项目的/docs目录,以便API文档可以作为Github Pages站点提供。一个让人烦恼的问题是,每次重新构建项目(例如,mvn clean install),Javadoc都会更新HTML页面,包括生成日期,例如下面的第5和第8行:

<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (13.0.2) on Fri May 29 15:18:24 EDT 2020 -->
<title>Uses of Class [my class] ([project] [version] API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2020-05-29">

这意味着几乎每次进行任何微小更改时,我都必须更新整个/docs目录以进行版本控制。这可能会使其他人在查看git历史时变得更加困难,因为所有这些Javadoc更改会淹没了实际代码更改。

是否有一种方法可以抑制生成日期的包含,以便只有实际内容更改的Javadoc文件会被更改?

英文:

I'm using the maven-javadoc-plugin to rebuild Javadocs every time I build my project. These are built to the Maven project's /docs directory so the API documentation can be served up as a Github Pages site. One annoyance is that every time the project is re-built (e.g., mvn clean install), the HTML pages are updated by Javadoc with the generation date, for example lines 5 and 8 below:

&lt;!DOCTYPE HTML&gt;
&lt;!-- NewPage --&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
&lt;!-- Generated by javadoc (13.0.2) on Fri May 29 15:18:24 EDT 2020 --&gt;
&lt;title&gt;Uses of Class [my class] ([project] [version] API)&lt;/title&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
&lt;meta name=&quot;dc.created&quot; content=&quot;2020-05-29&quot;&gt;

That means for virtually every change no matter how minor, I'm obligated to update the entire /docs directory in version control. This could make it harder for others to navigate the git history as all these javadoc changes swamp the real changes to code.

Is there a way to suppress the inclusion of generation dates, so that the only changed Javadoc files will be the ones with actual changes to content?

huangapple
  • 本文由 发表于 2020年5月30日 03:30:46
  • 转载请务必保留本文链接:https://java.coder-hub.com/62093397.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定