Ported equivalent changes from logback branch.

- Should be the same as the slf4j-logback branch with log4j2 as the backing impl
(Warning LOG4J 2 requires Java 6)


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

Branch: refs/heads/slf4j-log4j2
Commit: d0947c5435a01fdff625de1e7302e48e479c7f1e
Parents: 9f8eabc
Author: Stephen Connolly <stephen.alan.conno...@gmail.com>
Authored: Wed Dec 12 09:31:25 2012 +0000
Committer: Arnaud Héritier <aherit...@apache.org>
Committed: Tue Jul 16 00:50:18 2013 +0200

----------------------------------------------------------------------
 apache-maven/pom.xml                           | 15 ++++++++-
 apache-maven/src/conf/logging/log4j2-color.xml | 36 +++++++++++++++++++++
 apache-maven/src/conf/logging/log4j2.xml       | 36 +++++++++++++++++++++
 pom.xml                                        | 30 ++++++++++++++---
 4 files changed, 112 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/d0947c54/apache-maven/pom.xml
----------------------------------------------------------------------
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index 084d30d..50f037d 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -85,7 +85,20 @@
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
+      <artifactId>slf4j-ext</artifactId>
+    </dependency>
+    <dependency>
+      <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>
+      <scope>runtime</scope>
     </dependency>
   </dependencies>
 

http://git-wip-us.apache.org/repos/asf/maven/blob/d0947c54/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/d0947c54/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/d0947c54/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 15bdee0..24f2987 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,7 +59,10 @@
     <modelloVersion>1.7</modelloVersion>
     <jxpathVersion>1.3</jxpathVersion>
     <aetherVersion>0.9.0.M2</aetherVersion>
-    <slf4jVersion>1.7.4</slf4jVersion>
+    <slf4jVersion>1.7.5</slf4jVersion>
+    <log4j2Version>2.0-beta6</log4j2Version>
+    <logbackVersion>1.0.13</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>
@@ -221,6 +224,7 @@
         <artifactId>plexus-interpolation</artifactId>
         <version>${plexusInterpolationVersion}</version>
       </dependency>
+      <!-- Logging -->
       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
@@ -230,13 +234,31 @@
         <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.slf4j</groupId>
+        <artifactId>slf4j-ext</artifactId>
+        <version>${slf4jVersion}</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