commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam R. B. Jack" <>
Subject Re: [logging][PROPOSAL] a solution to incompatibility between log4j versions
Date Wed, 19 May 2004 22:11:49 GMT
> > If so, the trick would be to run commons-logging unit tests separately
> > from
> > the compile, and run two of them with a dependency on logging-log4j and
> > logging-log4j-12.
> something along those lines would probably work.

Basically depend upon C-L to get what you just built, and then set an
environment to suit, then call ant with a 'test' target. You might wish to
change C-L from a 'dist' (compile/test/jar) to a simple compile/jar.

<project name="commons-logging-test-<SUITABLE-NAME>">
    <description>Logging Tests</description>
    <url href=""/>
    <ant basedir="logging" target="test"/>
    <depend project="ant" inherit="runtime"/>
    <depend project="commons-logging"/>
    <depend project="xml-xerces"/>

    <depend project="logging-log4j-12"/>
    <depend project="logging-log4j"/>
    <depend project="avalon-logkit"/>
    ... missing (to test Simple)

    <nag to=""
        from="robert burrell donkin

Note: I made the three mandatory dependencies, not optional. Better to fail
explicitly than fallback to simple.

This is in Gump CVS at ./project/jakarta-commons.xml. If you get too
much/too fancy, you might wish to pull it out into your own module
descriptor [like http-client chose], but I wouldn't yet.

> a second gump target which tested just the log4j1.2.x compatibility
> would probably do the trick. a third which allows us to test the avalon
> framework logger would be cool as well.

and a forth to fallback to Simple? Your call.

BTW: C-L doesn't set runtime dependences within Gump, which is good for
this, bad for other things. AXIS failed when I set C-L to use log4j-12, but
sucked in it's own log4j ('cos C-L didn't provide). In the future we might
wish to address this, with the default C-L project setting things runtime,
but one step at a time.

> i haven't found time to fix digester, beanutils and struts gump runs
> yet but i hope to do so tomorrow. i you could give me some quick
> pointers to the best way to do the additional targets, i'll add them to
> my list of stuff to do...

Thanks for doing that.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message