提交 b61a4095 编写于 作者: M Mirko Friedenhagen

Use slf4j adapters for logging.

- By introducing adapters for log4j and commons-logging and
- including the original log4j and commons-logging dependencies as provided
all logging should be redirected to slf4j and finally java.util.logging.
上级 69a98484
......@@ -401,10 +401,6 @@ THE SOFTWARE.
<groupId>org.springframework</groupId>
<artifactId>spring-support</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
......@@ -473,8 +469,8 @@ THE SOFTWARE.
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
......
......@@ -34,6 +34,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<concurrency>2</concurrency> <!-- may use e.g. 2C for 2 × (number of cores) -->
<!-- same version as in org.jenkins-ci.main:pom -->
<slf4jVersion>1.7.7</slf4jVersion>
</properties>
<dependencies>
......@@ -80,6 +82,32 @@
<scope>provided</scope>
<optional>true</optional><!-- no need to have this at runtime -->
</dependency>
<!-- mark logging dependencies as provided by war -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4jVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>${slf4jVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4jVersion}</version>
<scope>provided</scope>
</dependency>
<!-- make binding to java.util.logging available during tests -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>${slf4jVersion}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
......
......@@ -214,15 +214,22 @@ THE SOFTWARE.
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4jVersion}</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.3</version>
<scope>provided</scope><!-- by jcl-over-slf4j -->
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>${slf4jVersion}</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.3</version>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<scope>provided</scope><!-- by log4j-over-slf4j -->
</dependency>
<dependency>
<groupId>org.samba.jcifs</groupId>
......@@ -664,7 +671,6 @@ THE SOFTWARE.
<bannedDependencies>
<excludes>
<exclude>org.sonatype.sisu:sisu-guice</exclude>
<exclude>log4j:log4j</exclude>
</excludes>
</bannedDependencies>
</rules>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册