From 718bd036eb022c6af7e908ca972f937ec4a9df16 Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Sun, 7 Nov 2021 17:17:51 +0100 Subject: [PATCH] [SCM-972] Deprecate SCM Logger in favor of SLF4J This closes #129 --- .../src/main/java/org/apache/maven/scm/log/DefaultLog.java | 1 + .../main/java/org/apache/maven/scm/log/ScmLogDispatcher.java | 1 + .../src/main/java/org/apache/maven/scm/log/ScmLogger.java | 1 + .../java/org/apache/maven/scm/manager/BasicScmManager.java | 3 ++- .../main/java/org/apache/maven/scm/provider/ScmProvider.java | 1 + .../java/org/apache/maven/scm/manager/plexus/PlexusLogger.java | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/log/DefaultLog.java b/maven-scm-api/src/main/java/org/apache/maven/scm/log/DefaultLog.java index 8bcd1c580..bb81edaf2 100644 --- a/maven-scm-api/src/main/java/org/apache/maven/scm/log/DefaultLog.java +++ b/maven-scm-api/src/main/java/org/apache/maven/scm/log/DefaultLog.java @@ -22,6 +22,7 @@ /** * @author Emmanuel Venisse */ +@Deprecated public class DefaultLog implements ScmLogger { diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/log/ScmLogDispatcher.java b/maven-scm-api/src/main/java/org/apache/maven/scm/log/ScmLogDispatcher.java index 295b35aec..6ef200ef5 100644 --- a/maven-scm-api/src/main/java/org/apache/maven/scm/log/ScmLogDispatcher.java +++ b/maven-scm-api/src/main/java/org/apache/maven/scm/log/ScmLogDispatcher.java @@ -26,6 +26,7 @@ * @author Emmanuel Venisse * */ +@Deprecated public class ScmLogDispatcher implements ScmLogger { diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/log/ScmLogger.java b/maven-scm-api/src/main/java/org/apache/maven/scm/log/ScmLogger.java index fb5103c37..9801fbe06 100644 --- a/maven-scm-api/src/main/java/org/apache/maven/scm/log/ScmLogger.java +++ b/maven-scm-api/src/main/java/org/apache/maven/scm/log/ScmLogger.java @@ -23,6 +23,7 @@ * @author Emmanuel Venisse * */ +@Deprecated public interface ScmLogger { boolean isDebugEnabled(); diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/manager/BasicScmManager.java b/maven-scm-api/src/main/java/org/apache/maven/scm/manager/BasicScmManager.java index 00b2515b8..2af520462 100644 --- a/maven-scm-api/src/main/java/org/apache/maven/scm/manager/BasicScmManager.java +++ b/maven-scm-api/src/main/java/org/apache/maven/scm/manager/BasicScmManager.java @@ -30,8 +30,9 @@ public class BasicScmManager extends AbstractScmManager { /** {@inheritDoc} */ + @Deprecated protected ScmLogger getScmLogger() { return new DefaultLog(); } -} \ No newline at end of file +} diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java b/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java index 54a372557..4643930ad 100644 --- a/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java +++ b/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java @@ -71,6 +71,7 @@ public interface ScmProvider * * @param logger The logger */ + @Deprecated void addListener( ScmLogger logger ); boolean requiresEditMode(); diff --git a/maven-scm-managers/maven-scm-manager-plexus/src/main/java/org/apache/maven/scm/manager/plexus/PlexusLogger.java b/maven-scm-managers/maven-scm-manager-plexus/src/main/java/org/apache/maven/scm/manager/plexus/PlexusLogger.java index 9a0638b32..1d257281d 100644 --- a/maven-scm-managers/maven-scm-manager-plexus/src/main/java/org/apache/maven/scm/manager/plexus/PlexusLogger.java +++ b/maven-scm-managers/maven-scm-manager-plexus/src/main/java/org/apache/maven/scm/manager/plexus/PlexusLogger.java @@ -26,6 +26,7 @@ * @author Emmanuel Venisse * */ +@Deprecated public class PlexusLogger implements ScmLogger {