From e598bdefe1a46818fe9a7be8dd1fd73cbe011eb2 Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Sun, 14 Aug 2022 14:22:07 +0200 Subject: [PATCH] [MPH-162] Allow all mojos to be configured to produce repeatable output --- .../org/apache/maven/plugins/help/ActiveProfilesMojo.java | 7 ++----- .../java/org/apache/maven/plugins/help/SystemMojo.java | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/help/ActiveProfilesMojo.java b/src/main/java/org/apache/maven/plugins/help/ActiveProfilesMojo.java index 326ee9c0..4d5735e7 100644 --- a/src/main/java/org/apache/maven/plugins/help/ActiveProfilesMojo.java +++ b/src/main/java/org/apache/maven/plugins/help/ActiveProfilesMojo.java @@ -23,7 +23,6 @@ import java.util.List; import java.util.Map; -import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; @@ -67,11 +66,9 @@ public void execute() if ( output != null ) { - String formattedDateTime = DateFormatUtils.ISO_8601_EXTENDED_DATETIME_TIME_ZONE_FORMAT - .format( System.currentTimeMillis() ); StringBuilder sb = new StringBuilder(); - sb.append( "Created by: " ).append( getClass().getName() ).append( LS ); - sb.append( "Created on: " ).append( formattedDateTime ).append( LS ).append( LS ); + sb.append( "Generated by Maven Help Plugin" ).append( LS ); + sb.append( "See: https://maven.apache.org/plugins/maven-help-plugin/" ).append( LS ).append( LS ); sb.append( message.toString() ); try diff --git a/src/main/java/org/apache/maven/plugins/help/SystemMojo.java b/src/main/java/org/apache/maven/plugins/help/SystemMojo.java index 85973e91..722cea73 100644 --- a/src/main/java/org/apache/maven/plugins/help/SystemMojo.java +++ b/src/main/java/org/apache/maven/plugins/help/SystemMojo.java @@ -19,7 +19,6 @@ * under the License. */ -import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.Mojo; import org.codehaus.plexus.util.StringUtils; @@ -92,11 +91,9 @@ public void execute() if ( output != null ) { - String formattedDateTime = DateFormatUtils.ISO_8601_EXTENDED_DATETIME_TIME_ZONE_FORMAT - .format( System.currentTimeMillis() ); StringBuilder sb = new StringBuilder(); - sb.append( "Created by: " ).append( getClass().getName() ).append( LS ); - sb.append( "Created on: " ).append( formattedDateTime ).append( LS ).append( LS ); + sb.append( "Generated by Maven Help Plugin" ).append( LS ); + sb.append( "See: https://maven.apache.org/plugins/maven-help-plugin/" ).append( LS ).append( LS ); sb.append( message.toString() ); try