COMMONS-LOGGING VERSION 99.0-does-not-exist IS NOT IN ANY WAY AFFILIATED WITH THE ORIGINAL DEVELOPERS OF COMMONS-LOGGING NOR WITH APACHE. Why no-commons-logging?
If you are using Maven you'll know it is practically impossible to move away from commons-logging (with its class-loading problems) and migrate to SLF4J. About every second pom declares it is dependent on commons-logging. Unfortunately Maven does not provide an easy way to exclude a certain package throughout your project. You will have to exclude commons-logging on each and every dependency you need (including transitive dependencies). No-commons-logging is a Maven hack that allows you to exclude commons-logging from your application with a single piece of configuration. How does no-commons-logging work?
No-commons-logging is a Maven2 package that mimics a commons-logging package with a high version number, but without any actual java code in the jar. This trick works because Maven allows you to specify a specific version for a dependency, and that version will then be used regardless of other dependency specifications. Update 2007-07-22: Added package to mimic commons-logging-api as requested by Olivier Lamy. How do you use no-commons-logging?
In your pom.xml include the following piece of xml:
<repositories> <repository> <id>no-commons-logging</id> <name>No-commons-logging Maven Repository</name> <layout>default</layout> <url>http://no-commons-logging.zapto.org/mvn2</url> </repository> </repositories> <dependencies> <!-- use no-commons-logging --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>99.0-does-not-exist</version> </dependency> <!-- no-commons-logging-api, if you need it --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging-api</artifactId> <version>99.0-does-not-exist</version> </dependency> <!-- the slf4j commons-logging replacement --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl104-over-slf4j</artifactId> <version>1.4.2</version> </dependency> <!-- the other slf4j jars --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.4.2</version> </dependency> <!-- using log4j as backend --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.4.2</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.14</version> </dependency> </dependencies>
COMMONS-LOGGING VERSION 99.0-does-not-exist IS NOT IN ANY WAY AFFILIATED WITH THE ORIGINAL DEVELOPERS OF COMMONS-LOGGING NOR WITH APACHE.