I added today slf4j-log4j12 and the log4j bundle to the parent pom. So
it should be OK to simple use
    <dependency> <!-- we use log4j 1.2 -->
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency> <!-- see also the log4j.properties in src/main/resources -->
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <scope>runtime</scope>
    </dependency>
in your POM

best
Rupert

On Wed, May 4, 2011 at 4:02 PM, Olivier Grisel <[email protected]> wrote:
> 2011/5/4 Alessandro Adamou <[email protected]>:
>> Hi,
>>
>> I started to get SLF4J-related errors when running Kres unit tests these
>> days. Stuff like
>>
>> ---
>> SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.
>> SLF4J: Your binding is version 1.5.5 or earlier.
>> SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x
>> ---
>>
>> Tests won't run at all. Some failures occur when testing via Eclipse, others
>> with Maven.
>>
>> A mvn dependency:tree on the Stanbol root says that most Stanbol components
>> are using 1.6.1 where I'm sitting today, as their POMs don't seem to specify
>> a version.
>>
>> We had forced version 1.5.2 for Kres bundles, both with slf4j-api and its
>> bindings. Could it be time to stop depending on it? And what binding is best
>> to adopt between slf4j-simple and slf4j-log4j12 ?
>>
>> I don't think we have to stick to a specific version or binding, so long as
>> the API stays compatible.
>
> Yes, as a rule of thumb, move all the version numbers in the
> dependencyManagement section of the top level parent pom.xml unless
> you have a valid reason to do otherwise.
>
> As for slf4j-simple vs slf4j-log4j12 I don't know.
>
> --
> Olivier
> http://twitter.com/ogrisel - http://github.com/ogrisel
>



-- 
| Rupert Westenthaler             [email protected]
| Bodenlehenstraße 11                             ++43-699-11108907
| A-5500 Bischofshofen

Reply via email to