Repository: maven
Updated Branches:
  refs/heads/slf4j-log4j2.5 [created] ae041d789


MNG-3507: Package and configure log4J 2.5 by default.
Note: Replace the content of conf/logging/log4j2.xml by the one from 
conf/logging/log4j2-color.xml to enjoy the colorised console


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/ad363fe7
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/ad363fe7
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/ad363fe7

Branch: refs/heads/slf4j-log4j2.5
Commit: ad363fe72dc5426928994b336c80681869c3adf1
Parents: bb52d85
Author: Arnaud Héritier <aherit...@apache.org>
Authored: Wed Apr 1 02:16:56 2015 +0200
Committer: Arnaud Héritier <aherit...@apache.org>
Committed: Thu Jan 7 11:08:12 2016 +0100

----------------------------------------------------------------------
 apache-maven/pom.xml                            | 12 +++++--
 apache-maven/src/conf/logging/log4j2-color.xml  | 36 ++++++++++++++++++++
 apache-maven/src/conf/logging/log4j2.xml        | 36 ++++++++++++++++++++
 .../maven/slf4j-configuration.properties        |  2 +-
 pom.xml                                         | 23 +++++++++++--
 5 files changed, 103 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/ad363fe7/apache-maven/pom.xml
----------------------------------------------------------------------
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index 3958883..15359f4 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -88,8 +88,16 @@
       <artifactId>aether-transport-wagon</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.fusesource.jansi</groupId>
+      <artifactId>jansi</artifactId>
     </dependency>
   </dependencies>
 

http://git-wip-us.apache.org/repos/asf/maven/blob/ad363fe7/apache-maven/src/conf/logging/log4j2-color.xml
----------------------------------------------------------------------
diff --git a/apache-maven/src/conf/logging/log4j2-color.xml 
b/apache-maven/src/conf/logging/log4j2-color.xml
new file mode 100644
index 0000000..bea1e76
--- /dev/null
+++ b/apache-maven/src/conf/logging/log4j2-color.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+
+<configuration>
+  <properties>
+     <property name="maven.logging.root.level">INFO</property>
+  </properties>
+  <appenders>
+    <Console name="console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%highlight{[%p{WARN=WARNING}]} %msg%n%throwable" 
/>
+    </Console>
+  </appenders>
+  <loggers>
+    <root level="${sys:maven.logging.root.level}">
+      <appender-ref ref="console"/>
+    </root>
+  </loggers>
+</configuration>

http://git-wip-us.apache.org/repos/asf/maven/blob/ad363fe7/apache-maven/src/conf/logging/log4j2.xml
----------------------------------------------------------------------
diff --git a/apache-maven/src/conf/logging/log4j2.xml 
b/apache-maven/src/conf/logging/log4j2.xml
new file mode 100644
index 0000000..6635597
--- /dev/null
+++ b/apache-maven/src/conf/logging/log4j2.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+
+<configuration> <!--status="debug"-->
+  <properties>
+     <property name="maven.logging.root.level">INFO</property>
+  </properties>
+  <appenders>
+    <Console name="console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%p{WARN=WARNING}] %msg%n%throwable"/>
+    </Console>
+  </appenders>
+  <loggers>
+    <root level="${sys:maven.logging.root.level}">
+      <appender-ref ref="console"/>
+    </root>
+  </loggers>
+</configuration>

http://git-wip-us.apache.org/repos/asf/maven/blob/ad363fe7/maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties
----------------------------------------------------------------------
diff --git 
a/maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties
 
b/maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties
index 8741836..cd01f9e 100644
--- 
a/maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties
+++ 
b/maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties
@@ -18,5 +18,5 @@
 # key = Slf4j effective logger factory implementation
 # value = corresponding o.a.m.cli.logging.Slf4jConfiguration class
 org.slf4j.impl.SimpleLoggerFactory 
org.apache.maven.cli.logging.impl.Slf4jSimpleConfiguration
-org.slf4j.helpers.Log4jLoggerFactory 
org.apache.maven.cli.logging.impl.Log4j2Configuration
+org.apache.logging.slf4j.Log4jLoggerFactory 
org.apache.maven.cli.logging.impl.Log4j2Configuration
 ch.qos.logback.classic.LoggerContext 
org.apache.maven.cli.logging.impl.LogbackConfiguration

http://git-wip-us.apache.org/repos/asf/maven/blob/ad363fe7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7d44da6..fdca4e2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,6 +63,9 @@
     <jxpathVersion>1.3</jxpathVersion>
     <aetherVersion>1.0.2.v20150114</aetherVersion>
     <slf4jVersion>1.7.5</slf4jVersion>
+    <log4j2Version>2.5</log4j2Version>
+    <logbackVersion>1.0.7</logbackVersion>
+    <jansiVersion>1.11</jansiVersion>
     
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
     <!-- Control the name of the distribution and information output by mvn -->
     <distributionId>apache-maven</distributionId>
@@ -266,6 +269,7 @@
         <artifactId>plexus-interpolation</artifactId>
         <version>${plexusInterpolationVersion}</version>
       </dependency>
+      <!-- Logging -->
       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
@@ -275,13 +279,26 @@
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-simple</artifactId>
         <version>${slf4jVersion}</version>
-        <optional>true</optional>
       </dependency>
       <dependency>
         <groupId>ch.qos.logback</groupId>
         <artifactId>logback-classic</artifactId>
-        <version>1.0.7</version>
-        <optional>true</optional>
+        <version>${logbackVersion}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.logging.log4j</groupId>
+        <artifactId>log4j-slf4j-impl</artifactId>
+        <version>${log4j2Version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.logging.log4j</groupId>
+        <artifactId>log4j-core</artifactId>
+        <version>${log4j2Version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.fusesource.jansi</groupId>
+        <artifactId>jansi</artifactId>
+        <version>${jansiVersion}</version>
       </dependency>
       <!--  Wagon -->
       <dependency>

Reply via email to