commons-logging: you’re on notice!

Hey, commons-logging team, you’re on notice!

Here is a dump of the Maven 2 dependencies from the project I use for my article on embedded integration testing:

Never mind the fact that commons-logging was meant to be a thin facade on top of other logging frameworks. commons-logging 1.1 actually include compile dependencies on: log4j, servlet-api, avalon-framework, and logkit! servlet-api!?! WTF!?

Maven 2 is extremely susceptible to bad POMs because dependencies are resolved transitively. The practical consequence of this screw up is that if you build a WAR that includes Spring using Maven 2, you will get servlet-api included as well. Most application servers don’t like this.

This has actually been reported as a bug for Maven, but changing a POM in the Maven repository is “illegal”. This means we’re stuck with this mess.

I for one think that this is one screw-up that shows unacceptable stupidity on part of the commons-logging team. And the fact that it has not been fixed in the half year since 1.1 is just enough to make me want to go shoot someone. Join me and let’s make our code commons-logging-free!.

About Johannes Brodwall

Johannes is Principal Software Engineer in SopraSteria. In his spare time he likes to coach teams and developers on better coding, collaboration, planning and product understanding.
This entry was posted in Java. Bookmark the permalink.