This is an automated email from the ASF dual-hosted git repository. rfscholte pushed a commit to branch MJAVADOC-619 in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git
The following commit(s) were added to refs/heads/MJAVADOC-619 by this push: new a4dbef2 Ensure log contains actually used property a4dbef2 is described below commit a4dbef2cc56e7a0d43b14aad8471a411ac9c547d Author: rfscholte <rfscho...@apache.org> AuthorDate: Fri May 7 11:33:25 2021 +0200 Ensure log contains actually used property --- .../org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java index 303ef4f..058d809 100644 --- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java +++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java @@ -158,6 +158,11 @@ public abstract class AbstractJavadocMojo extends AbstractMojo { /** + * Property with timestamp used for reproducible builds + */ + private static final String PROJECT_BUILD_OUTPUTTIMESTAMP = "project.build.outputTimestamp"; + + /** * Classifier used in the name of the javadoc-options XML file, and in the resources bundle * artifact that gets attached to the project. This one is used for non-test javadocs. * @@ -2960,14 +2965,14 @@ public abstract class AbstractJavadocMojo private String getBottomText() { final String year; - String buildTime = project.getProperties().getProperty( "project.build.outputTimestamp" ); + String buildTime = project.getProperties().getProperty( PROJECT_BUILD_OUTPUTTIMESTAMP ); if ( buildTime != null ) { year = String.valueOf( DateTimeFormatter.ISO_DATE_TIME.parse( buildTime ).get( ChronoField.YEAR ) ); } else { - getLog().debug( "Missing property project.build.outputTimestamp, using current year instead" ); + getLog().debug( "Using current year due to unavailable property '" + PROJECT_BUILD_OUTPUTTIMESTAMP + "'" ); int currentYear = Calendar.getInstance().get( Calendar.YEAR ); year = String.valueOf( currentYear ); }