Maven includes Commons Logging by default, which isn't what you really want if you'd like to use SLF4J for your logging facade. A nice solution to fake out Maven was written at this blog. Basically you have a fake version 99.0 as an empty jar named the same as Commons Logging so it's downloaded instead.
I noticed builds were running really slow and it seems that he Maven repository (http://no-commons-logging.zapto.org/mvn2) has been down for days. As a temporary solution I've put the no Commons Logging jars into the Spring by Example repo and put a mirror entry into my settings.xml.
It would be nice if Maven just had a way to do global excludes if you don't want a jar no matter what transitive dependencies are resolved.
~/.m2/settings.xml
<settings>
<mirrors>
<mirror>
<id>no-commons-logging</id>
<name>No Commons Logging</name>
<url>http://www.springbyexample.org/maven/repo</url>
<mirrorof>no-commons-logging</mirrorof>
</mirror>
</mirrors>
</settings>
Wednesday, November 26, 2008
Subscribe to:
Post Comments (Atom)
1 comment:
Thanks David. I really don't like the commons-logging and like you much prefer the simplicity of SLF4J.
Post a Comment