You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/08/14 12:23:31 UTC

[maven-help-plugin] branch master updated: [MPH-162] Allow all mojos to be configured to produce repeatable output

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-help-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new e598bde  [MPH-162] Allow all mojos to be configured to produce repeatable output
e598bde is described below

commit e598bdefe1a46818fe9a7be8dd1fd73cbe011eb2
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Aug 14 14:22:07 2022 +0200

    [MPH-162] Allow all mojos to be configured to produce repeatable output
---
 .../java/org/apache/maven/plugins/help/ActiveProfilesMojo.java     | 7 ++-----
 src/main/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 326ee9c..4d5735e 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.io.IOException;
 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 class ActiveProfilesMojo
 
         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 85973e9..722cea7 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 @@ package org.apache.maven.plugins.help;
  * 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 class SystemMojo
 
         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