Claus,

>>>Well frankly it is the other way around. End users should be able to
specify exactly which log4j version they want to use.

If camel users (2.8.0) instrucht camel to use log4j through slf4j by
declaring a DIRECT dependency to the slf4j-log4j12, then indeed they will
get stucked to log4j 1.2.16. See the example here for a version conflict of
log4j caused through slf4j 
http://camel.465427.n5.nabble.com/file/n4695940/foo.zip foo.zip  and do a 

mvn org.apache.maven.plugins:maven-dependency-plugin:2.3:tree -Dverbose=true

And in maven's output see the line 

(log4j:log4j:jar:1.2.16:compile - omitted for conflict with 1.1.3)

And we all know that at RUNTIME the application's routing logic will most
probably crash with a "NoSuchMethodError" if camel calls a slf4j's
LOGGER.xyz() method which gets delegated to log4j logging API. However the
method signature slf4j Logger calls on log4j API was not available at the
time by log4j API version 1.1.3. On the other hand this was the version the
developer decided to use! Well in an OSGi environment things would seem
different, but that's not our concern by this discussion.

@Christian I've never used freemarker but they seem to use a Ant+Ivy build
and not maven, see https://github.com/freemarker/freemarker. At least their
maven pom claims to have no dependencies! see
http://repo1.maven.org/maven2/org/freemarker/freemarker/2.3.18/freemarker-2.3.18.pom

I'll wait to see what Claus thinks before opening a JIRA-ticket. There are
two fixes I can see
1- remove the compile-scope dependency to log4j by camel-freemarker, see
https://svn.apache.org/repos/asf/camel/trunk/components/camel-freemarker/pom.xml
2- remove of all those DIRECT log4j dependencies of the scope test by all
camel's poms. Please note that this's NOT critical for the camel users, and
is just relevant while running camel's own test cases. Nevertheless it's not
nice.

Regards, Babak 

--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-freemarker-tp4693216p4695940.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to