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 2020/10/18 18:37:33 UTC

[maven] branch MNG-6931 updated (9d93981 -> 0321b9d)

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

michaelo pushed a change to branch MNG-6931
in repository https://gitbox.apache.org/repos/asf/maven.git.


    omit 9d93981  [MNG-6931] Deprecate DefaultLog
     new 0321b9d  [MNG-6931] Deprecate custom logging approach

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (9d93981)
            \
             N -- N -- N   refs/heads/MNG-6931 (0321b9d)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/java/org/apache/maven/plugin/logging/Log.java           | 5 ++++-
 .../main/java/org/apache/maven/plugin/logging/SystemStreamLog.java   | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)


[maven] 01/01: [MNG-6931] Deprecate custom logging approach

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 0321b9d02655bc4458213ee7e57d3d62ca07f608
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Oct 18 20:06:04 2020 +0200

    [MNG-6931] Deprecate custom logging approach
    
    This closes #385
---
 .../main/java/org/apache/maven/monitor/logging/DefaultLog.java |  5 ++++-
 .../src/main/java/org/apache/maven/plugin/AbstractMojo.java    | 10 ++++++++--
 .../src/main/java/org/apache/maven/plugin/Mojo.java            |  9 ++++++---
 .../src/main/java/org/apache/maven/plugin/logging/Log.java     |  5 ++++-
 .../java/org/apache/maven/plugin/logging/SystemStreamLog.java  |  5 ++++-
 5 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/maven-plugin-api/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java b/maven-plugin-api/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java
index 4fee2e2..1ed64ec 100644
--- a/maven-plugin-api/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java
+++ b/maven-plugin-api/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java
@@ -24,7 +24,10 @@ import org.codehaus.plexus.logging.Logger;
 
 /**
  * @author jdcasey
+ *
+ * @deprecated Use SLF4J directly
  */
+@Deprecated
 public class DefaultLog
     implements Log
 {
@@ -128,4 +131,4 @@ public class DefaultLog
         return logger.isErrorEnabled();
     }
 
-}
\ No newline at end of file
+}
diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java
index 1a78549..4042f84 100644
--- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java
+++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java
@@ -128,9 +128,9 @@ import org.apache.maven.plugin.logging.SystemStreamLog;
  *      </td>
  *   </tr>
  * </table>
- * <p>This is only a small set of all the options. A complete list can be found at 
+ * <p>This is only a small set of all the options. A complete list can be found at
  * <a href="https://maven.apache.org/components/plugin-tools/maven-plugin-tools-annotations/index.html" target="_blank">
- * Maven Plugin Tool for Annotations</a>. 
+ * Maven Plugin Tool for Annotations</a>.
  *
  * @see <a href="https://maven.apache.org/guides/plugin/guide-java-plugin-development.html" target="_blank">Guide to Developing Java Plugins</a>
  * @see <a href="https://maven.apache.org/guides/mini/guide-configuring-plugins.html" target="_blank">Guide to Configuring Plug-ins</a>
@@ -149,6 +149,10 @@ public abstract class AbstractMojo
     /** Plugin container context */
     private Map pluginContext;
 
+    /**
+     * @deprecated Use SLF4J directly
+     */
+    @Deprecated
     @Override
     public void setLog( Log log )
     {
@@ -167,7 +171,9 @@ public abstract class AbstractMojo
      * method directly whenever you need the logger, it is fast enough and needs no caching.
      *
      * @see org.apache.maven.plugin.Mojo#getLog()
+     * @deprecated Use SLF4J directly
      */
+    @Deprecated
     @Override
     public Log getLog()
     {
diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/Mojo.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/Mojo.java
index 7cbef91..0419176 100644
--- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/Mojo.java
+++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/Mojo.java
@@ -54,16 +54,19 @@ public interface Mojo
      * and feedback to the user.
      *
      * @param log a new logger
+     *
+     * @deprecated Use SLF4J directly
      */
-    // TODO not sure about this here, and may want a getLog on here as well/instead
+    @Deprecated
     void setLog( Log log );
 
     /**
      * Furnish access to the standard Maven logging mechanism which is managed in this base class.
      *
      * @return a log4j-like logger object which allows plugins to create messages at levels of <code>"debug"</code>,
-     * <code>"info"</code>, <code>"warn"</code>, and <code>"error"</code>. This logger is the accepted means to display
-     * information to the user.
+     * <code>"info"</code>, <code>"warn"</code>, and <code>"error"</code>.
+     * @deprecated Use SLF4J directly
      */
+    @Deprecated
     Log getLog();
 }
diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/Log.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/Log.java
index 0a13bef..04d85bd 100644
--- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/Log.java
+++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/Log.java
@@ -28,7 +28,10 @@ package org.apache.maven.plugin.logging;
  * rather than formatting first by calling <code>toString()</code>.
  *
  * @author jdcasey
+ *
+ * @deprecated Use SLF4J directly
  */
+@Deprecated
 public interface Log
 {
     /**
@@ -146,4 +149,4 @@ public interface Log
      * @param error
      */
     void error( Throwable error );
-}
\ No newline at end of file
+}
diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/SystemStreamLog.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/SystemStreamLog.java
index 38c1316..ead489a 100644
--- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/SystemStreamLog.java
+++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/SystemStreamLog.java
@@ -26,7 +26,10 @@ import java.io.StringWriter;
  * Logger with "standard" output and error output stream.
  *
  * @author jdcasey
+ *
+ * @deprecated Use SLF4J directly
  */
+@Deprecated
 public class SystemStreamLog
     implements Log
 {
@@ -193,4 +196,4 @@ public class SystemStreamLog
 
         System.out.println( "[" + prefix + "] " + content.toString() + "\n\n" + sWriter.toString() );
     }
-}
\ No newline at end of file
+}