Friday, December 12, 2014

Removing commons-logging Dependency from Spring with Ivy

Let's say you want Spring to use SLF4J instead of commons-logging.

First you need to remove the dependency from spring-core:

[TODO]

In the unlikely event you are already not loading transitive dependencies:

<dependency org="org.springframework" name="spring-core" rev="3.2.8.RELEASE" transitive="false"/>

you need to to nothing.

Then add the following dependencies to specify the framework you want to use:

<dependency org="org.slf4j" name="jcl-over-slf4j" rev="1.7.7" transitive="false"/>
<dependency org="org.slf4j" name="slf4j-api" rev="1.7.7" transitive="false"/>
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.7.7" transitive="false"/>

No comments: