camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davsclaus <>
Subject Maven and commons-logging-api and the dreadful log4j problem
Date Thu, 06 Mar 2008 06:21:39 GMT


I have been working on some patches for camel-mina as we needed camel to
support synchronous TCP communication and the likes.

During unit testing I was fighting to output DEBUG logging using It took quite a while for me to figure out that log4j is
not picked up/used at all during unit testing since the pom.xml that are
used default in camel depends on:


And apparently there is a difference when the artifcatid is -api
(commons-logging-api). The it does not include the Log4jFactory and then you
are stuck with lame JDK1.4 logging.

To remedy it I had to set this in the pom.xml in camel-mina component


This is the non -api version that includes the Log4jFactory and others.
Then the from test/resources is picked up and I can have
DEBUG logging from all the frameworks used (even Mina).

Changing the uber pom.xml to use the non -api did not work AFAIR - there
were some maven build problems later on. 

Is there a sane reason why JCL has this abstraction between the -api and non
api version where the most used logging framework is excluded?

I just wanted to raise this on this forum. How does the camel developers go
around this? I am sure there are others that have had similar problems.
View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message