You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/05/01 18:32:07 UTC

[GitHub] [maven-javadoc-plugin] michael-o commented on a change in pull request #67: [MJAVADOC-619] Maven Javadoc bottom claims copyright for future years

michael-o commented on a change in pull request #67:
URL: https://github.com/apache/maven-javadoc-plugin/pull/67#discussion_r624547577



##########
File path: src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
##########
@@ -2954,8 +2959,18 @@ private void populateCompileArtifactMap( Map<String, Artifact> compileArtifactMa
      */
     private String getBottomText()
     {
-        int currentYear = Calendar.getInstance().get( Calendar.YEAR );
-        String year = String.valueOf( currentYear );
+        final String year;
+        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" );

Review comment:
       Since when did this plugin jump on Java 8?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org