On April 30, 2001 at 21:47, "Vincent Massol" wrote:
> I chose option 2 although I would have preferred option 1. But I thought
> that the cost of needing the log4j jar was going to add too much complexity
> and that Cactus was already complex enough not to have to support this
> additional complexity. Note that it is not *that* complex (it just means
> having the log4j jar ready and adding an additional jar in the CLASSPATH)
> but I have found that even having the correct jars in the classpath is not
> something that easy for end users .... :)
In the work I have done, the solution to this problem is to merge
the necessary jar files together to avoid the dependency on CLASSPATH.
The merging is not ideal for some applications, like applets, but
works well for server-side, or stand-alone, applications. It makes
distribution and installation easier.
To do the merging, I wrote some classes that do the merging processing
(using jar to do the work is inefficent and awkward). It attempts to
preserve manifest information and supports selective inclusion and
exclusion of classes; this allows one to merge only what is needed.
If there is interest, I can make the source available.
Wrt log4j, you could include the log4j jar file with Cactus and then
merge it into the jar file (or files(?), I am not familiar with Cactus)
during the build so all necessary log4j classes are available. For a
project I am working on where I work, this is what I do. I also
include a default log4j.properties in our base library so log4j does
not complain if the application does not provide one.
I do not know if using log4j is appropriate for Commons, but I thought
I would mention the above as it may interest some.
My $0.02 opinion: From the goal statements on the jakarta web-site for
Commons, it seems that Commons components should try to provide
well-defined exceptions and let the component user manage any logging
functionality (to support the goal of minimal dependencies).
Well-defined exceptions, and support for listeners (where appropriate),
should be sufficient to support a user in whatever logging system they
choose to use.
--ewh