diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/Slf4jSimpleConfiguration.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/Slf4jSimpleConfiguration.java
index 6a7f38518e..402d56220d 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/Slf4jSimpleConfiguration.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/Slf4jSimpleConfiguration.java
@@ -58,5 +58,20 @@ public class Slf4jSimpleConfiguration
// property for root logger level or System.out redirection need to be taken into account
MavenSlf4jFriend.reset();
MavenSlf4jSimpleFriend.init();
+
+ try
+ {
+ org.slf4j.ILoggerFactory loggerFactory = org.slf4j.LoggerFactory.getILoggerFactory();
+ synchronized ( loggerFactory )
+ {
+ java.lang.reflect.Field loggerMap = loggerFactory.getClass().getDeclaredField( "loggerMap" );
+ loggerMap.setAccessible( true );
+ ( (java.util.Map) loggerMap.get( loggerFactory ) ).clear();
+ }
+ }
+ catch ( Exception e )
+ {
+ // ignore for now...
+ }
}
}
diff --git a/maven-embedder/src/main/java/org/slf4j/impl/MavenSlf4jSimpleFriend.java b/maven-embedder/src/main/java/org/slf4j/impl/MavenSlf4jSimpleFriend.java
index 097ad68879..3299fc86ba 100644
--- a/maven-embedder/src/main/java/org/slf4j/impl/MavenSlf4jSimpleFriend.java
+++ b/maven-embedder/src/main/java/org/slf4j/impl/MavenSlf4jSimpleFriend.java
@@ -28,5 +28,6 @@ public class MavenSlf4jSimpleFriend
public static void init()
{
SimpleLogger.init();
+ SimpleLoggerFactory.INSTANCE.reset();
}
}
diff --git a/pom.xml b/pom.xml
index aab1179aa4..7da7becc80 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,7 +59,7 @@
1.7
1.3
1.13.1
- 1.7.2
+ 1.7.4
true
apache-maven