英文:
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:
<!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">
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?
专注分享java语言的经验与见解,让所有开发者获益!
评论