commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject RE: [jcl] mocks
Date Sun, 11 Dec 2005 02:32:28 GMT
I think he meant that there would be a "mock" or "no-op" implementation
inside the jar.  So, you could download this minimal jar file and include
that on the classpath.  No logging would actually occur, but it would
satisfy the dependencies.  I would imagine that some of the "core" classes
would have to be included also.  

I don't know if this has ever been discussed or not, but could we not split
JCL up into a bunch of different jars containing the different
implementations?  Each implementation jar (one for Log4J, Avalon, JDK14,
etc.) would contain a file called something like "/META-INF/jcl-module.xml"
or whatever.  It could actually just be a properties file, I would imagine.
Anyway, then that file is looked up at runtime to determine the
implementation the user wishes to use.  If they want to use log4j, they
would include the commons-logging-log4j.jar file on the classpath.  If they
want to use the "no-op" implementation, they'd include the
commons-logging-noop.jar file on the classpath.  This is similar to what we
do in HiveMind.  It might work here.  I don't know.  Just a thought.  There
would be an issue if the user included two different implementations on the
classpath.  I guess the one that shows up first on the classpath would get
loaded.   

James

-----Original Message-----
From: Simon Kitching [mailto:skitching@apache.org] 
Sent: Saturday, December 10, 2005 9:14 PM
To: Jakarta Commons Developers List
Subject: Re: [jcl] mocks

On Sat, 2005-12-10 at 22:42 +0100, Torsten Curdt wrote:
> As some projects are not really happy with the JCL
> dependency it would be nice to have a simple and
> small mock jar ...just to justify the dependency.
> 
> Any objections to add this to the JCL codebase
> and build system? ...or should that be hosted
> somewhere else?

What exactly do you mean by "mock jar", and how does this "justify the
dependency"?

Cheers,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message