RFR: JDK-8272984: javadoc support for reproducible builds

Alan Bateman alanb at openjdk.java.net
Fri Jan 21 08:06:46 UTC 2022


On Fri, 21 Jan 2022 00:11:21 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

> Please review a javadoc update to support a new `--date` option to support reproducible builds.
> 
> This pull request supersedes https://github.com/openjdk/jdk/pull/6905. In that PR, the `SOURCE_DATE_EPOCH` environment variable was used to provide the time stamp, but review feedback suggested the use of a new command-line option, `--date`.  The format of the argument of the `--date` option is that same as that of similar options for the _jar_ and _jmod_ tools, and the code to handle the value is based on code in the _jar_ tool.

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java line 356:

> 354: 
> 355:                 new XOption(resources, "--date", 1) {
> 356:                     // Valid --date range: within a year of now

Adding "--date" looks reasonable and makes it consistent with jar/jmod. I'm just not sure about restricting the date to "within a year of now". I assume projects will use the SOURCE_DATE_EPOCH to create a value for --date so they will run into issues if someone tries to build the project again, in a year.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7171


More information about the javadoc-dev mailing list