Maven 2 hates Commons Logging
It's true that most people hate commons-logging, but Maven 2 hates it even more. There are many open source projects that use this library, so you're likely to depend on it when you never intended to. Of course, this is Maven 2's transitive dependencies fault - but currently there's no option to turn transitivity off. I tried changing to SLF4J, but that causes some Maven plugins to fail.
Since the Maven team refuses to fix this (even though it's an *obvious* exception to their rule about not changing anything), I've fixed it myself. The AppFuse repo has a fixed version of commons-logging's pom.xml. To get the fixed version of commons-logging, delete it from your local repo, then add AppFuse's repository to your pom.xml:
<repositories> <repository> <id>appfuse</id> <url>http://static.appfuse.org/repository</url> </repository> </repositories>
Since the burden of this issue clearly rests upon the shoulders of the commons-logging developers - can we please get a new release with a fixed pom? Pretty please?
Update: I tried to get slf4j to work again today. While I succeeded, I found a critical bug. The bug is that log messages don't print out the method name, just debug(), info() or whatever from your classes. It's possible to fix this by using slf4j instead of clogging. However, that won't help you get method names printed when cranking up the logging for 3rd party libraries like Spring and Hibernate. Since this won't be fixed, it seems better to stick with commons-logging. I doubt I'd have any luck getting all the libraries that AppFuse uses to move away from commons-logging.
Posted by Andy Yates on February 05, 2007 at 09:49 AM MST #
Posted by David Rabinowitz on February 05, 2007 at 06:55 PM MST #
Posted by Matt Raible on February 05, 2007 at 07:05 PM MST #
Posted by Ceki Gulcu on February 05, 2007 at 07:36 PM MST #
And adding your own modified commons-logging to your repo is really a bad idea.
- if i already have it cached (most likely) i won't get it from your repo
- if i get it from you other projects may not work
So the easiest solution would be to create org.appfuse.thirparty commons-logging pom (type pom) that depends on commons-logging 1.1 with all the exclusions, and make appfuse use that one until 1.1.1 is released
Posted by Carlos Sanchez on February 06, 2007 at 11:20 PM MST #
Posted by Srgjan Srepfler on February 09, 2007 at 08:49 PM MST #
Posted by Ceki Gulcu on February 22, 2007 at 01:41 PM MST #
Posted by Fabricio on May 11, 2007 at 05:28 PM MDT #
Posted by Commons Logging user on July 31, 2007 at 04:20 AM MDT #
Posted by Jason Harrop on April 02, 2008 at 06:34 AM MDT #
Posted by Olis Thoughts About Programming on December 22, 2008 at 12:26 PM MST #